9 #ifndef _OgreBulletUtils_H__ 10 #define _OgreBulletUtils_H__ 13 #include <OgreVector3.h> 14 #include <OgreQuaternion.h> 15 #include <OgreColourValue.h> 16 #include <OgreMatrix3.h> 17 #include <OgreMatrix4.h> 21 inline btVector3
vector3(
const Ogre::Vector3&
V)
23 return btVector3(V.x, V.y, V.z);
26 inline Ogre::Vector3
vector3(
const btVector3&
V)
28 return Ogre::Vector3(V.x(), V.y(), V.z());
33 return btQuaternion(Q.x, Q.y, Q.z, Q.w);
38 return Ogre::Quaternion(Q.w(), Q.x(), Q.y(), Q.z());
41 inline Ogre::ColourValue
colour(
const btVector3& color, btScalar alpha)
43 Ogre::ColourValue c(color.getX(), color.getY(), color.getZ(), alpha);
48 inline Ogre::Matrix3
matrix3(
const btMatrix3x3& matrix)
51 matrix[0][0], matrix[0][1], matrix[0][2],
52 matrix[1][0], matrix[1][1], matrix[1][2],
53 matrix[2][0], matrix[2][1], matrix[2][2]
57 inline Ogre::Matrix4
matrix4(
const btTransform& transform)
59 const btMatrix3x3& rotation = transform.getBasis();
60 const btVector3& translation = transform.getOrigin();
63 matrix4.setTrans(
vector3(translation));
btQuaternion quaternion(const Ogre::Quaternion &Q)
Definition: OgreBulletUtils.h:31
Ogre::Matrix3 matrix3(const btMatrix3x3 &matrix)
Definition: OgreBulletUtils.h:48
Ogre::ColourValue colour(const btVector3 &color, btScalar alpha)
Definition: OgreBulletUtils.h:41
Definition: InputPrereqs.h:74
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
Definition: InputPrereqs.h:105
Ogre::Matrix4 matrix4(const btTransform &transform)
Definition: OgreBulletUtils.h:57
btVector3 vector3(const Ogre::Vector3 &V)
Definition: OgreBulletUtils.h:21