Logo Search packages:      
Sourcecode: blender version File versions  Download package

btHingeConstraint::btHingeConstraint ( btRigidBody rbA,
const btTransform rbAFrame,
bool  useReferenceFrameA = false 
)

not providing rigidbody B means implicitly using worldspace for body B

Definition at line 153 of file btHingeConstraint.cpp.

References btRigidBody::getCenterOfMassTransform(), and btTransform::getOrigin().

:btTypedConstraint(HINGE_CONSTRAINT_TYPE, rbA),m_rbAFrame(rbAFrame),m_rbBFrame(rbAFrame),
m_angularOnly(false),
m_enableAngularMotor(false),
m_useSolveConstraintObsolete(HINGE_USE_OBSOLETE_SOLVER),
m_useReferenceFrameA(useReferenceFrameA)
{
      ///not providing rigidbody B means implicitly using worldspace for body B

      m_rbBFrame.getOrigin() = m_rbA.getCenterOfMassTransform()(m_rbAFrame.getOrigin());

      //start with free
      m_lowerLimit = btScalar(1e30);
      m_upperLimit = btScalar(-1e30);     
      m_biasFactor = 0.3f;
      m_relaxationFactor = 1.0f;
      m_limitSoftness = 0.9f;
      m_solveLimit = false;
      m_referenceSign = m_useReferenceFrameA ? btScalar(-1.f) : btScalar(1.f);
}


Generated by  Doxygen 1.6.0   Back to index