add operator != and operator == to btQuadWord,

minor fix in 	btTransformUtil::calculateVelocityQuaternion, report zero angular velocity on identical transforms (using above operator to check identical transforms)
This commit is contained in:
erwin.coumans
2008-11-06 23:39:33 +00:00
parent a4c205afc0
commit 33ada42e18
3 changed files with 24 additions and 7 deletions

View File

@@ -105,8 +105,14 @@ public:
linVel = (pos1 - pos0) / timeStep;
btVector3 axis;
btScalar angle;
calculateDiffAxisAngleQuaternion(orn0,orn1,axis,angle);
angVel = axis * angle / timeStep;
if (orn0 != orn1)
{
calculateDiffAxisAngleQuaternion(orn0,orn1,axis,angle);
angVel = axis * angle / timeStep;
} else
{
angVel.setValue(0,0,0);
}
}
static void calculateDiffAxisAngleQuaternion(const btQuaternion& orn0,const btQuaternion& orn1a,btVector3& axis,btScalar& angle)