Back to index

supertuxkart  0.5+dfsg1
Classes | Functions
btQuaternion.h File Reference
#include "btVector3.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  btQuaternion

Functions

SIMD_FORCE_INLINE btQuaternion operator- (const btQuaternion &q)
SIMD_FORCE_INLINE btQuaternion operator* (const btQuaternion &q1, const btQuaternion &q2)
SIMD_FORCE_INLINE btQuaternion operator* (const btQuaternion &q, const btVector3 &w)
SIMD_FORCE_INLINE btQuaternion operator* (const btVector3 &w, const btQuaternion &q)
SIMD_FORCE_INLINE btScalar dot (const btQuaternion &q1, const btQuaternion &q2)
SIMD_FORCE_INLINE btScalar length (const btQuaternion &q)
SIMD_FORCE_INLINE btScalar angle (const btQuaternion &q1, const btQuaternion &q2)
SIMD_FORCE_INLINE btQuaternion inverse (const btQuaternion &q)
SIMD_FORCE_INLINE btQuaternion slerp (const btQuaternion &q1, const btQuaternion &q2, const btScalar &t)
SIMD_FORCE_INLINE btVector3 quatRotate (const btQuaternion &rotation, const btVector3 &v)
SIMD_FORCE_INLINE btQuaternion shortestArcQuat (const btVector3 &v0, const btVector3 &v1)
SIMD_FORCE_INLINE btQuaternion shortestArcQuatNormalize2 (btVector3 &v0, btVector3 &v1)

Function Documentation

SIMD_FORCE_INLINE btScalar angle ( const btQuaternion q1,
const btQuaternion q2 
)

Definition at line 269 of file btQuaternion.h.

{ 
       return q1.angle(q2); 
}

Here is the call graph for this function:

Here is the caller graph for this function:

SIMD_FORCE_INLINE btScalar dot ( const btQuaternion q1,
const btQuaternion q2 
)

Definition at line 256 of file btQuaternion.h.

{ 
       return q1.dot(q2); 
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 276 of file btQuaternion.h.

{
       return q.inverse();
}

Here is the call graph for this function:

Definition at line 263 of file btQuaternion.h.

{ 
       return q.length(); 
}

Here is the call graph for this function:

Here is the caller graph for this function:

SIMD_FORCE_INLINE btQuaternion operator* ( const btQuaternion q1,
const btQuaternion q2 
)

Definition at line 230 of file btQuaternion.h.

                                                          {
       return btQuaternion(q1.w() * q2.x() + q1.x() * q2.w() + q1.y() * q2.z() - q1.z() * q2.y(),
              q1.w() * q2.y() + q1.y() * q2.w() + q1.z() * q2.x() - q1.x() * q2.z(),
              q1.w() * q2.z() + q1.z() * q2.w() + q1.x() * q2.y() - q1.y() * q2.x(),
              q1.w() * q2.w() - q1.x() * q2.x() - q1.y() * q2.y() - q1.z() * q2.z()); 
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btQuaternion operator* ( const btQuaternion q,
const btVector3 w 
)

Definition at line 238 of file btQuaternion.h.

{
       return btQuaternion( q.w() * w.x() + q.y() * w.z() - q.z() * w.y(),
              q.w() * w.y() + q.z() * w.x() - q.x() * w.z(),
              q.w() * w.z() + q.x() * w.y() - q.y() * w.x(),
              -q.x() * w.x() - q.y() * w.y() - q.z() * w.z()); 
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btQuaternion operator* ( const btVector3 w,
const btQuaternion q 
)

Definition at line 247 of file btQuaternion.h.

{
       return btQuaternion( w.x() * q.w() + w.y() * q.z() - w.z() * q.y(),
              w.y() * q.w() + w.z() * q.x() - w.x() * q.z(),
              w.z() * q.w() + w.x() * q.y() - w.y() * q.x(),
              -w.x() * q.x() - w.y() * q.y() - w.z() * q.z()); 
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btQuaternion operator- ( const btQuaternion q)

Definition at line 221 of file btQuaternion.h.

{
       return btQuaternion(-q.x(), -q.y(), -q.z(), -q.w());
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btVector3 quatRotate ( const btQuaternion rotation,
const btVector3 v 
)

Definition at line 288 of file btQuaternion.h.

{
       btQuaternion q = rotation * v;
       q *= rotation.inverse();
       return btVector3(q.getX(),q.getY(),q.getZ());
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 296 of file btQuaternion.h.

{
       btVector3 c = v0.cross(v1);
       btScalar  d = v0.dot(v1);

       if (d < -1.0 + SIMD_EPSILON)
              return btQuaternion(0.0f,1.0f,0.0f,0.0f); // just pick any vector

       btScalar  s = btSqrt((1.0f + d) * 2.0f);
       btScalar rs = 1.0f / s;

       return btQuaternion(c.getX()*rs,c.getY()*rs,c.getZ()*rs,s * 0.5f);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 311 of file btQuaternion.h.

{
       v0.normalize();
       v1.normalize();
       return shortestArcQuat(v0,v1);
}

Here is the call graph for this function:

SIMD_FORCE_INLINE btQuaternion slerp ( const btQuaternion q1,
const btQuaternion q2,
const btScalar t 
)

Definition at line 282 of file btQuaternion.h.

{
       return q1.slerp(q2, t);
}

Here is the call graph for this function: