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... | |
Movable text.
enum HorizAlign |
enum VertAlign |
MovableText | ( | ) |
Constructor.
|
virtual |
Destructor.
|
protected |
Setup the geometry.
|
protected |
Update colors.
ignition::math::Box AABB | ( | ) |
Get the axis aligned bounding box of the text.
float Baseline | ( | ) | const |
float CharHeight | ( | ) | const |
Get the height of the characters in meters return Height of the characters.
const ignition::math::Color& Color | ( | ) | const |
const std::string& FontName | ( | ) | const |
float GetBaseline | ( | ) | const |
|
overrideprotected |
float GetCharHeight | ( | ) | const |
Get the height of the characters in meters return Height of the characters.
const common::Color GetColor | ( | ) | const |
Get the text color.
const std::string& GetFont | ( | ) | const |
|
overrideprotected |
|
overrideprotected |
|
overrideprotected |
bool GetShowOnTop | ( | ) | const |
True = text is displayed on top.
float GetSpaceWidth | ( | ) | const |
|
overrideprotected |
const std::string& GetText | ( | ) | const |
|
overrideprotected |
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.
[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 |
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.
[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 |
void SetBaseline | ( | const float | _height | ) |
void SetCharHeight | ( | const float | _height | ) |
Set the height of the character in meters.
[in] | _height | Height of the characters. |
void SetColor | ( | const common::Color & | _color | ) |
Set the text color.
[in] | _color | Text color. |
void SetColor | ( | const ignition::math::Color & | _color | ) |
void SetFontName | ( | const std::string & | _font | ) |
Set the font.
Valid fonts are defined on media/fonts/Gazebo.fontdef
[in] | _font | Name of the font |
void SetShowOnTop | ( | const bool | _show | ) |
True = text always is displayed ontop.
[in] | _show | Set to true to render the text on top of all other drawables. |
void SetSpaceWidth | ( | const float | _width | ) |
void SetText | ( | const std::string & | _text | ) |
void SetTextAlignment | ( | const HorizAlign & | _hAlign, |
const VertAlign & | _vAlign | ||
) |
Set the alignment of the text.
[in] | _hAlign | Horizontal alignment |
[in] | _vAlign | Vertical alignment |
|
protected |
Setup the geometry.
bool ShowOnTop | ( | ) | const |
Get whether the is displayed above other objects.
float SpaceWidth | ( | ) | const |
const std::string& Text | ( | ) | const |
void Update | ( | ) |
Update the text.
|
protected |
Update colors.
|
overridevirtual |