Ogre implementation of text geometry. More...
#include <OgreText.hh>
Public Member Functions | |
virtual | ~OgreText () |
Destructor. | |
virtual gz::math::AxisAlignedBox | AABB () const override |
Get the axis aligned bounding box of the text. | |
virtual void | Init () override |
virtual MaterialPtr | Material () const override |
Get the material of this geometry. | |
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. | |
virtual void | SetBaseline (const float _baseline) override |
Set the baseline height of the text. | |
virtual void | SetCharHeight (const float _height) override |
Set the height of the character in meters. | |
virtual void | SetColor (const gz::math::Color &_color) override |
Set the text color. | |
virtual void | SetFontName (const std::string &_font) override |
Set the font. | |
virtual void | SetMaterial (MaterialPtr _material, bool _unique) override |
Set the materials of this Geometry. | |
virtual void | SetShowOnTop (const bool _onTop) override |
True = text always is displayed ontop. | |
virtual void | SetSpaceWidth (const float _width) override |
Set the width of spaces between words. | |
virtual void | SetTextAlignment (const TextHorizontalAlign &_horizAlign, const TextVerticalAlign &_vertAlign) override |
Set the alignment of the text. | |
virtual void | SetTextString (const std::string &_text) override |
Set the text to display. | |
Public Member Functions inherited from BaseText< OgreGeometry > | |
virtual | ~BaseText () |
Destructor. | |
virtual float | Baseline () const override |
Get the baseline height in meters. | |
virtual float | CharHeight () const override |
Get the height of the characters in meters return Height of the characters. | |
virtual gz::math::Color | Color () const override |
Get the text color. | |
virtual void | Destroy () override |
Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior. | |
std::string | FontName () const override |
Get the font name. | |
virtual TextHorizontalAlign | HorizontalAlignment () const override |
Get the horizontal alignment of the text. | |
virtual bool | ShowOnTop () const override |
Get whether the is displayed above other objects. | |
virtual float | SpaceWidth () const override |
Get the width of spaces between words. | |
virtual std::string | TextString () const override |
Get the displayed text. | |
virtual TextVerticalAlign | VerticalAlignment () const override |
Get the vertical alignment of the text. | |
Public Member Functions inherited from Text | |
Text ()=default | |
Constructor. | |
virtual | ~Text () |
Destructor. | |
Public Member Functions inherited from Geometry | |
virtual | ~Geometry () |
Destructor. | |
Public Member Functions inherited from Object | |
virtual | ~Object () |
Destructor. | |
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. | |
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. | |
virtual void | PostRender ()=0 |
Post process this object and any of its children after rendering. | |
virtual ScenePtr | Scene () const =0 |
Get the Scene that created this object. | |
Public Member Functions inherited from OgreGeometry | |
virtual | ~OgreGeometry () |
virtual bool | HasParent () const |
Determine if this Geometry is attached to a Visual. | |
virtual VisualPtr | Parent () const |
Get the parent Visual. | |
Public Member Functions inherited from BaseGeometry< OgreObject > | |
virtual | ~BaseGeometry () |
virtual GeometryPtr | Clone () const override |
Clone the geometry. | |
virtual void | RemoveParent () override |
Detach this Geometry from its parent Visual. If this Geometry does not have a parent, no work will be done. | |
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. | |
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. | |
virtual void | SetMaterialImpl (OgreMaterialPtr _material) |
Set material to text geometry. | |
Protected Member Functions inherited from BaseText< OgreGeometry > | |
BaseText () | |
Constructor. | |
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. | |
float | charHeight |
Character height in meters. | |
gz::math::Color | color |
Text color. | |
std::string | fontName |
Font name, such as "Liberation Sans". | |
TextHorizontalAlign | horizontalAlign |
Horizontal alignment. | |
bool | onTop |
True for text to be displayed on top of other objects in the scene. | |
float | spaceWidth |
Width of space between letters. | |
std::string | text |
Text being displayed. | |
bool | textDirty |
Flag to indicate text properties have changed. | |
TextVerticalAlign | verticalAlign |
Vertical alignment. | |
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()
|
protected |
Constructor.
◆ ~OgreText()
|
virtual |
Destructor.
Member Function Documentation
◆ AABB()
|
overridevirtual |
Get the axis aligned bounding box of the text.
- Returns
- The axis aligned bounding box.
Reimplemented from BaseText< OgreGeometry >.
◆ Init()
|
overridevirtual |
Reimplemented from BaseObject.
◆ Material()
|
overridevirtual |
◆ OgreObject()
|
overridevirtual |
Implements OgreGeometry.
◆ 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()
|
overridevirtual |
Set the baseline height of the text.
- Parameters
-
[in] _baseline Baseline height
- See also
- Baseline()
Reimplemented from BaseText< OgreGeometry >.
◆ SetCharHeight()
|
overridevirtual |
Set the height of the character in meters.
- Parameters
-
[in] _height Height of the characters.
- See also
- CharHeight()
Reimplemented from BaseText< OgreGeometry >.
◆ SetColor()
|
overridevirtual |
Set the text color.
- Parameters
-
[in] _color Text color.
- See also
- Color()
Reimplemented from BaseText< OgreGeometry >.
◆ SetFontName()
|
overridevirtual |
Set the font.
- Parameters
-
[in] _font Name of the font
- See also
- FontName()
Reimplemented from BaseText< OgreGeometry >.
◆ SetMaterial()
|
overridevirtual |
◆ SetMaterialImpl()
|
protectedvirtual |
Set material to text geometry.
- Parameters
-
[in] _material Ogre material.
◆ SetShowOnTop()
|
overridevirtual |
True = text always is displayed ontop.
- Parameters
-
[in] _onTop Set to true to render the text on top of all other drawables.
- See also
- ShowOnTop()
Reimplemented from BaseText< OgreGeometry >.
◆ SetSpaceWidth()
|
overridevirtual |
Set the width of spaces between words.
- Parameters
-
[in] _width Space width
- See also
- SpaceWidth()
Reimplemented from BaseText< OgreGeometry >.
◆ SetTextAlignment()
|
overridevirtual |
Set the alignment of the text.
- Parameters
-
[in] _hAlign Horizontal alignment [in] _vAlign Vertical alignment
Reimplemented from BaseText< OgreGeometry >.
◆ SetTextString()
|
overridevirtual |
Set the text to display.
- Parameters
-
[in] _text The text to display.
- See also
- Text()
Reimplemented from BaseText< OgreGeometry >.
The documentation for this class was generated from the following file: