2#include "MRViewerFwd.h"
73 float deadZonePixelRadius_{ 20.0f };
77 MRVIEWER_API
virtual ObjAndPick
pickObjects_( std::vector<std::shared_ptr<Object>>& objects,
int modifiers )
const;
86 MRVIEWER_API
virtual void setStartPoint_(
const ObjAndPick& pick, Vector3f& startPoint )
const;
89 MRVIEWER_API
virtual void setCenterPoint_(
const std::vector<std::shared_ptr<Object>>& objects, Vector3f& centerPoint )
const;
93 MRVIEWER_API
virtual Plane3f
calcControlPlane_(
const Viewport& vp,
const Vector3f& viewportCenterPoint,
const Vector3f& xfCenterPoint )
const;
97 MRVIEWER_API Box3f
getBbox_(
const std::vector<std::shared_ptr<Object>>& objects )
const;
101 int minDistance_ = 0;
111 MRVIEWER_API
virtual void onPick_(
112 TransformMode mode,
const std::vector<std::shared_ptr<Object>>& objects,
113 const Vector3f& centerPoint,
const Vector3f& startPoint );
117 void applyCurrentXf_();
119 void setVisualizeVectors_( std::vector<Vector3f> worldPoints );
121 std::vector<std::shared_ptr<Object>> objects_;
122 std::vector<AffineXf3f> initialXfs_;
125 Vector2i screenStartPoint_;
126 bool xfChanged_ =
false;
127 MouseButton currentButton_ = MouseButton::NoButton;
130 Vector3f worldStartPoint_;
131 Vector3f xfCenterPoint_;
132 float viewportStartPointZ_;
133 Plane3f referencePlane_;
139 bool historyEnabled_{
true };
141 std::vector<ImVec2> visualizeVectors_;
144 std::vector<boost::signals2::scoped_connection> connections_;
145 bool changingXfFromMouseMove_{
false };
Definition MRMoveObjectByMouseImpl.h:20
Definition MRViewport.h:49
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
MouseButton
Definition MRMouse.h:12
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
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:63
MRVIEWER_API bool onMouseDown(MouseButton button, int modifiers)
virtual MRVIEWER_API Plane3f calcControlPlane_(const Viewport &vp, const Vector3f &viewportCenterPoint, const Vector3f &xfCenterPoint) const
MRVIEWER_API void onDrawDialog() const
MRVIEWER_API bool isMoving() const
void enableHistory(bool history)
enables or disables adding history to viewer history store by this tool
Definition MRMoveObjectByMouseImpl.h:55
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:28
void setMinDistance(int minDistance)
Definition MRMoveObjectByMouseImpl.h:29
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:99
bool isHistoryEnabled() const
returns true if appending history to viewer history store is enabled in this tool
Definition MRMoveObjectByMouseImpl.h:58
@ Translation
Rotate camera around selected point.
@ None
special value not to limit path in one slice
Definition MRVoxelPath.h:33
only for bindings generation
Definition MRCameraOrientationPlugin.h:8