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;
183 private:
const Ogre::Quaternion &getWorldOrientation(
void)
const;
185 private:
const Ogre::Vector3 &getWorldPosition(
void)
const;
187 private:
const Ogre::AxisAlignedBox &getBoundingBox(
void)
const;
189 private:
const Ogre::String &getMovableType()
const;
192 private:
void _notifyCurrentCamera(Ogre::Camera *cam);
195 private:
void _updateRenderQueue(Ogre::RenderQueue* queue);
203 protected:
const Ogre::MaterialPtr &
getMaterial(
void)
const;
207 protected:
const Ogre::LightList &
getLights(
void)
const;
209 private: std::string fontName;
210 private: std::string text;
213 private: Ogre::RenderOperation renderOp;
214 private: Ogre::AxisAlignedBox *aabb;
215 private: Ogre::LightList lightList;
217 private:
float charHeight;
219 private:
bool needUpdate;
221 private:
float radius;
223 private: Ogre::Camera *camera;
224 private: Ogre::RenderWindow *renderWindow;
225 private: Ogre::Font *font;
226 private: Ogre::MaterialPtr material;
227 private: Ogre::MaterialPtr backgroundMaterial;
229 private:
float viewportAspectCoef;
230 private:
float spaceWidth;
231 private:
bool updateColors;
235 private:
float baseline;
239 private: boost::recursive_mutex *mutex;
240 private: Ogre::SimpleRenderable *renderable;