12#ifndef _INCLUDE_OGRENEWT_TOOLS
13#define _INCLUDE_OGRENEWT_TOOLS
32 _OgreNewtExport
void MatrixToQuatPos(
const dFloat* matrix, Ogre::Quaternion& quat, Ogre::Vector3 &pos );
40 _OgreNewtExport
void QuatPosToMatrix(
const Ogre::Quaternion& quat,
const Ogre::Vector3 &pos, dFloat* matrix );
47 _OgreNewtExport
void MatrixToMatrix4(
const dFloat* matrix_in, Ogre::Matrix4& matrix_out );
54 _OgreNewtExport
void Matrix4ToMatrix(
const Ogre::Matrix4& matrix_in, dFloat* matrix_out );
56 _OgreNewtExport Ogre::Quaternion
grammSchmidt(
const Ogre::Vector3& pin );
60 namespace CollisionTools
75 Ogre::Vector3& retpt, Ogre::Vector3& retnormal,
int threadIndex );
94 Ogre::Vector3& retPosA, Ogre::Vector3& retPosB, Ogre::Vector3& retNorm,
int threadIndex );
105 const Ogre::Quaternion& orient = Ogre::Quaternion::IDENTITY,
106 const Ogre::Vector3& pos = Ogre::Vector3::ZERO );
117 Ogre::Real stretchDistance, Ogre::Real springDamping, Ogre::Real dampVelocity );
133 class _OgreNewtExport
MovableText :
public Ogre::MovableObject,
public Ogre::Renderable
174 MovableText(
const Ogre::String &name,
const Ogre::String &caption,
const Ogre::String &fontName, Ogre::Real charHeight,
const Ogre::ColourValue &color = Ogre::ColourValue::White);
178 void setFontName(
const Ogre::String &fontName);
179 void setCaption(
const Ogre::String &caption);
180 void setColor(
const Ogre::ColourValue &color);
181 void setCharacterHeight(Ogre::Real height);
182 void setSpaceWidth(Ogre::Real width);
184 void setGlobalTranslation( Ogre::Vector3 trans );
185 void setLocalTranslation( Ogre::Vector3 trans );
186 void showOnTop(
bool show=
true);
191 const Ogre::ColourValue &
getColor()
const {
return mColor;}
198 Ogre::AxisAlignedBox
GetAABB(
void) {
return mAABB; }
204 void _setupGeometry();
205 void _updateColors();
208 void getWorldTransforms(Ogre::Matrix4 *xform)
const;
211 void visitRenderables(Ogre::Renderable::Visitor* visitor,
bool debugRenderables =
false);
212 const Ogre::Quaternion &getWorldOrientation(
void)
const;
213 const Ogre::Vector3 &getWorldPosition(
void)
const;
215 const Ogre::String &
getName(
void)
const {
return mName;};
216 const Ogre::String &
getMovableType(
void)
const {
static Ogre::String movType =
"MovableText";
return movType;};
218 void _notifyCurrentCamera(Ogre::Camera *cam);
219 void _updateRenderQueue(Ogre::RenderQueue* queue);
222 void getRenderOperation(Ogre::RenderOperation &op);
223 const Ogre::MaterialPtr &
getMaterial(
void)
const {assert(mpMaterial);
return mpMaterial;};
224 const Ogre::LightList &
getLights(
void)
const {
return mLList;};
represents a shape for collision detection
const Ogre::String & getMovableType(void) const
Ogre::RenderWindow * mpWin
Ogre::AxisAlignedBox GetAABB(void)
Ogre::MaterialPtr mpMaterial
Ogre::Real getBoundingRadius(void) const
Ogre::Vector3 getLocalTranslation() const
Ogre::Real getSpaceWidth() const
Ogre::MaterialPtr mpBackgroundMaterial
HorizontalAlignment mHorizontalAlignment
const Ogre::ColourValue & getColor() const
Ogre::AxisAlignedBox mAABB
const Ogre::MaterialPtr & getMaterial(void) const
Ogre::Vector3 mGlobalTranslation
Ogre::Real getCharacterHeight() const
const Ogre::String & getCaption() const
Ogre::Real mTimeUntilNextToggle
Ogre::Vector3 getGlobalTranslation() const
VerticalAlignment mVerticalAlignment
Ogre::RenderOperation mRenderOp
const Ogre::AxisAlignedBox & getBoundingBox(void) const
const Ogre::String & getName(void) const
const Ogre::LightList & getLights(void) const
const Ogre::String & getFontName() const
Ogre::Real getSquaredViewDepth(const Ogre::Camera *cam) const
Ogre::Vector3 mLocalTranslation
bool getShowOnTop() const
represents a physics world.
_OgreNewtExport void MatrixToMatrix4(const dFloat *matrix_in, Ogre::Matrix4 &matrix_out)
Take a Newton matrix and make it into an Ogre::Matrix4.
_OgreNewtExport void MatrixToQuatPos(const dFloat *matrix, Ogre::Quaternion &quat, Ogre::Vector3 &pos)
Take a Newton matrix and create a Quaternion + Position_vector.
_OgreNewtExport Ogre::Quaternion grammSchmidt(const Ogre::Vector3 &pin)
_OgreNewtExport void Matrix4ToMatrix(const Ogre::Matrix4 &matrix_in, dFloat *matrix_out)
Take an Ogre::Matrix4 and make it into a Newton-happy matrix.
_OgreNewtExport void QuatPosToMatrix(const Ogre::Quaternion &quat, const Ogre::Vector3 &pos, dFloat *matrix)
Take a Quaternion and Position Matrix and create a Newton-happy float matrix!
_OgreNewtExport Ogre::Real calculateSpringDamperAcceleration(Ogre::Real deltaTime, Ogre::Real spingK, Ogre::Real stretchDistance, Ogre::Real springDamping, Ogre::Real dampVelocity)