17 #ifndef GAZEBO_RENDERING_MOVABLETEXT_HH_
18 #define GAZEBO_RENDERING_MOVABLETEXT_HH_
22 #include <ignition/math/Box.hh>
33 class recursive_mutex;
46 :
public Ogre::MovableObject,
public Ogre::Renderable
78 public:
void Load(
const std::string &_name,
79 const std::string &_text,
80 const std::string &_fontName =
"Arial",
81 float _charHeight = 1.0,
86 public:
void SetFontName(
const std::string &_font);
90 public:
const std::string &GetFont()
const;
94 public:
void SetText(
const std::string &_text);
98 public:
const std::string &GetText()
const;
110 public:
void SetCharHeight(
float _height);
114 public:
float GetCharHeight()
const;
118 public:
void SetSpaceWidth(
float _width);
122 public:
float GetSpaceWidth()
const;
127 public:
void SetTextAlignment(
const HorizAlign &_hAlign,
128 const VertAlign &_vAlign);
132 public:
void SetBaseline(
float _height);
136 public:
float GetBaseline()
const;
141 public:
void SetShowOnTop(
bool _show);
145 public:
bool GetShowOnTop()
const;
155 public: ignition::math::Box AABB();
158 public:
void Update();
165 public: virtual
void visitRenderables(Ogre::Renderable::Visitor* _visitor,
166 bool _debug = false);
170 protected:
void _setupGeometry();
174 protected:
void _updateColors();
178 protected:
void getWorldTransforms(Ogre::Matrix4 *xform) const;
182 protected:
float getBoundingRadius() const;
186 protected:
float getSquaredViewDepth(const Ogre::
Camera *cam) const;
189 private: const Ogre::Quaternion &getWorldOrientation(
void) const;
191 private: const Ogre::Vector3 &getWorldPosition(
void) const;
193 private: const Ogre::AxisAlignedBox &getBoundingBox(
void) const;
195 private: const Ogre::String &getMovableType() const;
198 private:
void _notifyCurrentCamera(Ogre::
Camera *cam);
201 private:
void _updateRenderQueue(Ogre::RenderQueue* queue);
205 protected:
void getRenderOperation(Ogre::RenderOperation &op);
209 protected: const Ogre::MaterialPtr &getMaterial(
void) const;
213 protected: const Ogre::LightList &getLights(
void) const;
215 private: std::
string fontName;
216 private: std::
string text;
218 private: common::Color color;
219 private: Ogre::RenderOperation renderOp;
220 private: Ogre::AxisAlignedBox *aabb;
221 private: Ogre::LightList lightList;
223 private:
float charHeight;
225 private:
bool needUpdate;
227 private:
float radius;
229 private: Ogre::
Camera *camera;
230 private: Ogre::RenderWindow *renderWindow;
231 private: Ogre::Font *font;
232 private: Ogre::MaterialPtr material;
233 private: Ogre::MaterialPtr backgroundMaterial;
235 private:
float viewportAspectCoef;
236 private:
float spaceWidth;
237 private:
bool updateColors;
238 private: VertAlign vertAlign;
239 private: HorizAlign horizAlign;
241 private:
float baseline;
245 private: boost::recursive_mutex *mutex;
246 private: Ogre::SimpleRenderable *renderable;
Basic camera sensor.
Definition: Camera.hh:85
VertAlign
vertical alignment
Definition: MovableText.hh:59
static const Color White
(1, 1, 1)
Definition: Color.hh:39
Movable text.
Definition: MovableText.hh:45
Mathematical representation of a box and related functions.
Definition: Box.hh:41
Left alignment.
Definition: MovableText.hh:52
Align below.
Definition: MovableText.hh:61
Defines a color.
Definition: Color.hh:36
#define GAZEBO_DEPRECATED(version)
Definition: system.hh:302
HorizAlign
Horizontal alignment.
Definition: MovableText.hh:50