25 std::shared_ptr<ObjectLabel>
obj;
35 {
make( parent, text, depthTest ); }
86 void setPivot( Vector2f pivot ) { pivot_ = pivot; }
94 MRVIEWER_API
virtual void preDraw_()
override;
96 std::weak_ptr<Object> parent_;
97 Vector2f pivot_ = { 0.5f, 0.5f };
100 std::optional<ImGuiMeasurementIndicators::Params> overrideParams_;
101 boost::signals2::scoped_connection parentXfConnection_;
Definition MRObjectLabel.h:29
named object in the data model
Definition MRObject.h:62
void setPosition(const Vector3f &pos)
Set text position.
AncillaryLabel(AncillaryLabel &&b) noexcept=default
since this uniquely owns an ancillary object, we provide only move operations, not copy
void make(const PositionedText &text)
Make label in world space coordinates.
void overrideParams(const ImGuiMeasurementIndicators::Params ¶ms)
Optionally override rendering params for this label.
void setDepthTest(bool depthTest)
Set depth test.
void reset()
clears this instance
void make(Object &parent, const PositionedText &text)
Make label in parent space coordinates, follows parent worldXf.
std::shared_ptr< ObjectLabel > obj
Definition MRAncillaryLabels.h:25
void make(Object &parent, const PositionedText &text, bool depthTest=false)
Make not-pickable ancillary object, link it to parent object, and set label text.
void setPivot(Vector2f pivot)
Definition MRAncillaryLabels.h:86
Vector2f getPivot() const
Definition MRAncillaryLabels.h:85
void resetText()
Reset label text.
void setText(const PositionedText &text)
Set label text.
void make(std::shared_ptr< Object > parent, const PositionedText &text)
static std::shared_ptr< ObjectLabel > makeDetached(const PositionedText &text, bool depthTest=false)
Make not-pickable ancillary object without parent object, and set label text.
void resetOverrideParams()
use default parameters instead of overridden ones
~AncillaryLabel()
detach owned object from parent, stops owning it
Definition MRAncillaryLabels.h:48
void reset()
detach owned object from parent, stops owning it
AncillaryImGuiLabel()=default
AncillaryLabel(Object &parent, const PositionedText &text, bool depthTest=false)
Make not-pickable ancillary object, link it to parent object, and set label text.
Definition MRAncillaryLabels.h:34
only for bindings generation
Definition MRCameraOrientationPlugin.h:8
Definition MRImGuiMeasurementIndicators.h:40
Definition MRPositionedText.h:13
Definition MRViewerEventsListener.h:171