All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Protected Member Functions | List of all members
gazebo::rendering::MovableText Class Reference

Movable text. More...

#include <rendering/rendering.hh>

Inheritance diagram for gazebo::rendering::MovableText:
Inheritance graph
[legend]

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...
 
math::Box GetAABB ()
 Get the axis aligned bounding box of the text. More...
 
float GetBaseline () const
 Get the baseline height. More...
 
float GetCharHeight () const
 Set the height of a characters return Height of the characters. More...
 
const common::ColorGetColor () const
 Get the text color. More...
 
const std::string & GetFont () const
 Get the font. More...
 
bool GetShowOnTop () const
 True = text is displayed on top. More...
 
float GetSpaceWidth () const
 Get the width of a space. More...
 
const std::string & GetText () const
 Get the displayed text. More...
 
void Load (const std::string &_name, const std::string &_text, const std::string &_fontName="Arial", float _charHeight=1.0, const common::Color &_color=common::Color::White)
 Loads text and font info. More...
 
void SetBaseline (float _height)
 Set the baseline height of the text. More...
 
void SetCharHeight (float _height)
 Set the height of a character. More...
 
void SetColor (const common::Color &_color)
 Set the text color. More...
 
void SetFontName (const std::string &_font)
 Set the font. More...
 
void SetShowOnTop (bool _show)
 True = text always is displayed ontop. More...
 
void SetSpaceWidth (float _width)
 Set the width of a space. 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...
 
void Update ()
 Update the text. More...
 
virtual void visitRenderables (Ogre::Renderable::Visitor *_visitor, bool _debug=false)
 

Protected Member Functions

void _setupGeometry ()
 
void _updateColors ()
 
float getBoundingRadius () const
 
const Ogre::LightList & getLights (void) const
 
const Ogre::MaterialPtr & getMaterial (void) const
 
void getRenderOperation (Ogre::RenderOperation &op)
 
float getSquaredViewDepth (const Ogre::Camera *cam) const
 
void getWorldTransforms (Ogre::Matrix4 *xform) const
 

Detailed Description

Movable text.

Member Enumeration Documentation

Horizontal alignment.

Enumerator
H_LEFT 

Left alignment.

H_CENTER 

Center alignment.

vertical alignment

Enumerator
V_BELOW 

Align below.

V_ABOVE 

Align above.

Constructor & Destructor Documentation

gazebo::rendering::MovableText::MovableText ( )

Constructor.

virtual gazebo::rendering::MovableText::~MovableText ( )
virtual

Destructor.

Member Function Documentation

void gazebo::rendering::MovableText::_setupGeometry ( )
protected
void gazebo::rendering::MovableText::_updateColors ( )
protected
math::Box gazebo::rendering::MovableText::GetAABB ( )

Get the axis aligned bounding box of the text.

Returns
The axis aligned bounding box.
float gazebo::rendering::MovableText::GetBaseline ( ) const

Get the baseline height.

Returns
Baseline height
float gazebo::rendering::MovableText::getBoundingRadius ( ) const
protected
float gazebo::rendering::MovableText::GetCharHeight ( ) const

Set the height of a characters return Height of the characters.

const common::Color& gazebo::rendering::MovableText::GetColor ( ) const

Get the text color.

Returns
Texture color.
const std::string& gazebo::rendering::MovableText::GetFont ( ) const

Get the font.

Returns
The font name
const Ogre::LightList& gazebo::rendering::MovableText::getLights ( void  ) const
protected
const Ogre::MaterialPtr& gazebo::rendering::MovableText::getMaterial ( void  ) const
protected
void gazebo::rendering::MovableText::getRenderOperation ( Ogre::RenderOperation &  op)
protected
bool gazebo::rendering::MovableText::GetShowOnTop ( ) const

True = text is displayed on top.

Returns
True if MovableText::SetShownOnTop(true) was called.
float gazebo::rendering::MovableText::GetSpaceWidth ( ) const

Get the width of a space.

Returns
Space width
float gazebo::rendering::MovableText::getSquaredViewDepth ( const Ogre::Camera *  cam) const
protected
const std::string& gazebo::rendering::MovableText::GetText ( ) const

Get the displayed text.

Returns
The displayed text.
void gazebo::rendering::MovableText::getWorldTransforms ( Ogre::Matrix4 *  xform) const
protected
void gazebo::rendering::MovableText::Load ( const std::string &  _name,
const std::string &  _text,
const std::string &  _fontName = "Arial",
float  _charHeight = 1.0,
const common::Color _color = common::Color::White 
)

Loads text and font info.

Parameters
[in]_nameName of the text object
[in]_textText to render
[in]_fontNameFont to use
[in]_charHeightHeight of the characters
[in]_colorText color
void gazebo::rendering::MovableText::SetBaseline ( float  _height)

Set the baseline height of the text.

Parameters
[in]_heightBaseline height
void gazebo::rendering::MovableText::SetCharHeight ( float  _height)

Set the height of a character.

Parameters
[in]_heightHeight of the characters.
void gazebo::rendering::MovableText::SetColor ( const common::Color _color)

Set the text color.

Parameters
[in]_colorText color.
void gazebo::rendering::MovableText::SetFontName ( const std::string &  _font)

Set the font.

Parameters
[in]_fontName of the font
void gazebo::rendering::MovableText::SetShowOnTop ( bool  _show)

True = text always is displayed ontop.

Parameters
[in]_showSet to true to render the text on top of all other drawables.
void gazebo::rendering::MovableText::SetSpaceWidth ( float  _width)

Set the width of a space.

Parameters
[in]_widthspace width
void gazebo::rendering::MovableText::SetText ( const std::string &  _text)

Set the text to display.

Parameters
[in]_textThe text to display.
void gazebo::rendering::MovableText::SetTextAlignment ( const HorizAlign _hAlign,
const VertAlign _vAlign 
)

Set the alignment of the text.

Parameters
[in]_hAlignHorizontal alignment
[in]_vAlignVertical alignment
void gazebo::rendering::MovableText::Update ( )

Update the text.

virtual void gazebo::rendering::MovableText::visitRenderables ( Ogre::Renderable::Visitor *  _visitor,
bool  _debug = false 
)
virtual

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