Getting proper rotations from a rigid body for directx 10

User avatar
Dr.Shepherd
Posts: 168
Joined: Tue Jan 04, 2011 11:47 pm

Re: Getting proper rotations from a rigid body for directx 1

Post by Dr.Shepherd »

if you want to get the rotation:

Code: Select all

btQuaternion btRigidBody::getOrientation	(		 ) 	 const
if you want to get the angular velocity:

Code: Select all

const btVector3& btRigidBody::getAngularVelocity	(		 ) 	 const
You may 'wikipedia' about how to use Quaternion to express the rotation. Or you may check the following function in Class btQuaternion:

btScalar btQuaternion::getAngle ( ) const [inline]
Return the angle of rotation represented by this quaternion.
Check the documentation. Although it is simple, it contains the most essential information.