MeshLib Documentation
Loading...
Searching...
No Matches
MR::AncillaryImGuiLabel Class Reference

Helper class that draws ImGui label. More...

#include <MRAncillaryLabels.h>

+ Inheritance diagram for MR::AncillaryImGuiLabel:

Public Member Functions

 AncillaryImGuiLabel ()=default
 
MRVIEWER_API void make (Object &parent, const PositionedText &text)
 Make label in parent space coordinates, follows parent worldXf.
 
MRVIEWER_API void make (std::shared_ptr< Object > parent, const PositionedText &text)
 
MRVIEWER_API void make (const PositionedText &text)
 Make label in world space coordinates.
 
MRVIEWER_API void reset ()
 clears this instance
 
Vector2f getPivot () const
 
void setPivot (Vector2f pivot)
 
- Public Member Functions inherited from MR::PreDrawListener
 MR_ADD_CTOR_DELETE_MOVE (PreDrawListener)
 
virtual ~PreDrawListener ()=default
 
virtual MRVIEWER_API void connect (Viewer *viewer, int group, boost::signals2::connect_position pos) override
 
- Public Member Functions inherited from MR::ConnectionHolder
virtual ~ConnectionHolder ()=default
 
virtual void disconnect ()
 
- Public Member Functions inherited from MR::IConnectable
virtual ~IConnectable ()=default
 

Additional Inherited Members

- Protected Attributes inherited from MR::ConnectionHolder
boost::signals2::scoped_connection connection_
 

Detailed Description

Helper class that draws ImGui label.

Constructor & Destructor Documentation

◆ AncillaryImGuiLabel()

MR::AncillaryImGuiLabel::AncillaryImGuiLabel ( )
default

Member Function Documentation

◆ getPivot()

Vector2f MR::AncillaryImGuiLabel::getPivot ( ) const
inline

Pivot point { 0, 0 } for top left corner, { 0.5f, 0.5f } for center (default), { 1, 1 } for bottom right corner. { -0.7f, 1.7f } looks ok next to a point (label to up and right from the point)

◆ make() [1/3]

MRVIEWER_API void MR::AncillaryImGuiLabel::make ( const PositionedText & text)

Make label in world space coordinates.

◆ make() [2/3]

MRVIEWER_API void MR::AncillaryImGuiLabel::make ( Object & parent,
const PositionedText & text )

Make label in parent space coordinates, follows parent worldXf.

◆ make() [3/3]

MRVIEWER_API void MR::AncillaryImGuiLabel::make ( std::shared_ptr< Object > parent,
const PositionedText & text )

Make label in parent space coordinates, follows parent worldXf Note: label should be deleted or reset if parent is deleted or removed from scene

◆ reset()

MRVIEWER_API void MR::AncillaryImGuiLabel::reset ( )

clears this instance

◆ setPivot()

void MR::AncillaryImGuiLabel::setPivot ( Vector2f pivot)
inline

The documentation for this class was generated from the following file: