##

MovableText Class Reference
Rendering

Movable text. More...

`#include <rendering/rendering.hh>`

Inherits MovableObject, and Renderable.

## Public Types

enum | HorizAlign { H_LEFT, H_CENTER }
| Horizontal alignment. More...
enum | VertAlign { V_BELOW, V_ABOVE }
| vertical alignment More...

## Public Member Functions

| MovableText ()
| Constructor. More...
virtual | ~MovableText ()
| Destructor. More...
ignition::math::Box | AABB ()
| Get the axis aligned bounding box of the text. More...
float | Baseline () const
| Get the baseline height in meters. More...
float | CharHeight () const
| Get the height of the characters in meters return Height of the characters. More...
const ignition::math::Color & | Color () const
| Get the text color. More...
const std::string & | FontName () const
| Get the font name. More...
float | GetBaseline () const GAZEBO_DEPRECATED(9.0)
| Get the baseline height in meters. More...
float | GetCharHeight () const GAZEBO_DEPRECATED(9.0)
| Get the height of the characters in meters return Height of the characters. More...
const common::Color | GetColor () const GAZEBO_DEPRECATED(9.0)
| Get the text color. More...
const std::string & | GetFont () const GAZEBO_DEPRECATED(9.0)
| Get the font name. More...
bool | GetShowOnTop () const GAZEBO_DEPRECATED(9.0)
| True = text is displayed on top. More...
float | GetSpaceWidth () const GAZEBO_DEPRECATED(9.0)
| Get the width of spaces between words. More...
const std::string & | GetText () const GAZEBO_DEPRECATED(9.0)
| Get the displayed text. More...
void | Load (const std::string &_name, const std::string &_text, const std::string &_fontName, float _charHeight, const common::Color &_color) GAZEBO_DEPRECATED(9.0)
| Loads text and font info. More...
void | Load (const std::string &_name, const std::string &_text, const std::string &_fontName="Arial", float _charHeight=1.0, const ignition::math::Color &_color=ignition::math::Color::White)
| Loads text and font info. More...
void | SetBaseline (const float _height)
| Set the baseline height of the text. More...
void | SetCharHeight (const float _height)
| Set the height of the character in meters. More...
void | SetColor (const common::Color &_color) GAZEBO_DEPRECATED(9.0)
| Set the text color. More...
void | SetColor (const ignition::math::Color &_color)
| Set the text color. More...
void | SetFontName (const std::string &_font)
| Set the font. More...
void | SetShowOnTop (const bool _show)
| True = text always is displayed ontop. More...
void | SetSpaceWidth (const float _width)
| Set the width of spaces between words. More...
void | SetText (const std::string &_text)
| Set the text to display. More...
void | SetTextAlignment (const HorizAlign &_hAlign, const VertAlign &_vAlign)
| Set the alignment of the text. More...
bool | ShowOnTop () const
| Get whether the is displayed above other objects. More...
float | SpaceWidth () const
| Get the width of spaces between words. More...
const std::string & | Text () const
| Get the displayed text. More...
void | Update ()
| Update the text. More...
virtual void | visitRenderables (Ogre::Renderable::Visitor *_visitor, bool _debug=false) override

## Protected Member Functions

void | _setupGeometry () GAZEBO_DEPRECATED(9.0)
| Setup the geometry. More...
void | _updateColors () GAZEBO_DEPRECATED(9.0)
| Update colors. More...
float | getBoundingRadius () const override
const Ogre::LightList & | getLights () const override
const Ogre::MaterialPtr & | getMaterial () const override
void | getRenderOperation (Ogre::RenderOperation &_op) override
float | getSquaredViewDepth (const Ogre::Camera *_cam) const override
void | getWorldTransforms (Ogre::Matrix4 *_xform) const override
void | SetupGeometry ()
| Setup the geometry. More...
void | UpdateColors ()
| Update colors. More...

## Detailed Description

Movable text.

## Member Enumeration Documentation

## HorizAlign

enum HorizAlign

Horizontal alignment.

Enumerator
H_LEFT | Left alignment.
H_CENTER | Center alignment.

## VertAlign

enum VertAlign

vertical alignment

Enumerator
V_BELOW | Align below.
V_ABOVE | Align above.

## Constructor & Destructor Documentation

## MovableText()

MovableText | ( |  | ) |

Constructor.

## ~MovableText()

virtual ~MovableText | ( |  | ) |

virtual

Destructor.

## Member Function Documentation

## _setupGeometry()

void _setupGeometry | ( |  | ) |

protected

Setup the geometry.

Deprecated:
  Use SetupGeometry instead

## _updateColors()

void _updateColors | ( |  | ) |

protected

Update colors.

Deprecated:
  Use UpdateColors instead

## AABB()

ignition::math::Box AABB | ( |  | ) |

Get the axis aligned bounding box of the text.

Returns
  The axis aligned bounding box.

## Baseline()

float Baseline | ( |  | ) | const

Get the baseline height in meters.

Returns
  Baseline height

See also
  SetBaseline()

## CharHeight()

float CharHeight | ( |  | ) | const

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

See also
  SetCharHeight()

## Color()

const ignition::math::Color& Color | ( |  | ) | const

Get the text color.

Returns
  Text color.

See also
  SetColor()

## FontName()

const std::string& FontName | ( |  | ) | const

Get the font name.

Returns
  The font name.

See also
  SetFontName()

## GetBaseline()

float GetBaseline | ( |  | ) | const

Get the baseline height in meters.

Returns
  Baseline height

Deprecated:
  See Baseline().

## getBoundingRadius()

float getBoundingRadius | ( |  | ) | const

override protected

## GetCharHeight()

float GetCharHeight | ( |  | ) | const

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

Deprecated:
  See CharHeight.

## GetColor()

const common::Color GetColor | ( |  | ) | const

Get the text color.

Returns
  Texture color.

Deprecated:
  See function that returns ignition::math::Color.

## GetFont()

const std::string& GetFont | ( |  | ) | const

Get the font name.

Returns
  The font name

Deprecated:
  See FontName()

## getLights()

const Ogre::LightList& getLights | ( |  | ) | const

override protected

## getMaterial()

const Ogre::MaterialPtr& getMaterial | ( |  | ) | const

override protected

## getRenderOperation()

void getRenderOperation | ( | Ogre::RenderOperation & | _op | ) |

override protected

## GetShowOnTop()

bool GetShowOnTop | ( |  | ) | const

True = text is displayed on top.

Returns
  True if MovableText::SetShownOnTop(true) was called.

Deprecated:
  See ShowOnTop().

## GetSpaceWidth()

float GetSpaceWidth | ( |  | ) | const

Get the width of spaces between words.

Returns
  Space width

Deprecated:
  See SpaceWidth()

## getSquaredViewDepth()

float getSquaredViewDepth | ( | const Ogre::Camera * | _cam | ) | const

override protected

## GetText()

const std::string& GetText | ( |  | ) | const

Get the displayed text.

Returns
  The displayed text.

Deprecated:
  See Text()

## getWorldTransforms()

void getWorldTransforms | ( | Ogre::Matrix4 * | _xform | ) | const

override protected

## Load() [1/2]

void Load | ( | const std::string & | _name,
|  | const std::string & | _text,
|  | const std::string & | _fontName,
|  | float | _charHeight,
|  | const common::Color & | _color
| ) |  |

Loads text and font info.

Parameters

  [in] | _name | Name of the text object
  [in] | _text | Text to render
  [in] | _fontName | Font to use
  [in] | _charHeight | Height of the characters
  [in] | _color | Text color

Deprecated:
  See function that accepts ignition::math::Color.

## Load() [2/2]

void Load | ( | const std::string & | _name,
|  | const std::string & | _text,
|  | const std::string & | _fontName = `"Arial"`,
|  | float | _charHeight = `1.0`,
|  | const ignition::math::Color & | _color = `ignition::math::Color::White`
| ) |  |

Loads text and font info.

Parameters

  [in] | _name | Name of the text object
  [in] | _text | Text to render
  [in] | _fontName | Font to use
  [in] | _charHeight | Height of the characters
  [in] | _color | Text color

## SetBaseline()

void SetBaseline | ( | const float | _height | ) |

Set the baseline height of the text.

Parameters

  [in] | _height | Baseline height

See also
  Baseline()

## SetCharHeight()

void SetCharHeight | ( | const float | _height | ) |

Set the height of the character in meters.

Parameters

  [in] | _height | Height of the characters.

See also
  CharHeight()

## SetColor() [1/2]

void SetColor | ( | const common::Color & | _color | ) |

Set the text color.

Parameters

  [in] | _color | Text color.

Deprecated:
  See function that accepts ignition::math::Color.

## SetColor() [2/2]

void SetColor | ( | const ignition::math::Color & | _color | ) |

Set the text color.

Parameters

  [in] | _color | Text color.

See also
  Color()

## SetFontName()

void SetFontName | ( | const std::string & | _font | ) |

Set the font.

Valid fonts are defined on media/fonts/Gazebo.fontdef

Parameters

  [in] | _font | Name of the font

See also
  FontName()

## SetShowOnTop()

void SetShowOnTop | ( | const bool | _show | ) |

True = text always is displayed ontop.

Parameters

  [in] | _show | Set to true to render the text on top of all other drawables.

See also
  ShowOnTop()

## SetSpaceWidth()

void SetSpaceWidth | ( | const float | _width | ) |

Set the width of spaces between words.

Parameters

  [in] | _width | Space width

See also
  SpaceWidth()

## SetText()

void SetText | ( | const std::string & | _text | ) |

Set the text to display.

Parameters

  [in] | _text | The text to display.

See also
  Text()

## SetTextAlignment()

void SetTextAlignment | ( | const HorizAlign & | _hAlign,
|  | const VertAlign & | _vAlign
| ) |  |

Set the alignment of the text.

Parameters

  [in] | _hAlign | Horizontal alignment
  [in] | _vAlign | Vertical alignment

## SetupGeometry()

void SetupGeometry | ( |  | ) |

protected

Setup the geometry.

## ShowOnTop()

bool ShowOnTop | ( |  | ) | const

Get whether the is displayed above other objects.

Returns
  True if it is on top.

See also
  SetShowOnTop()

## SpaceWidth()

float SpaceWidth | ( |  | ) | const

Get the width of spaces between words.

Returns
  Space width

See also
  SetSpaceWidth()

## Text()

const std::string& Text | ( |  | ) | const

Get the displayed text.

Returns
  The displayed text.

See also
  SetText()

## Update()

void Update | ( |  | ) |

Update the text.

## UpdateColors()

void UpdateColors | ( |  | ) |

protected

Update colors.

## visitRenderables()

virtual void visitRenderables | ( | Ogre::Renderable::Visitor * | _visitor,
|  | bool | _debug = `false`
| ) |  |

override virtual

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

- MovableText.hh