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> 61 class MovableText :
public Ogre::MovableObject,
public Ogre::Renderable
113 const Ogre::String& fontName =
"Liberation Sans",
114 Ogre::Real charHeight = 1.0,
115 const Ogre::ColourValue& color = Ogre::ColourValue::White);
118 #if (OGRE_VERSION_MAJOR >= 1 && OGRE_VERSION_MINOR >= 6) 119 void visitRenderables(Ogre::Renderable::Visitor* visitor,
bool debugRenderables =
false)
override;
123 void setFontName(
const Ogre::String& fontName);
124 void setCaption(
const Ogre::String& caption);
125 void setColor(
const Ogre::ColourValue& color);
126 void setCharacterHeight(Ogre::Real height);
127 void setLineSpacing(Ogre::Real height);
128 void setSpaceWidth(Ogre::Real width);
131 void setGlobalTranslation(Ogre::Vector3 trans);
132 void setLocalTranslation(Ogre::Vector3 trans);
133 void showOnTop(
bool show =
true);
159 return mGlobalTranslation;
163 return mLocalTranslation;
176 assert(!mpMaterial.isNull());
184 void _setupGeometry();
185 void _updateColors();
188 void getWorldTransforms(Ogre::Matrix4* xform)
const override;
199 const Ogre::Quaternion& getWorldOrientation()
const;
200 const Ogre::Vector3& getWorldPosition()
const;
213 static Ogre::String movType =
"MovableText";
217 void _notifyCurrentCamera(Ogre::Camera* cam)
override;
218 void _updateRenderQueue(Ogre::RenderQueue* queue)
override;
221 void getRenderOperation(Ogre::RenderOperation& op)
override;
const Ogre::LightList & getLights() const override
Ogre::MaterialPtr mpBackgroundMaterial
Ogre::RenderOperation mRenderOp
Ogre::AxisAlignedBox mAABB
Ogre::Vector3 getGlobalTranslation() const
const Ogre::String & getCaption() const
const Ogre::ColourValue & getColor() const
const Ogre::String & getFontName() const
Ogre::RenderWindow * mpWin
VerticalAlignment mVerticalAlignment
const Ogre::AxisAlignedBox & getBoundingBox() const override
Ogre::Vector3 mGlobalTranslation
HorizontalAlignment mHorizontalAlignment
Ogre::AxisAlignedBox GetAABB()
bool getShowOnTop() const
Ogre::Real getCharacterHeight() const
Ogre::Real getSpaceWidth() const
const Ogre::MaterialPtr & getMaterial() const override
Ogre::Vector3 getLocalTranslation() const
Ogre::Real mTimeUntilNextToggle
Ogre::Vector3 mLocalTranslation
Ogre::MaterialPtr mpMaterial
const Ogre::String & getName() const override
Ogre::Real getSquaredViewDepth(const Ogre::Camera *) const override
Ogre::Real getBoundingRadius() const override
const Ogre::String & getMovableType() const override