Gazebo Rendering

API Reference

6.6.3

Ogre implementation of text geometry. More...

#include <OgreText.hh>

Public Member Functions

virtual ~OgreText ()
 Destructor. More...
 
virtual gz::math::AxisAlignedBox AABB () const override
 Get the axis aligned bounding box of the text. More...
 
virtual void Init () override
 
virtual MaterialPtr Material () const override
 Get the material of this geometry. More...
 
virtual Ogre::MovableObject * OgreObject () const override
 
virtual void PreRender () override
 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 void SetBaseline (const float _baseline) override
 Set the baseline height of the text. More...
 
virtual void SetCharHeight (const float _height) override
 Set the height of the character in meters. More...
 
virtual void SetColor (const gz::math::Color &_color) override
 Set the text color. More...
 
virtual void SetFontName (const std::string &_font) override
 Set the font. More...
 
virtual void SetMaterial (MaterialPtr _material, bool _unique) override
 Set the materials of this Geometry. More...
 
virtual void SetShowOnTop (const bool _onTop) override
 True = text always is displayed ontop. More...
 
virtual void SetSpaceWidth (const float _width) override
 Set the width of spaces between words. More...
 
virtual void SetTextAlignment (const TextHorizontalAlign &_horizAlign, const TextVerticalAlign &_vertAlign) override
 Set the alignment of the text. More...
 
virtual void SetTextString (const std::string &_text) override
 Set the text to display. More...
 
- Public Member Functions inherited from BaseText< OgreGeometry >
virtual ~BaseText ()
 Destructor. More...
 
virtual gz::math::AxisAlignedBox AABB () const override
 Get the axis aligned bounding box of the text. More...
 
virtual float Baseline () const override
 Get the baseline height in meters. More...
 
virtual float CharHeight () const override
 Get the height of the characters in meters return Height of the characters. More...
 
virtual gz::math::Color Color () const override
 Get the text color. More...
 
virtual void Destroy () override
 Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior. More...
 
std::string FontName () const override
 Get the font name. More...
 
virtual TextHorizontalAlign HorizontalAlignment () const override
 Get the horizontal alignment of the text. More...
 
void SetFontName (const std::string &_font) override
 Set the font. More...
 
void SetShowOnTop (const bool _onTop) override
 True = text always is displayed ontop. More...
 
virtual bool ShowOnTop () const override
 Get whether the is displayed above other objects. More...
 
virtual float SpaceWidth () const override
 Get the width of spaces between words. More...
 
virtual std::string TextString () const override
 Get the displayed text. More...
 
virtual TextVerticalAlign VerticalAlignment () const override
 Get the vertical alignment of the text. More...
 
- Public Member Functions inherited from Text
 Text ()=default
 Constructor. More...
 
virtual ~Text ()=default
 Destructor. 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 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 GeometryPtr Clone () const =0
 Clone the geometry. More...
 
- Public Member Functions inherited from Object
virtual ~Object ()
 Destructor. 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 ScenePtr Scene () const =0
 Get the Scene that created this object. More...
 
- Public Member Functions inherited from OgreGeometry
virtual ~OgreGeometry ()
 
virtual bool HasParent () const
 Determine if this Geometry is attached to a Visual. More...
 
virtual VisualPtr Parent () const
 Get the parent Visual. More...
 
- Public Member Functions inherited from BaseGeometry< OgreObject >
virtual ~BaseGeometry ()
 
virtual GeometryPtr Clone () const override
 Clone the geometry. More...
 
virtual VisualPtr Parent () const override=0
 Get the parent Visual. More...
 
virtual void RemoveParent () override
 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 &_material, bool _unique=true) override
 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...
 
- Public Member Functions inherited from OgreObject
virtual ~OgreObject ()
 
virtual ScenePtr Scene () const
 
- Public Member Functions inherited from BaseObject
virtual ~BaseObject ()
 
virtual unsigned int Id () const override
 
virtual std::string Name () const override
 
virtual void PostRender () override
 

Protected Member Functions

 OgreText ()
 Constructor. More...
 
virtual void SetMaterialImpl (OgreMaterialPtr _material)
 Set material to text geometry. More...
 
- Protected Member Functions inherited from BaseText< OgreGeometry >
 BaseText ()
 Constructor. More...
 
