Gazebo Rendering

API Reference

3.7.2
Text Class Referenceabstract

Represents a billboard text geometry that is always facing the camera. More...

#include <ignition/rendering/Text>

Public Member Functions

 Text ()=default
 Constructor. More...
 
virtual ~Text ()=default
 Destructor. More...
 
virtual gz::math::AxisAlignedBox AABB () const =0
 Get the axis aligned bounding box of the text. More...
 
virtual float Baseline () const =0
 Get the baseline height in meters. More...
 
virtual float CharHeight () const =0
 Get the height of the characters in meters return Height of the characters. More...
 
virtual gz::math::Color Color () const =0
 Get the text color. More...
 
virtual std::string FontName () const =0
 Get the font name. More...
 
virtual TextHorizontalAlign HorizontalAlignment () const =0
 Get the horizontal alignment of the text. More...
 
virtual void SetBaseline (const float _baseline)=0
 Set the baseline height of the text. More...
 
virtual void SetCharHeight (const float _height)=0
 Set the height of the character in meters. More...
 
virtual void SetColor (const gz::math::Color &_color)=0
 Set the text color. More...
 
virtual void SetFontName (const std::string &_font)=0
 Set the font. More...
 
virtual void SetShowOnTop (const bool _onTop)=0
 True = text always is displayed ontop. More...
 
virtual void SetSpaceWidth (const float _width)=0
 Set the width of spaces between words. More...
 
virtual void SetTextAlignment (const TextHorizontalAlign &_hAlign, const TextVerticalAlign &_vAlign)=0
 Set the alignment of the text. More...
 
virtual void SetTextString (const std::string &_text)=0
 Set the text to display. More...
 
virtual bool ShowOnTop () const =0
 Get whether the is displayed above other objects. More...
 
virtual float SpaceWidth () const =0
 Get the width of spaces between words. More...
 
virtual std::string TextString () const =0
 Get the displayed text. More...
 
virtual TextVerticalAlign VerticalAlignment () const =0
 Get the vertical alignment of the text. More...
 
- Public Member Functions inherited from Geometry
virtual ~Geometry ()
 Deconstructor. More...
 
virtual bool HasParent () const =0
 Determine if this Geometry is attached to a Visual. More...
 
virtual MaterialPtr Material () const =0
 Get the material of this geometry. More...
 
virtual VisualPtr Parent () const =0
 Get the parent Visual. More...
 
virtual void RemoveParent ()=0
 Detach this Geometry from its parent Visual. If this Geometry does not have a parent, no work will be done. More...
 
virtual void SetMaterial (const std::string &_name, bool _unique=true)=0
 Set the materials of this Geometry. The specified material will be retrieved from the parent Scene. If no material is registered by the given name, no work will be done. More...
 
virtual void SetMaterial (MaterialPtr _material, bool _unique=true)=0
 Set the materials of this Geometry. More...
 
- Public Member Functions inherited from Object
virtual ~Object ()
 Destructor. More...
 
virtual void Destroy ()=0
 Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior. More...
 
virtual unsigned int Id () const =0
 Get the object ID. This ID will be unique across all objects inside a given scene, but necessarily true for objects across different scenes. More...
 
virtual std::string Name () const =0
 Get the object name. This name will be unique across all objects inside a given scene, but necessarily true for objects across different scenes. More...
 
virtual void PostRender ()=0
 Post process this object and any of its children after rendering. More...
 
virtual void PreRender ()=0
 Prepare this object and any of its children for rendering. This should be called for each object in a scene just before rendering, which can be achieved by a single call to Scene::PreRender. More...
 
virtual ScenePtr Scene () const =0
 Get the Scene that created this object. More...
 

Detailed Description

Represents a billboard text geometry that is always facing the camera.

Constructor & Destructor Documentation

◆ Text()

Text ( )
default

Constructor.

◆ ~Text()

virtual ~Text ( )
virtualdefault

Destructor.

Member Function Documentation

◆ AABB()

virtual gz::math::AxisAlignedBox AABB ( ) const
pure virtual

Get the axis aligned bounding box of the text.

Returns
The axis aligned bounding box.

Implemented in BaseText< T >, and OgreText.

