31 ChangeXfAction::action( type );
32 auto tempDir = widget_.dir_;
33 widget_.updateDirection( dir_ );
52 ChangeXfAction::action( type );
53 std::swap( base_, widget_.base_ );
67 length_{ widget.length_ }
71 auto len = widget_.length_;
72 widget_.updateLength( length_ );
87 visible_{ widget.directionObj_->visibilityMask() }
91 auto oldVisible = widget_.directionObj_->visibilityMask();
92 widget_.directionObj_->setVisibilityMask( visible_ );
93 visible_ = oldVisible;
95 virtual std::string
name()
const override
99 [[nodiscard]]
virtual size_t heapBytes()
const override
101 return name_.capacity();
106 std::string name_ =
"Change Visible";
110 std::shared_ptr<ObjectMesh> directionObj_;
116 bool mousePressed_ =
false;
118 bool blockedMouse_{
false };
119 Vector3f worldStartPoint_;
120 float viewportStartPointZ_{ 0.0f };
121 OnDirectionChangedCallback onDirectionChanged_;
122 Color color_ = Color::red();
123 bool needToSaveHistory_ =
true;
155 std::shared_ptr<ObjectMesh>
obj()
const {
return directionObj_; }
182 MRVIEWER_API
virtual bool onMouseDown_(
MouseButton button,
int modifier )
override;
183 MRVIEWER_API
virtual bool onMouseUp_(
MouseButton button,
int modifier )
override;
184 MRVIEWER_API
virtual bool onMouseMove_(
int mouse_x,
int mouse_y )
override;
length
Definition MRObjectDimensionsEnum.h:14
Definition MRChangeXfAction.h:13
Definition MRHistoryAction.h:12
Type
Definition MRHistoryAction.h:19
named object in the data model
Definition MRObject.h:60
stores mask of viewport unique identifiers
Definition MRViewportId.h:38
Visual Object.
Definition MRVisualObject.h:131
MouseButton
Definition MRMouse.h:9
Definition MRMesh/MRColor.h:9
Definition MRViewerEventsListener.h:29