- Protected Member Functions inherited from OgreGeometry
 OgreGeometry ()
 
virtual void SetParent (OgreVisualPtr _parent)
 
- Protected Member Functions inherited from BaseGeometry< OgreObject >
 BaseGeometry ()
 
- Protected Member Functions inherited from OgreObject
 OgreObject ()
 
- Protected Member Functions inherited from BaseObject
 BaseObject ()
 
virtual void Load ()
 

Additional Inherited Members

- Protected Attributes inherited from BaseText< OgreGeometry >
float baseline
 Baseline height in meters. More...
 
float charHeight
 Character height in meters. More...
 
gz::math::Color color
 Text color. More...
 
std::string fontName
 Font name, such as "Liberation Sans". More...
 
TextHorizontalAlign horizontalAlign
 Horizontal alignment. More...
 
bool onTop
 True for text to be displayed on top of other objects in the scene. More...
 
float spaceWidth
 Width of space between letters. More...
 
std::string text
 Text being displayed. More...
 
bool textDirty
 Flag to indicate text properties have changed. More...
 
TextVerticalAlign verticalAlign
 Vertical alignment. More...
 
- Protected Attributes inherited from OgreGeometry
OgreVisualPtr parent
 
- Protected Attributes inherited from OgreObject
OgreScenePtr scene
 
- Protected Attributes inherited from BaseObject
unsigned int id
 
std::string name
 

Detailed Description

Ogre implementation of text geometry.

Constructor & Destructor Documentation

◆ OgreText()

OgreText ( )
protected

Constructor.

◆ ~OgreText()

virtual ~OgreText ( )
virtual

Destructor.

Member Function Documentation

◆ AABB()

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

Get the axis aligned bounding box of the text.

Returns
The axis aligned bounding box.

Implements Text.

◆ Init()

virtual void Init ( )
overridevirtual

Reimplemented from BaseObject.

◆ Material()

virtual MaterialPtr Material ( ) const
overridevirtual

Get the material of this geometry.

Returns
Material used by this geometry

Implements Geometry.

◆ OgreObject()

virtual Ogre::MovableObject* OgreObject ( ) const
overridevirtual

Implements OgreGeometry.

◆ PreRender()

virtual void PreRender ( )
overridevirtual

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.

Reimplemented from BaseText< OgreGeometry >.

◆ SetBaseline()

virtual void SetBaseline ( const float  _baseline)
overridevirtual

Set the baseline height of the text.

Parameters
[in]_baselineBaseline height
See also
Baseline()

Reimplemented from BaseText< OgreGeometry >.

◆ SetCharHeight()

virtual void SetCharHeight ( const float  _height)
overridevirtual

Set the height of the character in meters.

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

Reimplemented from BaseText< OgreGeometry >.

◆ SetColor()

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

Set the text color.

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

Reimplemented from BaseText< OgreGeometry >.

◆ SetFontName()

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

Set the font.

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

Implements Text.

◆ SetMaterial()

virtual void SetMaterial ( MaterialPtr  _material,
bool  _unique 
)
overridevirtual

Set the materials of this Geometry.

Parameters
[in]_materialNew Material to be assigned
[in]_uniqueTrue if the given material should be cloned

Implements Geometry.

◆ SetMaterialImpl()

virtual void SetMaterialImpl ( OgreMaterialPtr  _material)
protectedvirtual

Set material to text geometry.

Parameters
[in]_materialOgre material.

◆ SetShowOnTop()

virtual void SetShowOnTop ( const bool  _onTop)
overridevirtual

True = text always is displayed ontop.

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

Implements Text.

◆ SetSpaceWidth()

virtual void SetSpaceWidth ( const float  _width)
overridevirtual

Set the width of spaces between words.

Parameters
[in]_widthSpace width
See also
SpaceWidth()

Reimplemented from BaseText< OgreGeometry >.

◆ SetTextAlignment()

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

Set the alignment of the text.

Parameters
[in]_hAlignHorizontal alignment
[in]_vAlignVertical alignment

Reimplemented from BaseText< OgreGeometry >.

◆ SetTextString()

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

Set the text to display.

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

Reimplemented from BaseText< OgreGeometry >.


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