AvogadroLibs  1.96.0
Public Member Functions | List of all members
TextLabel3D Class Reference

The TextLabel3D class renders billboarded text that is anchored to a point in world coordinates.

#include <avogadro/rendering/textlabel3d.h>

Inheritance diagram for TextLabel3D:
TextLabelBase Drawable

Public Member Functions

void accept (Visitor &) override
 
void setAnchor (const Vector3f &position)
 
Vector3f anchor () const
 
void setRadius (float r)
 
float radius () const
 
- Public Member Functions inherited from TextLabelBase
 TextLabelBase (const TextLabelBase &other)
 
TextLabelBaseoperator= (TextLabelBase other)
 
void render (const Camera &camera) override
 Render the contents of the drawable. More...
 
void buildTexture (const TextRenderStrategy &tren)
 
void resetTexture ()
 
void setText (const std::string &str)
 
const std::string & text () const
 
void setTextProperties (const TextProperties &tprop)
 
const TextPropertiestextProperties () const
 
- Public Member Functions inherited from Drawable
 Drawable (const Drawable &other)
 
Drawableoperator= (Drawable)
 
const GeometryNodeparent () const
 Get a pointer to the drawable object's parent. More...
 
GeometryNodeparent ()
 
void setVisible (bool visibility)
 Set the visibility of the drawable object. More...
 
bool isVisible () const
 Get the current visibility of the drawable. More...
 
Identifieridentifier ()
 
const Identifieridentifier () const
 
virtual std::multimap< float, Identifierhits (const Vector3f &rayOrigin, const Vector3f &rayEnd, const Vector3f &rayDirection) const
 
virtual Core::Array< IdentifierareaHits (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. More...
 
- 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
GeometryNodem_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 Vector3f &  position)

The anchor position in world coordinates.

◆ anchor()

Vector3f anchor ( ) const

The anchor position in world coordinates.

◆ setRadius()

void setRadius ( float  r)

The distance to project the label towards the camera from the anchor point. Useful for moving the label on top of, e.g. atom spheres. 0.f by default.

◆ radius()

float radius ( ) const

The distance to project the label towards the camera from the anchor point. Useful for moving the label on top of, e.g. atom spheres. 0.f by default.


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