42 #ifndef OGRE_TOOLS_MOVABLE_TEXT_H 43 #define OGRE_TOOLS_MOVABLE_TEXT_H 45 #include <OgreMovableObject.h> 46 #include <OgreRenderable.h> 47 #include <OgreVector3.h> 48 #include <OgreQuaternion.h> 49 #include <OgreSharedPtr.h> 62 class MovableText :
public Ogre::MovableObject,
public Ogre::Renderable
72 V_BELOW, V_ABOVE, V_CENTER
111 const Ogre::String &caption,
112 const Ogre::String &fontName =
"Liberation Sans",
113 Ogre::Real charHeight = 1.0,
114 const Ogre::ColourValue &color = Ogre::ColourValue::White);
117 #if (OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 6) 118 virtual void visitRenderables(Ogre::Renderable::Visitor* visitor,
bool debugRenderables =
false);
122 void setFontName(
const Ogre::String &fontName);
123 void setCaption(
const Ogre::String &caption);
124 void setColor(
const Ogre::ColourValue &color);
125 void setCharacterHeight(Ogre::Real height);
126 void setLineSpacing(Ogre::Real height);
127 void setSpaceWidth(Ogre::Real width);
130 void setGlobalTranslation(Ogre::Vector3 trans);
131 void setLocalTranslation(Ogre::Vector3 trans);
132 void showOnTop(
bool show =
true);
158 return mGlobalTranslation;
162 return mLocalTranslation;
175 assert(!mpMaterial.isNull());
185 void _setupGeometry();
186 void _updateColors();
189 void getWorldTransforms(Ogre::Matrix4 *xform)
const;
200 const Ogre::Quaternion &getWorldOrientation(
void)
const;
201 const Ogre::Vector3 &getWorldPosition(
void)
const;
214 static Ogre::String movType =
"MovableText";
219 void _notifyCurrentCamera(Ogre::Camera *cam);
220 void _updateRenderQueue(Ogre::RenderQueue* queue);
223 void getRenderOperation(Ogre::RenderOperation &op);
Ogre::Real getSpaceWidth() const
Ogre::MaterialPtr mpBackgroundMaterial
Ogre::RenderOperation mRenderOp
Ogre::AxisAlignedBox mAABB
Ogre::Real getCharacterHeight() const
Ogre::RenderWindow * mpWin
VerticalAlignment mVerticalAlignment
Ogre::Vector3 getGlobalTranslation() const
Ogre::Vector3 mGlobalTranslation
const Ogre::AxisAlignedBox & getBoundingBox(void) const
Ogre::Real getBoundingRadius(void) const
HorizontalAlignment mHorizontalAlignment
const Ogre::String & getFontName() const
Ogre::Vector3 getLocalTranslation() const
const Ogre::String & getMovableType(void) const
const Ogre::ColourValue & getColor() const
const Ogre::String & getCaption() const
const Ogre::MaterialPtr & getMaterial(void) const
Ogre::Real mTimeUntilNextToggle
Ogre::Vector3 mLocalTranslation
Ogre::AxisAlignedBox GetAABB(void)
Ogre::MaterialPtr mpMaterial
bool getShowOnTop() const
const Ogre::String & getName(void) const
const Ogre::LightList & getLights(void) const
Ogre::Real getSquaredViewDepth(const Ogre::Camera *cam) const