Blender V2.61 - r43446
|
btGeneric6DofConstraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space More...
#include <btGeneric6DofConstraint.h>
Public Member Functions | |
btGeneric6DofConstraint (btRigidBody &rbA, btRigidBody &rbB, const btTransform &frameInA, const btTransform &frameInB, bool useLinearReferenceFrameA) | |
btGeneric6DofConstraint (btRigidBody &rbB, const btTransform &frameInB, bool useLinearReferenceFrameB) | |
void | calculateTransforms (const btTransform &transA, const btTransform &transB) |
Calcs global transform of the offsets. | |
void | calculateTransforms () |
const btTransform & | getCalculatedTransformA () const |
Gets the global transform of the offset for body A. | |
const btTransform & | getCalculatedTransformB () const |
Gets the global transform of the offset for body B. | |
const btTransform & | getFrameOffsetA () const |
const btTransform & | getFrameOffsetB () const |
btTransform & | getFrameOffsetA () |
btTransform & | getFrameOffsetB () |
virtual void | buildJacobian () |
performs Jacobian calculation, and also calculates angle differences and axis | |
virtual void | getInfo1 (btConstraintInfo1 *info) |
internal method used by the constraint solver, don't use them directly | |
void | getInfo1NonVirtual (btConstraintInfo1 *info) |
virtual void | getInfo2 (btConstraintInfo2 *info) |
internal method used by the constraint solver, don't use them directly | |
void | getInfo2NonVirtual (btConstraintInfo2 *info, const btTransform &transA, const btTransform &transB, const btVector3 &linVelA, const btVector3 &linVelB, const btVector3 &angVelA, const btVector3 &angVelB) |
void | updateRHS (btScalar timeStep) |
btVector3 | getAxis (int axis_index) const |
Get the rotation axis in global coordinates. | |
btScalar | getAngle (int axis_index) const |
Get the relative Euler angle. | |
btScalar | getRelativePivotPosition (int axis_index) const |
Get the relative position of the constraint pivot. | |
void | setFrames (const btTransform &frameA, const btTransform &frameB) |
bool | testAngularLimitMotor (int axis_index) |
Test angular limit. | |
void | setLinearLowerLimit (const btVector3 &linearLower) |
void | getLinearLowerLimit (btVector3 &linearLower) |
void | setLinearUpperLimit (const btVector3 &linearUpper) |
void | getLinearUpperLimit (btVector3 &linearUpper) |
void | setAngularLowerLimit (const btVector3 &angularLower) |
void | getAngularLowerLimit (btVector3 &angularLower) |
void | setAngularUpperLimit (const btVector3 &angularUpper) |
void | getAngularUpperLimit (btVector3 &angularUpper) |
btRotationalLimitMotor * | getRotationalLimitMotor (int index) |
Retrieves the angular limit informacion. | |
btTranslationalLimitMotor * | getTranslationalLimitMotor () |
Retrieves the limit informacion. | |
void | setLimit (int axis, btScalar lo, btScalar hi) |
bool | isLimited (int limitIndex) |
Test limit. | |
virtual void | calcAnchorPos (void) |
int | get_limit_motor_info2 (btRotationalLimitMotor *limot, const btTransform &transA, const btTransform &transB, const btVector3 &linVelA, const btVector3 &linVelB, const btVector3 &angVelA, const btVector3 &angVelB, btConstraintInfo2 *info, int row, btVector3 &ax1, int rotational, int rotAllowed=false) |
bool | getUseFrameOffset () |
void | setUseFrameOffset (bool frameOffsetOnOff) |
virtual void | setParam (int num, btScalar value, int axis=-1) |
virtual btScalar | getParam (int num, int axis=-1) const |
return the local value of parameter | |
void | setAxis (const btVector3 &axis1, const btVector3 &axis2) |
virtual int | calculateSerializeBufferSize () const |
virtual const char * | serialize (void *dataBuffer, btSerializer *serializer) const |
fills the dataBuffer and returns the struct name (and 0 on failure) | |
Public Attributes | |
bool | m_useSolveConstraintObsolete |
for backwards compatibility during the transition to 'getInfo/getInfo2' | |
Protected Member Functions | |
btGeneric6DofConstraint & | operator= (btGeneric6DofConstraint &other) |
int | setAngularLimits (btConstraintInfo2 *info, int row_offset, const btTransform &transA, const btTransform &transB, const btVector3 &linVelA, const btVector3 &linVelB, const btVector3 &angVelA, const btVector3 &angVelB) |
int | setLinearLimits (btConstraintInfo2 *info, int row, const btTransform &transA, const btTransform &transB, const btVector3 &linVelA, const btVector3 &linVelB, const btVector3 &angVelA, const btVector3 &angVelB) |
void | buildLinearJacobian (btJacobianEntry &jacLinear, const btVector3 &normalWorld, const btVector3 &pivotAInW, const btVector3 &pivotBInW) |
void | buildAngularJacobian (btJacobianEntry &jacAngular, const btVector3 &jointAxisW) |
void | calculateLinearInfo () |
void | calculateAngleInfo () |
calcs the euler angles between the two bodies. | |
Protected Attributes | |
btTransform | m_frameInA |
the constraint space w.r.t body A | |
btTransform | m_frameInB |
btJacobianEntry | m_jacLinear [3] |
3 orthogonal linear constraints | |
btJacobianEntry | m_jacAng [3] |
btTranslationalLimitMotor | m_linearLimits |
btRotationalLimitMotor | m_angularLimits [3] |
btScalar | m_timeStep |
btTransform | m_calculatedTransformA |
btTransform | m_calculatedTransformB |
btVector3 | m_calculatedAxisAngleDiff |
btVector3 | m_calculatedAxis [3] |
btVector3 | m_calculatedLinearDiff |
btScalar | m_factA |
btScalar | m_factB |
bool | m_hasStaticBody |
btVector3 | m_AnchorPos |
bool | m_useLinearReferenceFrameA |
bool | m_useOffsetForConstraintFrame |
int | m_flags |
btGeneric6DofConstraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space
btGeneric6DofConstraint can leave any of the 6 degree of freedom 'free' or 'locked'. currently this limit supports rotational motors
For Linear limits, use btGeneric6DofConstraint.setLinearUpperLimit, btGeneric6DofConstraint.setLinearLowerLimit. You can set the parameters with the btTranslationalLimitMotor structure accsesible through the btGeneric6DofConstraint.getTranslationalLimitMotor method. At this moment translational motors are not supported. May be in the future.
For Angular limits, use the btRotationalLimitMotor structure for configuring the limit. This is accessible through btGeneric6DofConstraint.getLimitMotor method, This brings support for limit parameters and motors.
AXIS | MIN ANGLE | MAX ANGLE |
X | -PI | PI |
Y | -PI/2 | PI/2 |
Z | -PI | PI |
Definition at line 271 of file btGeneric6DofConstraint.h.
btGeneric6DofConstraint::btGeneric6DofConstraint | ( | btRigidBody & | rbA, |
btRigidBody & | rbB, | ||
const btTransform & | frameInA, | ||
const btTransform & | frameInB, | ||
bool | useLinearReferenceFrameA | ||
) |
Definition at line 38 of file btGeneric6DofConstraint.cpp.
References calculateTransforms().
btGeneric6DofConstraint::btGeneric6DofConstraint | ( | btRigidBody & | rbB, |
const btTransform & | frameInB, | ||
bool | useLinearReferenceFrameB | ||
) |
not providing rigidbody A means implicitly using worldspace for body A
Definition at line 52 of file btGeneric6DofConstraint.cpp.
References calculateTransforms(), btRigidBody::getCenterOfMassTransform(), m_frameInA, and m_frameInB.
void btGeneric6DofConstraint::buildAngularJacobian | ( | btJacobianEntry & | jacAngular, |
const btVector3 & | jointAxisW | ||
) | [protected] |
Definition at line 439 of file btGeneric6DofConstraint.cpp.
References btTransform::getBasis(), btRigidBody::getCenterOfMassTransform(), btRigidBody::getInvInertiaDiagLocal(), btTypedConstraint::m_rbA, btTypedConstraint::m_rbB, and btMatrix3x3::transpose().
Referenced by buildJacobian().
void btGeneric6DofConstraint::buildJacobian | ( | ) | [virtual] |
performs Jacobian calculation, and also calculates angle differences and axis
Reimplemented from btTypedConstraint.
Definition at line 464 of file btGeneric6DofConstraint.cpp.
References buildAngularJacobian(), buildLinearJacobian(), calcAnchorPos(), calculateTransforms(), getAxis(), btTransform::getBasis(), btRigidBody::getCenterOfMassTransform(), btMatrix3x3::getColumn(), i, btTranslationalLimitMotor::isLimited(), btTranslationalLimitMotor::m_accumulatedImpulse, btRotationalLimitMotor::m_accumulatedImpulse, m_AnchorPos, m_angularLimits, m_calculatedTransformA, m_calculatedTransformB, m_jacAng, m_jacLinear, m_linearLimits, btTypedConstraint::m_rbA, btTypedConstraint::m_rbB, m_useLinearReferenceFrameA, m_useSolveConstraintObsolete, and testAngularLimitMotor().
Referenced by setFrames().
void btGeneric6DofConstraint::buildLinearJacobian | ( | btJacobianEntry & | jacLinear, |
const btVector3 & | normalWorld, | ||
const btVector3 & | pivotAInW, | ||
const btVector3 & | pivotBInW | ||
) | [protected] |
Definition at line 421 of file btGeneric6DofConstraint.cpp.
References btTransform::getBasis(), btRigidBody::getCenterOfMassPosition(), btRigidBody::getCenterOfMassTransform(), btRigidBody::getInvInertiaDiagLocal(), btRigidBody::getInvMass(), btTypedConstraint::m_rbA, btTypedConstraint::m_rbB, and btMatrix3x3::transpose().
Referenced by buildJacobian().
void btGeneric6DofConstraint::calcAnchorPos | ( | void | ) | [virtual] |
Definition at line 745 of file btGeneric6DofConstraint.cpp.
References btRigidBody::getInvMass(), btTransform::getOrigin(), m_AnchorPos, m_calculatedTransformA, m_calculatedTransformB, btTypedConstraint::m_rbA, and btTypedConstraint::m_rbB.
Referenced by buildJacobian().
void btGeneric6DofConstraint::calculateAngleInfo | ( | ) | [protected] |
calcs the euler angles between the two bodies.
Definition at line 359 of file btGeneric6DofConstraint.cpp.
References btTransform::getBasis(), btMatrix3x3::getColumn(), btMatrix3x3::inverse(), m_calculatedAxis, m_calculatedAxisAngleDiff, m_calculatedTransformA, m_calculatedTransformB, and matrixToEulerXYZ().
Referenced by calculateTransforms().
void btGeneric6DofConstraint::calculateLinearInfo | ( | ) | [protected] |
Definition at line 766 of file btGeneric6DofConstraint.cpp.
References btTransform::getBasis(), btTransform::getOrigin(), i, btMatrix3x3::inverse(), m_calculatedLinearDiff, m_calculatedTransformA, m_calculatedTransformB, btTranslationalLimitMotor::m_currentLinearDiff, m_linearLimits, and btTranslationalLimitMotor::testLimitValue().
Referenced by calculateTransforms().
SIMD_FORCE_INLINE int btGeneric6DofConstraint::calculateSerializeBufferSize | ( | ) | const [virtual] |
Reimplemented from btTypedConstraint.
Reimplemented in btGeneric6DofSpringConstraint.
Definition at line 579 of file btGeneric6DofConstraint.h.
void btGeneric6DofConstraint::calculateTransforms | ( | const btTransform & | transA, |
const btTransform & | transB | ||
) |
Calcs global transform of the offsets.
Calcs the global transform for the joint offset for body A an B, and also calcs the agle differences between the bodies.
Definition at line 395 of file btGeneric6DofConstraint.cpp.
References calculateAngleInfo(), calculateLinearInfo(), btRigidBody::getInvMass(), btTypedConstraint::getRigidBodyA(), btTypedConstraint::getRigidBodyB(), m_calculatedTransformA, m_calculatedTransformB, m_factA, m_factB, m_frameInA, m_frameInB, m_hasStaticBody, m_useOffsetForConstraintFrame, and SIMD_EPSILON.
Referenced by CcdPhysicsEnvironment::getConstraintParam().
void btGeneric6DofConstraint::calculateTransforms | ( | ) |
Definition at line 390 of file btGeneric6DofConstraint.cpp.
References btRigidBody::getCenterOfMassTransform(), btTypedConstraint::m_rbA, and btTypedConstraint::m_rbB.
Referenced by btGeneric6DofConstraint(), buildJacobian(), getInfo1(), getInfo2NonVirtual(), btGeneric6DofSpringConstraint::setAxis(), setAxis(), btUniversalConstraint::setAxis(), btGeneric6DofSpringConstraint::setEquilibriumPoint(), and setFrames().
int btGeneric6DofConstraint::get_limit_motor_info2 | ( | btRotationalLimitMotor * | limot, |
const btTransform & | transA, | ||
const btTransform & | transB, | ||
const btVector3 & | linVelA, | ||
const btVector3 & | linVelB, | ||
const btVector3 & | angVelA, | ||
const btVector3 & | angVelB, | ||
btConstraintInfo2 * | info, | ||
int | row, | ||
btVector3 & | ax1, | ||
int | rotational, | ||
int | rotAllowed = false |
||
) |
Definition at line 779 of file btGeneric6DofConstraint.cpp.
References btTypedConstraint::btConstraintInfo2::cfm, btTypedConstraint::btConstraintInfo2::fps, btTypedConstraint::getMotorFactor(), btTransform::getOrigin(), i, btRotationalLimitMotor::m_bounce, m_calculatedTransformA, m_calculatedTransformB, btTypedConstraint::btConstraintInfo2::m_constraintError, btRotationalLimitMotor::m_currentLimit, btRotationalLimitMotor::m_currentLimitError, btRotationalLimitMotor::m_currentPosition, btRotationalLimitMotor::m_enableMotor, m_factA, m_factB, m_hasStaticBody, btRotationalLimitMotor::m_hiLimit, btTypedConstraint::btConstraintInfo2::m_J1angularAxis, btTypedConstraint::btConstraintInfo2::m_J1linearAxis, btTypedConstraint::btConstraintInfo2::m_J2angularAxis, btRotationalLimitMotor::m_loLimit, btTypedConstraint::btConstraintInfo2::m_lowerLimit, btRotationalLimitMotor::m_maxMotorForce, btRotationalLimitMotor::m_normalCFM, btRotationalLimitMotor::m_stopCFM, btRotationalLimitMotor::m_stopERP, btRotationalLimitMotor::m_targetVelocity, btTypedConstraint::btConstraintInfo2::m_upperLimit, m_useOffsetForConstraintFrame, btTypedConstraint::btConstraintInfo2::rowskip, and SIMD_INFINITY.
Referenced by setAngularLimits(), and setLinearLimits().
btScalar btGeneric6DofConstraint::getAngle | ( | int | axis_index | ) | const |
Get the relative Euler angle.
Definition at line 738 of file btGeneric6DofConstraint.cpp.
References m_calculatedAxisAngleDiff.
Referenced by btDiscreteDynamicsWorld::debugDrawConstraint(), btHinge2Constraint::getAngle1(), btUniversalConstraint::getAngle1(), btHinge2Constraint::getAngle2(), btUniversalConstraint::getAngle2(), and CcdPhysicsEnvironment::getConstraintParam().
void btGeneric6DofConstraint::getAngularLowerLimit | ( | btVector3 & | angularLower | ) | [inline] |
Definition at line 471 of file btGeneric6DofConstraint.h.
References i, and m_angularLimits.
void btGeneric6DofConstraint::getAngularUpperLimit | ( | btVector3 & | angularUpper | ) | [inline] |
Definition at line 483 of file btGeneric6DofConstraint.h.
References i, and m_angularLimits.
btVector3 btGeneric6DofConstraint::getAxis | ( | int | axis_index | ) | const |
Get the rotation axis in global coordinates.
Definition at line 726 of file btGeneric6DofConstraint.cpp.
References m_calculatedAxis.
Referenced by buildJacobian(), and setAngularLimits().
const btTransform& btGeneric6DofConstraint::getCalculatedTransformA | ( | ) | const [inline] |
Gets the global transform of the offset for body A.
Definition at line 368 of file btGeneric6DofConstraint.h.
References m_calculatedTransformA.
Referenced by btDiscreteDynamicsWorld::debugDrawConstraint().
const btTransform& btGeneric6DofConstraint::getCalculatedTransformB | ( | ) | const [inline] |
Gets the global transform of the offset for body B.
Definition at line 377 of file btGeneric6DofConstraint.h.
References m_calculatedTransformB.
Referenced by btDiscreteDynamicsWorld::debugDrawConstraint().
const btTransform& btGeneric6DofConstraint::getFrameOffsetA | ( | ) | const [inline] |
Definition at line 382 of file btGeneric6DofConstraint.h.
References m_frameInA.
btTransform& btGeneric6DofConstraint::getFrameOffsetA | ( | ) | [inline] |
Definition at line 393 of file btGeneric6DofConstraint.h.
References m_frameInA.
const btTransform& btGeneric6DofConstraint::getFrameOffsetB | ( | ) | const [inline] |
Definition at line 387 of file btGeneric6DofConstraint.h.
References m_frameInB.
btTransform& btGeneric6DofConstraint::getFrameOffsetB | ( | ) | [inline] |
Definition at line 398 of file btGeneric6DofConstraint.h.
References m_frameInB.
void btGeneric6DofConstraint::getInfo1 | ( | btConstraintInfo1 * | info | ) | [virtual] |
internal method used by the constraint solver, don't use them directly
Implements btTypedConstraint.
Definition at line 526 of file btGeneric6DofConstraint.cpp.
References calculateTransforms(), btRigidBody::getCenterOfMassTransform(), i, m_linearLimits, btTypedConstraint::btConstraintInfo1::m_numConstraintRows, btTypedConstraint::m_rbA, btTypedConstraint::m_rbB, m_useSolveConstraintObsolete, btTranslationalLimitMotor::needApplyForce(), btTypedConstraint::btConstraintInfo1::nub, and testAngularLimitMotor().
void btGeneric6DofConstraint::getInfo1NonVirtual | ( | btConstraintInfo1 * | info | ) |
Definition at line 560 of file btGeneric6DofConstraint.cpp.
References btTypedConstraint::btConstraintInfo1::m_numConstraintRows, m_useSolveConstraintObsolete, and btTypedConstraint::btConstraintInfo1::nub.
void btGeneric6DofConstraint::getInfo2 | ( | btConstraintInfo2 * | info | ) | [virtual] |
internal method used by the constraint solver, don't use them directly
Implements btTypedConstraint.
Reimplemented in btGeneric6DofSpringConstraint.
Definition at line 575 of file btGeneric6DofConstraint.cpp.
References btAssert, btRigidBody::getAngularVelocity(), btRigidBody::getCenterOfMassTransform(), btRigidBody::getLinearVelocity(), btTypedConstraint::m_rbA, btTypedConstraint::m_rbB, m_useOffsetForConstraintFrame, m_useSolveConstraintObsolete, setAngularLimits(), and setLinearLimits().
void btGeneric6DofConstraint::getInfo2NonVirtual | ( | btConstraintInfo2 * | info, |
const btTransform & | transA, | ||
const btTransform & | transB, | ||
const btVector3 & | linVelA, | ||
const btVector3 & | linVelB, | ||
const btVector3 & | angVelA, | ||
const btVector3 & | angVelB | ||
) |
Definition at line 600 of file btGeneric6DofConstraint.cpp.
References btAssert, calculateTransforms(), i, m_useOffsetForConstraintFrame, m_useSolveConstraintObsolete, setAngularLimits(), setLinearLimits(), and testAngularLimitMotor().
void btGeneric6DofConstraint::getLinearLowerLimit | ( | btVector3 & | linearLower | ) | [inline] |
Definition at line 450 of file btGeneric6DofConstraint.h.
References m_linearLimits, and btTranslationalLimitMotor::m_lowerLimit.
void btGeneric6DofConstraint::getLinearUpperLimit | ( | btVector3 & | linearUpper | ) | [inline] |
Definition at line 460 of file btGeneric6DofConstraint.h.
References m_linearLimits, and btTranslationalLimitMotor::m_upperLimit.
btScalar btGeneric6DofConstraint::getParam | ( | int | num, |
int | axis = -1 |
||
) | const [virtual] |
return the local value of parameter
Implements btTypedConstraint.
Definition at line 1001 of file btGeneric6DofConstraint.cpp.
References BT_6DOF_FLAGS_AXIS_SHIFT, BT_6DOF_FLAGS_CFM_NORM, BT_6DOF_FLAGS_CFM_STOP, BT_6DOF_FLAGS_ERP_STOP, BT_CONSTRAINT_CFM, BT_CONSTRAINT_STOP_CFM, BT_CONSTRAINT_STOP_ERP, btAssertConstrParams, m_angularLimits, m_flags, m_linearLimits, btTranslationalLimitMotor::m_normalCFM, btRotationalLimitMotor::m_normalCFM, btRotationalLimitMotor::m_stopCFM, btTranslationalLimitMotor::m_stopCFM, btRotationalLimitMotor::m_stopERP, and btTranslationalLimitMotor::m_stopERP.
btScalar btGeneric6DofConstraint::getRelativePivotPosition | ( | int | axis_index | ) | const |
Get the relative position of the constraint pivot.
Definition at line 732 of file btGeneric6DofConstraint.cpp.
References m_calculatedLinearDiff.
Referenced by CcdPhysicsEnvironment::getConstraintParam().
btRotationalLimitMotor* btGeneric6DofConstraint::getRotationalLimitMotor | ( | int | index | ) | [inline] |
Retrieves the angular limit informacion.
Definition at line 490 of file btGeneric6DofConstraint.h.
References m_angularLimits.
Referenced by btDiscreteDynamicsWorld::debugDrawConstraint(), setAngularLimits(), and CcdPhysicsEnvironment::setConstraintParam().
btTranslationalLimitMotor* btGeneric6DofConstraint::getTranslationalLimitMotor | ( | ) | [inline] |
Retrieves the limit informacion.
Definition at line 496 of file btGeneric6DofConstraint.h.
References m_linearLimits.
Referenced by btDiscreteDynamicsWorld::debugDrawConstraint(), and CcdPhysicsEnvironment::setConstraintParam().
bool btGeneric6DofConstraint::getUseFrameOffset | ( | ) | [inline] |
Definition at line 542 of file btGeneric6DofConstraint.h.
References m_useOffsetForConstraintFrame.
bool btGeneric6DofConstraint::isLimited | ( | int | limitIndex | ) | [inline] |
Test limit.
Definition at line 525 of file btGeneric6DofConstraint.h.
References btRotationalLimitMotor::isLimited(), btTranslationalLimitMotor::isLimited(), m_angularLimits, and m_linearLimits.
btGeneric6DofConstraint& btGeneric6DofConstraint::operator= | ( | btGeneric6DofConstraint & | other | ) | [inline, protected] |
Definition at line 321 of file btGeneric6DofConstraint.h.
References btAssert.
SIMD_FORCE_INLINE const char * btGeneric6DofConstraint::serialize | ( | void * | dataBuffer, |
btSerializer * | serializer | ||
) | const [virtual] |
fills the dataBuffer and returns the struct name (and 0 on failure)
Reimplemented from btTypedConstraint.
Reimplemented in btGeneric6DofSpringConstraint.
Definition at line 585 of file btGeneric6DofConstraint.h.
References i, m_angularLimits, btGeneric6DofConstraintData::m_angularLowerLimit, btGeneric6DofConstraintData::m_angularUpperLimit, btVector3FloatData::m_floats, m_frameInA, m_frameInB, m_linearLimits, btGeneric6DofConstraintData::m_linearLowerLimit, btGeneric6DofConstraintData::m_linearUpperLimit, btTranslationalLimitMotor::m_lowerLimit, btGeneric6DofConstraintData::m_rbAFrame, btGeneric6DofConstraintData::m_rbBFrame, btGeneric6DofConstraintData::m_typeConstraintData, btTranslationalLimitMotor::m_upperLimit, btGeneric6DofConstraintData::m_useLinearReferenceFrameA, m_useLinearReferenceFrameA, m_useOffsetForConstraintFrame, btGeneric6DofConstraintData::m_useOffsetForConstraintFrame, and btTransform::serializeFloat().
int btGeneric6DofConstraint::setAngularLimits | ( | btConstraintInfo2 * | info, |
int | row_offset, | ||
const btTransform & | transA, | ||
const btTransform & | transB, | ||
const btVector3 & | linVelA, | ||
const btVector3 & | linVelB, | ||
const btVector3 & | angVelA, | ||
const btVector3 & | angVelB | ||
) | [protected] |
Definition at line 675 of file btGeneric6DofConstraint.cpp.
References BT_6DOF_FLAGS_AXIS_SHIFT, BT_6DOF_FLAGS_CFM_NORM, BT_6DOF_FLAGS_CFM_STOP, BT_6DOF_FLAGS_ERP_STOP, btTypedConstraint::btConstraintInfo2::cfm, btTypedConstraint::btConstraintInfo2::erp, get_limit_motor_info2(), getAxis(), getRotationalLimitMotor(), i, m_angularLimits, m_flags, btRotationalLimitMotor::m_normalCFM, btRotationalLimitMotor::m_stopCFM, btRotationalLimitMotor::m_stopERP, and btRotationalLimitMotor::needApplyTorques().
Referenced by getInfo2(), and getInfo2NonVirtual().
void btGeneric6DofConstraint::setAngularLowerLimit | ( | const btVector3 & | angularLower | ) | [inline] |
Definition at line 465 of file btGeneric6DofConstraint.h.
References btNormalizeAngle(), i, and m_angularLimits.
Referenced by btHinge2Constraint::btHinge2Constraint(), btUniversalConstraint::btUniversalConstraint(), CcdPhysicsEnvironment::createUniversalD6Constraint(), btHinge2Constraint::setLowerLimit(), and btUniversalConstraint::setLowerLimit().
void btGeneric6DofConstraint::setAngularUpperLimit | ( | const btVector3 & | angularUpper | ) | [inline] |
Definition at line 477 of file btGeneric6DofConstraint.h.
References btNormalizeAngle(), i, and m_angularLimits.
Referenced by btHinge2Constraint::btHinge2Constraint(), btUniversalConstraint::btUniversalConstraint(), CcdPhysicsEnvironment::createUniversalD6Constraint(), btHinge2Constraint::setUpperLimit(), and btUniversalConstraint::setUpperLimit().
void btGeneric6DofConstraint::setAxis | ( | const btVector3 & | axis1, |
const btVector3 & | axis2 | ||
) |
Reimplemented in btGeneric6DofSpringConstraint, and btUniversalConstraint.
Definition at line 1053 of file btGeneric6DofConstraint.cpp.
References calculateTransforms(), btTransform::getBasis(), btRigidBody::getCenterOfMassTransform(), btTransform::inverse(), m_frameInA, m_frameInB, btTypedConstraint::m_rbA, btTypedConstraint::m_rbB, btTransform::setIdentity(), and btMatrix3x3::setValue().
void btGeneric6DofConstraint::setFrames | ( | const btTransform & | frameA, |
const btTransform & | frameB | ||
) |
Definition at line 716 of file btGeneric6DofConstraint.cpp.
References buildJacobian(), calculateTransforms(), m_frameInA, and m_frameInB.
Definition at line 502 of file btGeneric6DofConstraint.h.
References btNormalizeAngle(), m_angularLimits, btRotationalLimitMotor::m_hiLimit, m_linearLimits, btRotationalLimitMotor::m_loLimit, btTranslationalLimitMotor::m_lowerLimit, and btTranslationalLimitMotor::m_upperLimit.
Referenced by CcdPhysicsEnvironment::setConstraintParam().
int btGeneric6DofConstraint::setLinearLimits | ( | btConstraintInfo2 * | info, |
int | row, | ||
const btTransform & | transA, | ||
const btTransform & | transB, | ||
const btVector3 & | linVelA, | ||
const btVector3 & | linVelB, | ||
const btVector3 & | angVelA, | ||
const btVector3 & | angVelB | ||
) | [protected] |
Definition at line 627 of file btGeneric6DofConstraint.cpp.
References BT_6DOF_FLAGS_AXIS_SHIFT, BT_6DOF_FLAGS_CFM_NORM, BT_6DOF_FLAGS_CFM_STOP, BT_6DOF_FLAGS_ERP_STOP, btTypedConstraint::btConstraintInfo2::cfm, btTypedConstraint::btConstraintInfo2::erp, get_limit_motor_info2(), btTransform::getBasis(), btMatrix3x3::getColumn(), i, m_angularLimits, btRotationalLimitMotor::m_bounce, m_calculatedTransformA, btTranslationalLimitMotor::m_currentLimit, btRotationalLimitMotor::m_currentLimit, btTranslationalLimitMotor::m_currentLimitError, btRotationalLimitMotor::m_currentLimitError, btTranslationalLimitMotor::m_currentLinearDiff, btRotationalLimitMotor::m_currentPosition, btTranslationalLimitMotor::m_damping, btRotationalLimitMotor::m_damping, btRotationalLimitMotor::m_enableMotor, btTranslationalLimitMotor::m_enableMotor, m_flags, btRotationalLimitMotor::m_hiLimit, btTranslationalLimitMotor::m_limitSoftness, btRotationalLimitMotor::m_limitSoftness, m_linearLimits, btRotationalLimitMotor::m_loLimit, btTranslationalLimitMotor::m_lowerLimit, btRotationalLimitMotor::m_maxLimitForce, btRotationalLimitMotor::m_maxMotorForce, btTranslationalLimitMotor::m_maxMotorForce, btTranslationalLimitMotor::m_normalCFM, btRotationalLimitMotor::m_normalCFM, btRotationalLimitMotor::m_stopCFM, btTranslationalLimitMotor::m_stopCFM, btRotationalLimitMotor::m_stopERP, btTranslationalLimitMotor::m_stopERP, btRotationalLimitMotor::m_targetVelocity, btTranslationalLimitMotor::m_targetVelocity, btTranslationalLimitMotor::m_upperLimit, m_useOffsetForConstraintFrame, and btTranslationalLimitMotor::needApplyForce().
Referenced by getInfo2(), and getInfo2NonVirtual().
void btGeneric6DofConstraint::setLinearLowerLimit | ( | const btVector3 & | linearLower | ) | [inline] |
Definition at line 445 of file btGeneric6DofConstraint.h.
References m_linearLimits, and btTranslationalLimitMotor::m_lowerLimit.
Referenced by btHinge2Constraint::btHinge2Constraint(), btUniversalConstraint::btUniversalConstraint(), and CcdPhysicsEnvironment::createUniversalD6Constraint().
void btGeneric6DofConstraint::setLinearUpperLimit | ( | const btVector3 & | linearUpper | ) | [inline] |
Definition at line 455 of file btGeneric6DofConstraint.h.
References m_linearLimits, and btTranslationalLimitMotor::m_upperLimit.
Referenced by btHinge2Constraint::btHinge2Constraint(), btUniversalConstraint::btUniversalConstraint(), and CcdPhysicsEnvironment::createUniversalD6Constraint().
void btGeneric6DofConstraint::setParam | ( | int | num, |
btScalar | value, | ||
int | axis = -1 |
||
) | [virtual] |
override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5). If no axis is provided, it uses the default axis for this constraint.
Implements btTypedConstraint.
Definition at line 952 of file btGeneric6DofConstraint.cpp.
References BT_6DOF_FLAGS_AXIS_SHIFT, BT_6DOF_FLAGS_CFM_NORM, BT_6DOF_FLAGS_CFM_STOP, BT_6DOF_FLAGS_ERP_STOP, BT_CONSTRAINT_CFM, BT_CONSTRAINT_STOP_CFM, BT_CONSTRAINT_STOP_ERP, btAssertConstrParams, m_angularLimits, m_flags, m_linearLimits, btTranslationalLimitMotor::m_normalCFM, btRotationalLimitMotor::m_normalCFM, btRotationalLimitMotor::m_stopCFM, btTranslationalLimitMotor::m_stopCFM, btRotationalLimitMotor::m_stopERP, and btTranslationalLimitMotor::m_stopERP.
void btGeneric6DofConstraint::setUseFrameOffset | ( | bool | frameOffsetOnOff | ) | [inline] |
Definition at line 543 of file btGeneric6DofConstraint.h.
References m_useOffsetForConstraintFrame.
bool btGeneric6DofConstraint::testAngularLimitMotor | ( | int | axis_index | ) |
Test angular limit.
Calculates angular correction and returns true if limit needs to be corrected.
Definition at line 452 of file btGeneric6DofConstraint.cpp.
References angle(), btAdjustAngleToLimits(), m_angularLimits, m_calculatedAxisAngleDiff, btRotationalLimitMotor::m_currentPosition, btRotationalLimitMotor::needApplyTorques(), and btRotationalLimitMotor::testLimitValue().
Referenced by buildJacobian(), getInfo1(), and getInfo2NonVirtual().
void btGeneric6DofConstraint::updateRHS | ( | btScalar | timeStep | ) |
Definition at line 709 of file btGeneric6DofConstraint.cpp.
btVector3 btGeneric6DofConstraint::m_AnchorPos [protected] |
temporal variables
Definition at line 312 of file btGeneric6DofConstraint.h.
Referenced by buildJacobian(), and calcAnchorPos().
btRotationalLimitMotor btGeneric6DofConstraint::m_angularLimits[3] [protected] |
hinge_parameters
Definition at line 295 of file btGeneric6DofConstraint.h.
Referenced by buildJacobian(), btGeneric6DofSpringConstraint::enableSpring(), getAngularLowerLimit(), getAngularUpperLimit(), getParam(), getRotationalLimitMotor(), btGeneric6DofSpringConstraint::internalUpdateSprings(), isLimited(), serialize(), setAngularLimits(), setAngularLowerLimit(), setAngularUpperLimit(), setLimit(), setLinearLimits(), setParam(), and testAngularLimitMotor().
btVector3 btGeneric6DofConstraint::m_calculatedAxis[3] [protected] |
temporal variables
Definition at line 306 of file btGeneric6DofConstraint.h.
Referenced by calculateAngleInfo(), and getAxis().
btVector3 btGeneric6DofConstraint::m_calculatedAxisAngleDiff [protected] |
temporal variables
Definition at line 305 of file btGeneric6DofConstraint.h.
Referenced by calculateAngleInfo(), getAngle(), btGeneric6DofSpringConstraint::internalUpdateSprings(), btGeneric6DofSpringConstraint::setEquilibriumPoint(), and testAngularLimitMotor().
btVector3 btGeneric6DofConstraint::m_calculatedLinearDiff [protected] |
temporal variables
Definition at line 307 of file btGeneric6DofConstraint.h.
Referenced by calculateLinearInfo(), getRelativePivotPosition(), btGeneric6DofSpringConstraint::internalUpdateSprings(), and btGeneric6DofSpringConstraint::setEquilibriumPoint().
temporal variables
Definition at line 303 of file btGeneric6DofConstraint.h.
Referenced by buildJacobian(), calcAnchorPos(), calculateAngleInfo(), calculateLinearInfo(), calculateTransforms(), get_limit_motor_info2(), btHinge2Constraint::getAnchor(), btUniversalConstraint::getAnchor(), getCalculatedTransformA(), and setLinearLimits().
temporal variables
Definition at line 304 of file btGeneric6DofConstraint.h.
Referenced by buildJacobian(), calcAnchorPos(), calculateAngleInfo(), calculateLinearInfo(), calculateTransforms(), get_limit_motor_info2(), btHinge2Constraint::getAnchor2(), btUniversalConstraint::getAnchor2(), and getCalculatedTransformB().
btScalar btGeneric6DofConstraint::m_factA [protected] |
temporal variables
Definition at line 308 of file btGeneric6DofConstraint.h.
Referenced by calculateTransforms(), and get_limit_motor_info2().
btScalar btGeneric6DofConstraint::m_factB [protected] |
temporal variables
Definition at line 309 of file btGeneric6DofConstraint.h.
Referenced by calculateTransforms(), and get_limit_motor_info2().
int btGeneric6DofConstraint::m_flags [protected] |
temporal variables
Definition at line 317 of file btGeneric6DofConstraint.h.
Referenced by getParam(), setAngularLimits(), setLinearLimits(), and setParam().
btTransform btGeneric6DofConstraint::m_frameInA [protected] |
the constraint space w.r.t body A
relative_frames
Definition at line 277 of file btGeneric6DofConstraint.h.
Referenced by btGeneric6DofConstraint(), btHinge2Constraint::btHinge2Constraint(), btUniversalConstraint::btUniversalConstraint(), calculateTransforms(), getFrameOffsetA(), serialize(), btGeneric6DofSpringConstraint::setAxis(), setAxis(), btUniversalConstraint::setAxis(), and setFrames().
btTransform btGeneric6DofConstraint::m_frameInB [protected] |
the constraint space w.r.t body B
Definition at line 278 of file btGeneric6DofConstraint.h.
Referenced by btGeneric6DofConstraint(), btHinge2Constraint::btHinge2Constraint(), btUniversalConstraint::btUniversalConstraint(), calculateTransforms(), getFrameOffsetB(), serialize(), btGeneric6DofSpringConstraint::setAxis(), setAxis(), btUniversalConstraint::setAxis(), and setFrames().
bool btGeneric6DofConstraint::m_hasStaticBody [protected] |
temporal variables
Definition at line 310 of file btGeneric6DofConstraint.h.
Referenced by calculateTransforms(), and get_limit_motor_info2().
btJacobianEntry btGeneric6DofConstraint::m_jacAng[3] [protected] |
3 orthogonal angular constraints
Definition at line 284 of file btGeneric6DofConstraint.h.
Referenced by buildJacobian().
btJacobianEntry btGeneric6DofConstraint::m_jacLinear[3] [protected] |
3 orthogonal linear constraints
Jacobians
Definition at line 283 of file btGeneric6DofConstraint.h.
Referenced by buildJacobian().
Linear_Limit_parameters
Definition at line 289 of file btGeneric6DofConstraint.h.
Referenced by buildJacobian(), calculateLinearInfo(), btGeneric6DofSpringConstraint::enableSpring(), getInfo1(), getLinearLowerLimit(), getLinearUpperLimit(), getParam(), getTranslationalLimitMotor(), btGeneric6DofSpringConstraint::internalUpdateSprings(), isLimited(), serialize(), setLimit(), setLinearLimits(), setLinearLowerLimit(), setLinearUpperLimit(), and setParam().
btScalar btGeneric6DofConstraint::m_timeStep [protected] |
temporal variables
Definition at line 302 of file btGeneric6DofConstraint.h.
bool btGeneric6DofConstraint::m_useLinearReferenceFrameA [protected] |
temporal variables
Definition at line 314 of file btGeneric6DofConstraint.h.
Referenced by buildJacobian(), and serialize().
bool btGeneric6DofConstraint::m_useOffsetForConstraintFrame [protected] |
temporal variables
Definition at line 315 of file btGeneric6DofConstraint.h.
Referenced by calculateTransforms(), get_limit_motor_info2(), getInfo2(), getInfo2NonVirtual(), getUseFrameOffset(), serialize(), setLinearLimits(), and setUseFrameOffset().
for backwards compatibility during the transition to 'getInfo/getInfo2'
Definition at line 350 of file btGeneric6DofConstraint.h.
Referenced by buildJacobian(), getInfo1(), getInfo1NonVirtual(), getInfo2(), and getInfo2NonVirtual().