MeshLib
 
Loading...
Searching...
No Matches
MR::AncillaryLabel Struct Reference

Helper class to manage ancillary labels used by plugins. More...

#include <MRAncillaryLabels.h>

Public Member Functions

 AncillaryLabel ()=default
 
 AncillaryLabel (AncillaryLabel &&b) noexcept
 since this uniquely owns an ancillary object, we provide only move operations, not copy
 
AncillaryLabeloperator= (AncillaryLabel &&b)
 
 AncillaryLabel (Object &parent, const PositionedText &text, bool depthTest=false)
 Make not-pickable ancillary object, link it to parent object, and set label text.
 
MRVIEWER_API void make (Object &parent, const PositionedText &text, bool depthTest=false)
 Make not-pickable ancillary object, link it to parent object, and set label text.
 
MRVIEWER_API void reset ()
 detach owned object from parent, stops owning it
 
 ~AncillaryLabel ()
 detach owned object from parent, stops owning it
 
MRVIEWER_API void setText (const PositionedText &text)
 Set label text.
 
MRVIEWER_API void resetText ()
 Reset label text.
 
MRVIEWER_API void setDepthTest (bool depthTest)
 Set depth test.
 
MRVIEWER_API void setPosition (const Vector3f &pos)
 Set text position.
 

Static Public Member Functions

static MRVIEWER_API std::shared_ptr< ObjectLabelmakeDetached (const PositionedText &text, bool depthTest=false)
 Make not-pickable ancillary object without parent object, and set label text.
 

Public Attributes

std::shared_ptr< ObjectLabelobj
 

Detailed Description

Helper class to manage ancillary labels used by plugins.

Constructor & Destructor Documentation

◆ AncillaryLabel() [1/3]

MR::AncillaryLabel::AncillaryLabel ( )
default

◆ AncillaryLabel() [2/3]

MR::AncillaryLabel::AncillaryLabel ( AncillaryLabel && b)
inlinenoexcept

since this uniquely owns an ancillary object, we provide only move operations, not copy

◆ AncillaryLabel() [3/3]

MR::AncillaryLabel::AncillaryLabel ( Object & parent,
const PositionedText & text,
bool depthTest = false )
inlineexplicit

Make not-pickable ancillary object, link it to parent object, and set label text.

◆ ~AncillaryLabel()

MR::AncillaryLabel::~AncillaryLabel ( )
inline

detach owned object from parent, stops owning it

Member Function Documentation

◆ make()

MRVIEWER_API void MR::AncillaryLabel::make ( Object & parent,
const PositionedText & text,
bool depthTest = false )

Make not-pickable ancillary object, link it to parent object, and set label text.

◆ makeDetached()

static MRVIEWER_API std::shared_ptr< ObjectLabel > MR::AncillaryLabel::makeDetached ( const PositionedText & text,
bool depthTest = false )
static

Make not-pickable ancillary object without parent object, and set label text.

◆ operator=()

AncillaryLabel & MR::AncillaryLabel::operator= ( AncillaryLabel && b)
inline

◆ reset()

MRVIEWER_API void MR::AncillaryLabel::reset ( )

detach owned object from parent, stops owning it

◆ resetText()

MRVIEWER_API void MR::AncillaryLabel::resetText ( )

Reset label text.

◆ setDepthTest()

MRVIEWER_API void MR::AncillaryLabel::setDepthTest ( bool depthTest)

Set depth test.

◆ setPosition()

MRVIEWER_API void MR::AncillaryLabel::setPosition ( const Vector3f & pos)

Set text position.

◆ setText()

MRVIEWER_API void MR::AncillaryLabel::setText ( const PositionedText & text)

Set label text.

Member Data Documentation

◆ obj

std::shared_ptr<ObjectLabel> MR::AncillaryLabel::obj

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