AvogadroLibs 1.103.0
Loading...
Searching...
No Matches
TextLabel2D Class Reference

The TextLabel2D class renders text in an overlay plane, anchored to a point in window coordinates.

#include <avogadro/rendering/textlabel2d.h>

Inheritance diagram for TextLabel2D:
TextLabelBase Drawable

Public Member Functions

void accept (Visitor &) override
void setAnchor (const Vector2i &windowCoords)
Vector2i anchor () const
Public Member Functions inherited from TextLabelBase
 TextLabelBase (const TextLabelBase &other)
TextLabelBase & operator= (TextLabelBase other)
void render (const Camera &camera) override
 Render the contents of the drawable.
void buildTexture (const TextRenderStrategy &tren)
void resetTexture ()
void setText (const std::string &str)
const std::string & text () const
void setTextProperties (const TextProperties &tprop)
const TextProperties & textProperties () const
Public Member Functions inherited from Drawable
 Drawable (const Drawable &other)
Drawable & operator= (Drawable)
const GeometryNode * parent () const
 Get a pointer to the drawable object's parent.
GeometryNode * parent ()
void setVisible (bool visibility)
 Set the visibility of the drawable object.
bool isVisible () const
 Get the current visibility of the drawable.
Identifier & identifier ()
const Identifier & identifier () const
virtual std::multimap< float, Identifier > hits (const Vector3f &rayOrigin, const Vector3f &rayEnd, const Vector3f &rayDirection) const
virtual Core::Array< Identifier > areaHits (const Frustrum &f) const
virtual void clear ()
void setRenderPass (RenderPass pass)
RenderPass renderPass () const

Additional Inherited Members

Protected Member Functions inherited from TextLabelBase
void setAnchorInternal (const Vector3f &anchor)
Vector3f getAnchorInternal () const
void setRadiusInternal (float radius)
float getRadiusInternal () const
void markDirty ()
Protected Member Functions inherited from Drawable
void setParent (GeometryNode *parent)
 Set the parent node for the node.
Protected Attributes inherited from TextLabelBase
std::string m_text
TextProperties m_textProperties
Vector2i m_imageDimensions
Core::Array< unsigned char > m_imageRgba
Protected Attributes inherited from Drawable
GeometryNode * m_parent
bool m_visible
RenderPass m_renderPass
Identifier m_identifier

Member Function Documentation

◆ accept()

void accept ( Visitor & )
overridevirtual

Accept a visit from our friendly visitor.

Reimplemented from Drawable.

◆ setAnchor()

void setAnchor ( const Vector2i & windowCoords)

The anchor point in window coordinates, taking the origin at the upper-left corner.

◆ anchor()

Vector2i anchor ( ) const

The anchor point in window coordinates, taking the origin at the upper-left corner.


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