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;
42 MRVIEWER_API
void updatePlane(
const Plane3f& plane,
bool updateCameraRotation =
true );
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
MRVIEWER_API const Plane3f & getPlane() const
returns plane
MouseButton
Definition MRMouse.h:12
MRVIEWER_API void setImportPlaneMode(bool val)
sets the flag importPlaneMode_, if it is true you can use a plain object from the scene
MRVIEWER_API void updatePlane(const Plane3f &plane, bool updateCameraRotation=true)
MRVIEWER_API void setOnPlaneUpdateCallback(OnPlaneUpdateCallback callback)
MRVIEWER_API const std::shared_ptr< ObjectMesh > & getPlaneObject() const
returns plane object
MRVIEWER_API void definePlane()
defines plane, adds plane object to scene
float getLocalShift() const
Definition MRPlaneWidget.h:56
void setLocalShift(float shift)
Definition MRPlaneWidget.h:55
bool getShowPlaneByDefault() const
returns the flag that is true if the plane is shown by default
Definition MRPlaneWidget.h:74
bool isInLocalMode() const
Definition MRPlaneWidget.h:54
MRVIEWER_API void updateBox(const Box3f &box, bool updateCameraRotation=true)
void setShowPlaneByDefault(bool val)
sets the flag that is true if the plane is shown by default
Definition MRPlaneWidget.h:76
MRVIEWER_API void undefinePlane()
undefines plane, removes PlaneObject from scene
NameTagSelectionMode
Definition ImGuiMenu.h:312
MRVIEWER_API const Box3f & box() const
returns box which is used to calculate size and position of the visualized plane part
MRVIEWER_API void setLocalMode(bool on)
MRVIEWER_API bool importPlaneMode() const
returns the flag importPlaneMode_, if it is true you can use a plain object from the scene
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRViewerEventsListener.h:32