hinge constraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space axis defines the orientation of the hinge axis More...
#include <btHingeConstraint.h>


Public Member Functions | |
| btHingeConstraint (btRigidBody &rbA, btRigidBody &rbB, const btVector3 &pivotInA, const btVector3 &pivotInB, btVector3 &axisInA, btVector3 &axisInB, bool useReferenceFrameA=false) | |
| btHingeConstraint (btRigidBody &rbA, const btVector3 &pivotInA, btVector3 &axisInA, bool useReferenceFrameA=false) | |
| btHingeConstraint (btRigidBody &rbA, btRigidBody &rbB, const btTransform &rbAFrame, const btTransform &rbBFrame, bool useReferenceFrameA=false) | |
| btHingeConstraint (btRigidBody &rbA, const btTransform &rbAFrame, bool useReferenceFrameA=false) | |
| virtual void | buildJacobian () |
| internal method used by the constraint solver, don't use them directly | |
| 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 &angVelA, const btVector3 &angVelB) |
| void | getInfo2Internal (btConstraintInfo2 *info, const btTransform &transA, const btTransform &transB, const btVector3 &angVelA, const btVector3 &angVelB) |
| void | getInfo2InternalUsingFrameOffset (btConstraintInfo2 *info, const btTransform &transA, const btTransform &transB, const btVector3 &angVelA, const btVector3 &angVelB) |
| void | updateRHS (btScalar timeStep) |
| const btRigidBody & | getRigidBodyA () const |
| const btRigidBody & | getRigidBodyB () const |
| btRigidBody & | getRigidBodyA () |
| btRigidBody & | getRigidBodyB () |
| void | setAngularOnly (bool angularOnly) |
| void | enableAngularMotor (bool enableMotor, btScalar targetVelocity, btScalar maxMotorImpulse) |
| void | enableMotor (bool enableMotor) |
| void | setMaxMotorImpulse (btScalar maxMotorImpulse) |
| void | setMotorTarget (const btQuaternion &qAinB, btScalar dt) |
| void | setMotorTarget (btScalar targetAngle, btScalar dt) |
| void | setLimit (btScalar low, btScalar high, btScalar _softness=0.9f, btScalar _biasFactor=0.3f, btScalar _relaxationFactor=1.0f) |
| void | setAxis (btVector3 &axisInA) |
| btScalar | getLowerLimit () const |
| btScalar | getUpperLimit () const |
| btScalar | getHingeAngle () |
| btScalar | getHingeAngle (const btTransform &transA, const btTransform &transB) |
| void | testLimit (const btTransform &transA, const btTransform &transB) |
| const btTransform & | getAFrame () const |
| const btTransform & | getBFrame () const |
| btTransform & | getAFrame () |
| btTransform & | getBFrame () |
| int | getSolveLimit () |
| btScalar | getLimitSign () |
| bool | getAngularOnly () |
| bool | getEnableAngularMotor () |
| btScalar | getMotorTargetVelosity () |
| btScalar | getMaxMotorImpulse () |
| bool | getUseFrameOffset () |
| void | setUseFrameOffset (bool frameOffsetOnOff) |
| virtual void | setParam (int num, btScalar value, int axis=-1) |
| override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5). | |
| virtual btScalar | getParam (int num, int axis=-1) const |
| return the local value of parameter | |
| 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) | |
Private Attributes | |
| btJacobianEntry | m_jac [3] |
| btJacobianEntry | m_jacAng [3] |
| btTransform | m_rbAFrame |
| btTransform | m_rbBFrame |
| btScalar | m_motorTargetVelocity |
| btScalar | m_maxMotorImpulse |
| btScalar | m_limitSoftness |
| btScalar | m_biasFactor |
| btScalar | m_relaxationFactor |
| btScalar | m_lowerLimit |
| btScalar | m_upperLimit |
| btScalar | m_kHinge |
| btScalar | m_limitSign |
| btScalar | m_correction |
| btScalar | m_accLimitImpulse |
| btScalar | m_hingeAngle |
| btScalar | m_referenceSign |
| bool | m_angularOnly |
| bool | m_enableAngularMotor |
| bool | m_solveLimit |
| bool | m_useSolveConstraintObsolete |
| bool | m_useOffsetForConstraintFrame |
| bool | m_useReferenceFrameA |
| btScalar | m_accMotorImpulse |
| int | m_flags |
| btScalar | m_normalCFM |
| btScalar | m_stopCFM |
| btScalar | m_stopERP |
hinge constraint between two rigidbodies each with a pivotpoint that descibes the axis location in local space axis defines the orientation of the hinge axis
Definition at line 46 of file btHingeConstraint.h.
| btHingeConstraint::btHingeConstraint | ( | btRigidBody & | rbA, | |
| btRigidBody & | rbB, | |||
| const btVector3 & | pivotInA, | |||
| const btVector3 & | pivotInB, | |||
| btVector3 & | axisInA, | |||
| btVector3 & | axisInB, | |||
| bool | useReferenceFrameA = false | |||
| ) |
Definition at line 37 of file btHingeConstraint.cpp.
| btHingeConstraint::btHingeConstraint | ( | btRigidBody & | rbA, | |
| const btVector3 & | pivotInA, | |||
| btVector3 & | axisInA, | |||
| bool | useReferenceFrameA = false | |||
| ) |
Definition at line 90 of file btHingeConstraint.cpp.
| btHingeConstraint::btHingeConstraint | ( | btRigidBody & | rbA, | |
| btRigidBody & | rbB, | |||
| const btTransform & | rbAFrame, | |||
| const btTransform & | rbBFrame, | |||
| bool | useReferenceFrameA = false | |||
| ) |
Definition at line 132 of file btHingeConstraint.cpp.
| btHingeConstraint::btHingeConstraint | ( | btRigidBody & | rbA, | |
| const btTransform & | rbAFrame, | |||
| bool | useReferenceFrameA = false | |||
| ) |
not providing rigidbody B means implicitly using worldspace for body B
Definition at line 154 of file btHingeConstraint.cpp.
| void btHingeConstraint::buildJacobian | ( | ) | [virtual] |
internal method used by the constraint solver, don't use them directly
Reimplemented from btTypedConstraint.
Definition at line 179 of file btHingeConstraint.cpp.
| SIMD_FORCE_INLINE int btHingeConstraint::calculateSerializeBufferSize | ( | ) | const [virtual] |
Reimplemented from btTypedConstraint.
Definition at line 303 of file btHingeConstraint.h.
| void btHingeConstraint::enableAngularMotor | ( | bool | enableMotor, | |
| btScalar | targetVelocity, | |||
| btScalar | maxMotorImpulse | |||
| ) | [inline] |
Definition at line 142 of file btHingeConstraint.h.
| void btHingeConstraint::enableMotor | ( | bool | enableMotor | ) | [inline] |
Definition at line 152 of file btHingeConstraint.h.
| btTransform& btHingeConstraint::getAFrame | ( | ) | [inline] |
Definition at line 213 of file btHingeConstraint.h.
| const btTransform& btHingeConstraint::getAFrame | ( | ) | const [inline] |
Definition at line 210 of file btHingeConstraint.h.
| bool btHingeConstraint::getAngularOnly | ( | ) | [inline] |
Definition at line 226 of file btHingeConstraint.h.
| btTransform& btHingeConstraint::getBFrame | ( | ) | [inline] |
Definition at line 214 of file btHingeConstraint.h.
| const btTransform& btHingeConstraint::getBFrame | ( | ) | const [inline] |
Definition at line 211 of file btHingeConstraint.h.
| bool btHingeConstraint::getEnableAngularMotor | ( | ) | [inline] |
Definition at line 230 of file btHingeConstraint.h.
| btScalar btHingeConstraint::getHingeAngle | ( | const btTransform & | transA, | |
| const btTransform & | transB | |||
| ) |
Definition at line 563 of file btHingeConstraint.cpp.
| btScalar btHingeConstraint::getHingeAngle | ( | ) |
Definition at line 558 of file btHingeConstraint.cpp.
| void btHingeConstraint::getInfo1 | ( | btConstraintInfo1 * | info | ) | [virtual] |
internal method used by the constraint solver, don't use them directly
Implements btTypedConstraint.
Definition at line 268 of file btHingeConstraint.cpp.
| void btHingeConstraint::getInfo1NonVirtual | ( | btConstraintInfo1 * | info | ) |
Definition at line 291 of file btHingeConstraint.cpp.
| void btHingeConstraint::getInfo2 | ( | btConstraintInfo2 * | info | ) | [virtual] |
internal method used by the constraint solver, don't use them directly
Implements btTypedConstraint.
Definition at line 306 of file btHingeConstraint.cpp.
| void btHingeConstraint::getInfo2Internal | ( | btConstraintInfo2 * | info, | |
| const btTransform & | transA, | |||
| const btTransform & | transB, | |||
| const btVector3 & | angVelA, | |||
| const btVector3 & | angVelB | |||
| ) |
Definition at line 328 of file btHingeConstraint.cpp.
| void btHingeConstraint::getInfo2InternalUsingFrameOffset | ( | btConstraintInfo2 * | info, | |
| const btTransform & | transA, | |||
| const btTransform & | transB, | |||
| const btVector3 & | angVelA, | |||
| const btVector3 & | angVelB | |||
| ) |
Definition at line 674 of file btHingeConstraint.cpp.
| void btHingeConstraint::getInfo2NonVirtual | ( | btConstraintInfo2 * | info, | |
| const btTransform & | transA, | |||
| const btTransform & | transB, | |||
| const btVector3 & | angVelA, | |||
| const btVector3 & | angVelB | |||
| ) |
the regular (virtual) implementation getInfo2 already performs 'testLimit' during getInfo1, so we need to do it now
Definition at line 319 of file btHingeConstraint.cpp.
| btScalar btHingeConstraint::getLimitSign | ( | ) | [inline] |
Definition at line 221 of file btHingeConstraint.h.
| btScalar btHingeConstraint::getLowerLimit | ( | ) | const [inline] |
Definition at line 192 of file btHingeConstraint.h.
| btScalar btHingeConstraint::getMaxMotorImpulse | ( | ) | [inline] |
Definition at line 238 of file btHingeConstraint.h.
| btScalar btHingeConstraint::getMotorTargetVelosity | ( | ) | [inline] |
Definition at line 234 of file btHingeConstraint.h.
| btScalar btHingeConstraint::getParam | ( | int | num, | |
| int | axis = -1 | |||
| ) | const [virtual] |
return the local value of parameter
Implements btTypedConstraint.
Definition at line 962 of file btHingeConstraint.cpp.
| btRigidBody& btHingeConstraint::getRigidBodyA | ( | ) | [inline] |
Reimplemented from btTypedConstraint.
Definition at line 127 of file btHingeConstraint.h.
| const btRigidBody& btHingeConstraint::getRigidBodyA | ( | ) | const [inline] |
Reimplemented from btTypedConstraint.
Definition at line 118 of file btHingeConstraint.h.
| btRigidBody& btHingeConstraint::getRigidBodyB | ( | ) | [inline] |
Reimplemented from btTypedConstraint.
Definition at line 132 of file btHingeConstraint.h.
| const btRigidBody& btHingeConstraint::getRigidBodyB | ( | ) | const [inline] |
Reimplemented from btTypedConstraint.
Definition at line 122 of file btHingeConstraint.h.
| int btHingeConstraint::getSolveLimit | ( | ) | [inline] |
Definition at line 216 of file btHingeConstraint.h.
| btScalar btHingeConstraint::getUpperLimit | ( | ) | const [inline] |
Definition at line 197 of file btHingeConstraint.h.
| bool btHingeConstraint::getUseFrameOffset | ( | ) | [inline] |
Definition at line 243 of file btHingeConstraint.h.
| SIMD_FORCE_INLINE const char * btHingeConstraint::serialize | ( | void * | dataBuffer, | |
| btSerializer * | serializer | |||
| ) | const [virtual] |
fills the dataBuffer and returns the struct name (and 0 on failure)
Reimplemented from btTypedConstraint.
Definition at line 309 of file btHingeConstraint.h.
| void btHingeConstraint::setAngularOnly | ( | bool | angularOnly | ) | [inline] |
Definition at line 137 of file btHingeConstraint.h.
| void btHingeConstraint::setAxis | ( | btVector3 & | axisInA | ) | [inline] |
Definition at line 169 of file btHingeConstraint.h.
| void btHingeConstraint::setLimit | ( | btScalar | low, | |
| btScalar | high, | |||
| btScalar | _softness = 0.9f, |
|||
| btScalar | _biasFactor = 0.3f, |
|||
| btScalar | _relaxationFactor = 1.0f | |||
| ) | [inline] |
Definition at line 158 of file btHingeConstraint.h.
| void btHingeConstraint::setMaxMotorImpulse | ( | btScalar | maxMotorImpulse | ) | [inline] |
Definition at line 153 of file btHingeConstraint.h.
Definition at line 656 of file btHingeConstraint.cpp.
| void btHingeConstraint::setMotorTarget | ( | const btQuaternion & | qAinB, | |
| btScalar | dt | |||
| ) |
Definition at line 631 of file btHingeConstraint.cpp.
| void btHingeConstraint::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 933 of file btHingeConstraint.cpp.
| void btHingeConstraint::setUseFrameOffset | ( | bool | frameOffsetOnOff | ) | [inline] |
Definition at line 244 of file btHingeConstraint.h.
| void btHingeConstraint::testLimit | ( | const btTransform & | transA, | |
| const btTransform & | transB | |||
| ) |
Definition at line 602 of file btHingeConstraint.cpp.
| void btHingeConstraint::updateRHS | ( | btScalar | timeStep | ) |
Definition at line 551 of file btHingeConstraint.cpp.
btScalar btHingeConstraint::m_accLimitImpulse [private] |
Definition at line 72 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_accMotorImpulse [private] |
Definition at line 83 of file btHingeConstraint.h.
bool btHingeConstraint::m_angularOnly [private] |
Definition at line 76 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_biasFactor [private] |
Definition at line 61 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_correction [private] |
Definition at line 70 of file btHingeConstraint.h.
bool btHingeConstraint::m_enableAngularMotor [private] |
Definition at line 77 of file btHingeConstraint.h.
int btHingeConstraint::m_flags [private] |
Definition at line 85 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_hingeAngle [private] |
Definition at line 73 of file btHingeConstraint.h.
btJacobianEntry btHingeConstraint::m_jac[3] [private] |
Definition at line 51 of file btHingeConstraint.h.
btJacobianEntry btHingeConstraint::m_jacAng[3] [private] |
Definition at line 52 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_kHinge [private] |
Definition at line 67 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_limitSign [private] |
Definition at line 69 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_limitSoftness [private] |
Definition at line 60 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_lowerLimit [private] |
Definition at line 64 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_maxMotorImpulse [private] |
Definition at line 58 of file btHingeConstraint.h.
Definition at line 57 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_normalCFM [private] |
Definition at line 86 of file btHingeConstraint.h.
btTransform btHingeConstraint::m_rbAFrame [private] |
Definition at line 54 of file btHingeConstraint.h.
btTransform btHingeConstraint::m_rbBFrame [private] |
Definition at line 55 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_referenceSign [private] |
Definition at line 74 of file btHingeConstraint.h.
Definition at line 62 of file btHingeConstraint.h.
bool btHingeConstraint::m_solveLimit [private] |
Definition at line 78 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_stopCFM [private] |
Definition at line 87 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_stopERP [private] |
Definition at line 88 of file btHingeConstraint.h.
btScalar btHingeConstraint::m_upperLimit [private] |
Definition at line 65 of file btHingeConstraint.h.
bool btHingeConstraint::m_useOffsetForConstraintFrame [private] |
Definition at line 80 of file btHingeConstraint.h.
bool btHingeConstraint::m_useReferenceFrameA [private] |
Definition at line 81 of file btHingeConstraint.h.
bool btHingeConstraint::m_useSolveConstraintObsolete [private] |
Definition at line 79 of file btHingeConstraint.h.
1.6.1