22 #ifndef _MOVABLETEXT_HH_
23 #define _MOVABLETEXT_HH_
36 class recursive_mutex;
48 class MovableText :
public Ogre::MovableObject,
public Ogre::Renderable
80 public:
void Load(
const std::string &_name,
81 const std::string &_text,
82 const std::string &_fontName =
"Arial",
83 float _charHeight = 1.0,
92 public:
const std::string &
GetFont()
const;
96 public:
void SetText(
const std::string &_text);
100 public:
const std::string &
GetText()
const;
162 bool _debug =
false);
185 private:
const Ogre::Quaternion &getWorldOrientation(
void)
const;
187 private:
const Ogre::Vector3 &getWorldPosition(
void)
const;
189 private:
const Ogre::AxisAlignedBox &getBoundingBox(
void)
const;
191 private:
const Ogre::String &getMovableType()
const;
194 private:
void _notifyCurrentCamera(Ogre::Camera *cam);
197 private:
void _updateRenderQueue(Ogre::RenderQueue* queue);
205 protected:
const Ogre::MaterialPtr &
getMaterial(
void)
const;
209 protected:
const Ogre::LightList &
getLights(
void)
const;
211 private: std::string fontName;
212 private: std::string text;
215 private: Ogre::RenderOperation renderOp;
216 private: Ogre::AxisAlignedBox *aabb;
217 private: Ogre::LightList lightList;
219 private:
float charHeight;
221 private:
bool needUpdate;
223 private:
float radius;
225 private: Ogre::Camera *camera;
226 private: Ogre::RenderWindow *renderWindow;
227 private: Ogre::Font *font;
228 private: Ogre::MaterialPtr material;
229 private: Ogre::MaterialPtr backgroundMaterial;
231 private:
float viewportAspectCoef;
232 private:
float spaceWidth;
233 private:
bool updateColors;
237 private:
float baseline;
241 private: boost::recursive_mutex *mutex;
242 private: Ogre::SimpleRenderable *renderable;