AvogadroLibs 1.98.1
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TextLabelBase Class Reference

The TextLabelBase class provides a generic implementation of a text drawable.

#include <avogadro/rendering/textlabelbase.h>

Inheritance diagram for TextLabelBase:
Drawable TextLabel2D TextLabel3D

Public Member Functions

 TextLabelBase (const TextLabelBase &other)
 
TextLabelBaseoperator= (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 TextPropertiestextProperties () const
 
- Public Member Functions inherited from Drawable
 Drawable (const Drawable &other)
 
Drawableoperator= (Drawable)
 
virtual void accept (Visitor &)
 
const GeometryNodeparent () const
 Get a pointer to the drawable object's parent.
 
GeometryNodeparent ()
 
void setVisible (bool visibility)
 Set the visibility of the drawable object.
 
bool isVisible () const
 Get the current visibility of the drawable.
 
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
 

Protected Member Functions

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

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

◆ render()

void render ( const Camera camera)
overridevirtual
Parameters
cameraThe current Camera.

Reimplemented from Drawable.

◆ buildTexture()

void buildTexture ( const TextRenderStrategy tren)

Render the string to the internal texture buffer.

Parameters
trenThe text rendering strategy to use.

◆ setText()

void setText ( const std::string &  str)

The text that will be rendered.

◆ text()

const std::string & text ( ) const

The text that will be rendered.

◆ setTextProperties()

void setTextProperties ( const TextProperties tprop)

The properties of the rendered text.

◆ textProperties()

const TextProperties & textProperties ( ) const

The properties of the rendered text.

◆ resetTexture()

void resetTexture ( )

Clear the texture, forcing it to be regenerated on the next render.


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