◆ Baseline()

virtual float Baseline ( ) const
pure virtual

Get the baseline height in meters.

Returns
Baseline height
See also
SetBaseline()

Implemented in BaseText< T >.

◆ CharHeight()

virtual float CharHeight ( ) const
pure virtual

Get the height of the characters in meters return Height of the characters.

See also
SetCharHeight()

Implemented in BaseText< T >.

◆ Color()

virtual gz::math::Color Color ( ) const
pure virtual

Get the text color.

Returns
Text color.
See also
SetColor()

Implemented in BaseText< T >.

◆ FontName()

virtual std::string FontName ( ) const
pure virtual

Get the font name.

Returns
The font name.
See also
SetFontName()

Implemented in BaseText< T >.

◆ HorizontalAlignment()

virtual TextHorizontalAlign HorizontalAlignment ( ) const
pure virtual

Get the horizontal alignment of the text.

Returns
Text horizontal alignment

Implemented in BaseText< T >.

◆ SetBaseline()

virtual void SetBaseline ( const float  _baseline)
pure virtual

Set the baseline height of the text.

Parameters
[in]_baselineBaseline height
See also
Baseline()

Implemented in BaseText< T >, BaseText< OgreGeometry >, and OgreText.

◆ SetCharHeight()

virtual void SetCharHeight ( const float  _height)
pure virtual

Set the height of the character in meters.

Parameters
[in]_heightHeight of the characters.
See also
CharHeight()

Implemented in OgreText, BaseText< T >, and BaseText< OgreGeometry >.

◆ SetColor()

virtual void SetColor ( const gz::math::Color &  _color)
pure virtual

Set the text color.

Parameters
[in]_colorText color.
See also
Color()

Implemented in OgreText, BaseText< T >, and BaseText< OgreGeometry >.

◆ SetFontName()

virtual void SetFontName ( const std::string _font)
pure virtual

Set the font.

Parameters
[in]_fontName of the font
See also
FontName()

Implemented in OgreText, BaseText< T >, and BaseText< OgreGeometry >.

◆ SetShowOnTop()

virtual void SetShowOnTop ( const bool  _onTop)
pure virtual

True = text always is displayed ontop.

Parameters
[in]_onTopSet to true to render the text on top of all other drawables.
See also
ShowOnTop()

Implemented in BaseText< T >, BaseText< OgreGeometry >, and OgreText.

◆ SetSpaceWidth()

virtual void SetSpaceWidth ( const float  _width)
pure virtual

Set the width of spaces between words.

Parameters
[in]_widthSpace width
See also
SpaceWidth()

Implemented in OgreText, BaseText< T >, and BaseText< OgreGeometry >.

◆ SetTextAlignment()

virtual void SetTextAlignment ( const TextHorizontalAlign _hAlign,
const TextVerticalAlign _vAlign 
)
pure virtual

Set the alignment of the text.

Parameters
[in]_hAlignHorizontal alignment
[in]_vAlignVertical alignment

Implemented in OgreText, BaseText< T >, and BaseText< OgreGeometry >.

◆ SetTextString()

virtual void SetTextString ( const std::string _text)
pure virtual

Set the text to display.

Parameters
[in]_textThe text to display.
See also
Text()

Implemented in OgreText, BaseText< T >, and BaseText< OgreGeometry >.

◆ ShowOnTop()

virtual bool ShowOnTop ( ) const
pure virtual

Get whether the is displayed above other objects.

Returns
True if it is on top.
See also
SetShowOnTop()

Implemented in BaseText< T >.

◆ SpaceWidth()

virtual float SpaceWidth ( ) const
pure virtual

Get the width of spaces between words.

Returns
Space width
See also
SetSpaceWidth()

Implemented in BaseText< T >.

◆ TextString()

virtual std::string TextString ( ) const
pure virtual

Get the displayed text.

Returns
The displayed text.
See also
SetText()

Implemented in BaseText< T >.

◆ VerticalAlignment()

virtual TextVerticalAlign VerticalAlignment ( ) const
pure virtual

Get the vertical alignment of the text.

Returns
Text verical alignment

Implemented in BaseText< T >.


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