Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #pragma once
00029 #ifndef STATIC_TEXT_H_
00030 #define STATIC_TEXT_H_
00031
00032 #include <ogre_tools/movable_text.h>
00033
00034 namespace ogre_tools
00035 {
00042 class StaticText : public MovableText
00043 {
00044 public:
00052 StaticText(const Ogre::String &caption, const Ogre::String &fontName = "Arial", Ogre::Real charHeight = 1.0,
00053 const Ogre::ColourValue &color = Ogre::ColourValue::White) :
00054 MovableText(caption, fontName, charHeight, color)
00055 {
00056 }
00057
00058 protected:
00062 void getWorldTransforms(Ogre::Matrix4 *xform) const
00063 {
00064 if (this->isVisible())
00065 {
00066 Ogre::Matrix3 rot3x3 = Ogre::Matrix3::IDENTITY;
00067
00068
00069 mParentNode->_getDerivedOrientation().ToRotationMatrix(rot3x3);
00070
00071
00072 Ogre::Vector3 ppos = mParentNode->_getDerivedPosition() + Ogre::Vector3::UNIT_Y * mGlobalTranslation;
00073 ppos += rot3x3 * mLocalTranslation;
00074
00075 *xform = rot3x3;
00076 xform->setTrans(ppos);
00077 }
00078 }
00079
00080 };
00081
00082 }
00083
00084 #endif