18 std::shared_ptr<ObjectMesh> planeObj_;
21 Vector3f cameraUp3Old_;
24 bool localMode_{
false };
25 float localShift_{ 0.0f };
27 using OnPlaneUpdateCallback = std::function<void()>;
28 OnPlaneUpdateCallback onPlaneUpdate_;
30 bool pressed_ =
false;
31 bool showPlaneByDefault_ =
true;
32 Vector2f startMousePos_;
33 Vector2f endMousePos_;
35 std::shared_ptr<ObjectLines> line_;
37 bool importPlaneMode_ =
false;
45 MRVIEWER_API
void updateBox(
const Box3f&
box,
bool updateCameraRotation =
true );
67 MRVIEWER_API
const Box3f&
box()
const;
79 MRVIEWER_API
void updateWidget_(
bool updateCameraRotation =
true );
81 MRVIEWER_API
virtual bool onDragStart_(
MouseButton button,
int modifier )
override;
82 MRVIEWER_API
virtual bool onDragEnd_(
MouseButton button,
int modifier )
override;
83 MRVIEWER_API
virtual bool onDrag_(
int mouse_x,
int mouse_y )
override;
86 bool importPlaneObj_(
Object& obj );
named object in the data model
Definition MRObject.h:62
MouseButton
Definition MRMouse.h:12
void undefinePlane()
undefines plane, removes PlaneObject from scene
const Plane3f & getPlane() const
returns plane
float getLocalShift() const
Definition MRPlaneWidget.h:56
void updatePlane(const Plane3f &plane, bool updateCameraRotation=true)
void setLocalShift(float shift)
Definition MRPlaneWidget.h:55
bool importPlaneMode() const
returns the flag importPlaneMode_, if it is true you can use a plain object from the scene
Plane3f
Definition MRMeshFwd.h:393
void setImportPlaneMode(bool val)
sets the flag importPlaneMode_, if it is true you can use a plain object from the scene
bool getShowPlaneByDefault() const
returns the flag that is true if the plane is shown by default
Definition MRPlaneWidget.h:74
const Box3f & box() const
returns box which is used to calculate size and position of the visualized plane part
bool isInLocalMode() const
Definition MRPlaneWidget.h:54
void setShowPlaneByDefault(bool val)
sets the flag that is true if the plane is shown by default
Definition MRPlaneWidget.h:76
void definePlane()
defines plane, adds plane object to scene
void updateBox(const Box3f &box, bool updateCameraRotation=true)
const std::shared_ptr< ObjectMesh > & getPlaneObject() const
returns plane object
NameTagSelectionMode
Definition ImGuiMenu.h:315
void setOnPlaneUpdateCallback(OnPlaneUpdateCallback callback)
void setLocalMode(bool on)
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRViewerEventsListener.h:32