70 float deadZonePixelRadius_{ 20.0f };
86 MRVIEWER_API
virtual void setCenterPoint_(
const std::vector<std::shared_ptr<Object>>& objects, Vector3f& centerPoint )
const;
90 MRVIEWER_API Box3f
getBbox_(
const std::vector<std::shared_ptr<Object>>& objects )
const;
104 MRVIEWER_API
virtual void onPick_(
105 TransformMode mode,
const std::vector<std::shared_ptr<Object>>& objects,
106 const Vector3f& centerPoint,
const Vector3f& startPoint );
110 void applyCurrentXf_();
112 void setVisualizeVectors_( std::vector<Vector3f> worldPoints );
114 std::vector<std::shared_ptr<Object>> objects_;
115 std::vector<AffineXf3f> initialXfs_;
118 Vector2i screenStartPoint_;
119 bool xfChanged_ =
false;
120 MouseButton currentButton_ = MouseButton::NoButton;
123 Vector3f worldStartPoint_;
124 Vector3f xfCenterPoint_;
125 float viewportStartPointZ_;
126 Plane3f referencePlane_;
132 bool historyEnabled_{
true };
134 std::vector<ImVec2> visualizeVectors_;
137 std::vector<boost::signals2::scoped_connection> connections_;
138 bool changingXfFromMouseMove_{
false };
Definition MRMoveObjectByMouseImpl.h:17
virtual MRVIEWER_API void setCenterPoint_(const std::vector< std::shared_ptr< Object > > &objects, Vector3f ¢erPoint) const
centerPoint - a point that will be used as center of rotation/scaling in world space
virtual MRVIEWER_API TransformMode modeFromPickModifiers_(int modifiers) const
Helper function to determine TransformMode based on modifiers.
virtual ~MoveObjectByMouseImpl()=default
MRVIEWER_API Box3f getBbox_(const std::vector< std::shared_ptr< Object > > &objects) const
MRVIEWER_API void onDrawDialog(float menuScaling) const
MoveObjectByMouseImpl()=default
MRVIEWER_API bool onMouseMove(int x, int y)
MRVIEWER_API bool onMouseUp(MouseButton button, int modifiers)
virtual MRVIEWER_API ObjAndPick pickObjects_(std::vector< std::shared_ptr< Object > > &objects, int modifiers) const
TransformMode
Transformation mode.
Definition MRMoveObjectByMouseImpl.h:60
MRVIEWER_API bool onMouseDown(MouseButton button, int modifiers)
MRVIEWER_API bool isMoving() const
void enableHistory(bool history)
enables or disables adding history to viewer history store by this tool
Definition MRMoveObjectByMouseImpl.h:52
virtual MRVIEWER_API TransformMode modeFromPick_(MouseButton button, int modifiers) const
this function is called from onMouseDown to verify if pick should proceed, if None is returned - onMo...
int minDistance() const
Definition MRMoveObjectByMouseImpl.h:25
void setMinDistance(int minDistance)
Definition MRMoveObjectByMouseImpl.h:26
MRVIEWER_API void cancel()
virtual MRVIEWER_API void setStartPoint_(const ObjAndPick &pick, Vector3f &startPoint) const
startPoint - a point under cursor for transform calculation, can be the picked point or else (world c...
AffineXf3f currentXf_
Definition MRMoveObjectByMouseImpl.h:92
bool isHistoryEnabled() const
returns true if appending history to viewer history store is enabled in this tool
Definition MRMoveObjectByMouseImpl.h:55
@ None
special value not to limit path in one slice
Definition MRVoxelPath.h:33
Definition MRCameraOrientationPlugin.h:8
MouseButton
Definition MRMouse.h:9
std::pair< std::shared_ptr< MR::VisualObject >, MR::PointOnObject > ObjAndPick
Definition MRViewerFwd.h:73