Go to the documentation of this file.
17 #ifndef GAZEBO_RENDERING_MOVABLETEXT_HH_
18 #define GAZEBO_RENDERING_MOVABLETEXT_HH_
23 #include <ignition/math/Box.hh>
24 #include <ignition/math/Color.hh>
36 class MovableTextPrivate;
44 :
public Ogre::MovableObject,
public Ogre::Renderable
77 public:
void Load(
const std::string &_name,
78 const std::string &_text,
79 const std::string &_fontName,
90 public:
void Load(
const std::string &_name,
91 const std::string &_text,
92 const std::string &_fontName =
"Arial",
93 float _charHeight = 1.0,
94 const ignition::math::Color &_color =
95 ignition::math::Color::White);
101 public:
void SetFontName(
const std::string &_font);
111 public: const std::
string &FontName() const;
116 public:
void SetText(const std::
string &_text);
126 public: const std::
string &Text() const;
136 public:
void SetColor(const
ignition::math::Color &_color);
146 public: const
ignition::math::Color &Color() const;
151 public:
void SetCharHeight(const
float _height);
161 public:
float CharHeight() const;
166 public:
void SetSpaceWidth(const
float _width);
176 public:
float SpaceWidth() const;
181 public:
void SetTextAlignment(const HorizAlign &_hAlign,
182 const VertAlign &_vAlign);
187 public:
void SetBaseline(const
float _height);
197 public:
float Baseline() const;
203 public:
void SetShowOnTop(const
bool _show);
213 public:
bool ShowOnTop() const;
220 public:
void Update();
227 public: virtual
void visitRenderables(
Ogre::Renderable::Visitor *_visitor,
228 bool _debug = false) override;
235 protected:
void SetupGeometry();
242 protected:
void UpdateColors();
246 protected:
void getWorldTransforms(
Ogre::Matrix4 *_xform) const override;
250 protected:
float getBoundingRadius() const override;
254 protected:
float getSquaredViewDepth(const
Ogre::
Camera *_cam) const
259 protected:
void getRenderOperation(
Ogre::RenderOperation &_op) override;
263 protected: const
Ogre::MaterialPtr &getMaterial() const override;
268 protected: const
Ogre::LightList &getLights() const override;
271 private: const
Ogre::AxisAlignedBox &getBoundingBox() const override;
274 private: const
Ogre::String &getMovableType() const override;
277 private:
void _notifyCurrentCamera(
Ogre::
Camera *_cam) override;
280 private:
void _updateRenderQueue(
Ogre::RenderQueue *_queue) override;
284 private: std::unique_ptr<MovableTextPrivate> dataPtr;
float GetSpaceWidth() const GAZEBO_DEPRECATED(9.0)
Get the width of spaces between words.
virtual void visitRenderables(Ogre::Renderable::Visitor *_visitor, bool _debug=false) override
void _setupGeometry() GAZEBO_DEPRECATED(9.0)
Setup the geometry.
Definition: JointMaker.hh:39
const std::string & GetText() const GAZEBO_DEPRECATED(9.0)
Get the displayed text.
Forward declarations for the common classes.
Definition: Animation.hh:26
const ignition::math::Color & Color() const
Get the text color.
void SetCharHeight(const float _height)
Set the height of the character in meters.
float GetCharHeight() const GAZEBO_DEPRECATED(9.0)
Get the height of the characters in meters return Height of the characters.
bool GetShowOnTop() const GAZEBO_DEPRECATED(9.0)
True = text is displayed on top.
void SetShowOnTop(const bool _show)
True = text always is displayed ontop.
float getBoundingRadius() const override
common
Definition: FuelModelDatabase.hh:37
MovableText()
Constructor.
Align above.
Definition: MovableText.hh:61
virtual ~MovableText()
Destructor.
void Update()
Update the text.
float CharHeight() const
Get the height of the characters in meters return Height of the characters.
float getSquaredViewDepth(const Ogre::Camera *_cam) const override
VertAlign
vertical alignment
Definition: MovableText.hh:57
void getRenderOperation(Ogre::RenderOperation &_op) override
void _updateColors() GAZEBO_DEPRECATED(9.0)
Update colors.
void SetText(const std::string &_text)
Set the text to display.
HorizAlign
Horizontal alignment.
Definition: MovableText.hh:48
void SetupGeometry()
Setup the geometry.
const Ogre::MaterialPtr & getMaterial() const override
rendering
Definition: RenderEngine.hh:31
bool ShowOnTop() const
Get whether the is displayed above other objects.
const std::string & Text() const
Get the displayed text.
void getWorldTransforms(Ogre::Matrix4 *_xform) const override
void SetFontName(const std::string &_font)
Set the font.
const common::Color GetColor() const GAZEBO_DEPRECATED(9.0)
Get the text color.
Left alignment.
Definition: MovableText.hh:50
const Ogre::LightList & getLights() const override
float GetBaseline() const GAZEBO_DEPRECATED(9.0)
Get the baseline height in meters.
const std::string & GetFont() const GAZEBO_DEPRECATED(9.0)
Get the font name.
Defines a color.
Definition: Color.hh:36
void SetTextAlignment(const HorizAlign &_hAlign, const VertAlign &_vAlign)
Set the alignment of the text.
void SetBaseline(const float _height)
Set the baseline height of the text.
void SetColor(const common::Color &_color) GAZEBO_DEPRECATED(9.0)
Set the text color.
float SpaceWidth() const
Get the width of spaces between words.
void UpdateColors()
Update colors.
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:328
Movable text.
Definition: MovableText.hh:43
const std::string & FontName() const
Get the font name.
Center alignment.
Definition: MovableText.hh:52
Align below.
Definition: MovableText.hh:59
ignition::math::Box AABB()
Get the axis aligned bounding box of the text.
Basic camera sensor.
Definition: Camera.hh:84
void SetSpaceWidth(const float _width)
Set the width of spaces between words.
float Baseline() const
Get the baseline height in meters.
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.