17 btAnimatGeneric6DofConstraint::btAnimatGeneric6DofConstraint(btRigidBody& rbA, btRigidBody& rbB,
const btTransform& frameInA,
const btTransform& frameInB ,
bool useLinearReferenceFrameA) :
22 btAnimatGeneric6DofConstraint::btAnimatGeneric6DofConstraint(btRigidBody& rbB,
const btTransform& frameInB,
bool useLinearReferenceFrameB) :
27 btVector3 btAnimatGeneric6DofConstraint::GetLinearForceAxis(
int iAxis)
29 btVector3 linear_axis;
31 if (m_useLinearReferenceFrameA)
32 linear_axis = m_calculatedTransformA.getBasis().getColumn(iAxis);
34 linear_axis = m_calculatedTransformB.getBasis().getColumn(iAxis);
39 btVector3 btAnimatGeneric6DofConstraint::GetAngularForceAxis(
int iAxis)
41 return m_calculatedAxis[iAxis];
44 void btAnimatGeneric6DofConstraint::ApplyMotorForces(btScalar timeStep)
47 btVector3 angular_axis;
48 btScalar angularJacDiagABInv;
52 if (m_angularLimits[i].needApplyTorques())
56 angular_axis = getAxis(i);
58 angularJacDiagABInv = btScalar(1.) / m_jacAng[i].getDiagonal();
60 m_angularLimits[i].solveAngularLimits(timeStep,angular_axis,angularJacDiagABInv, &m_rbA,&m_rbB);
Declares the btGeneric6DofConstraint class.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.