Blender
V3.3
|
Go to the source code of this file.
Classes | |
struct | btHingeConstraintDoubleData |
this structure is not used, except for loading pre-2.82 .bullet files More... | |
struct | btHingeConstraintFloatData |
struct | btHingeConstraintDoubleData2 |
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 More... | |
Macros | |
#define | _BT_USE_CENTER_LIMIT_ 1 |
#define | btHingeConstraintData btHingeConstraintFloatData |
#define | btHingeConstraintDataName "btHingeConstraintFloatData" |
Enumerations | |
enum | btHingeFlags { BT_HINGE_FLAGS_CFM_STOP = 1 , BT_HINGE_FLAGS_ERP_STOP = 2 , BT_HINGE_FLAGS_CFM_NORM = 4 , BT_HINGE_FLAGS_ERP_NORM = 8 } |
Variables | |
btHingeConstraint | __pad0__ |
btJacobianEntry | m_jacAng [3] |
btTransform | m_rbAFrame |
btTransform | m_rbBFrame |
btScalar | m_motorTargetVelocity |
btScalar | m_maxMotorImpulse |
btAngularLimit | m_limit |
btScalar | m_kHinge |
btScalar | m_accLimitImpulse |
btScalar | m_hingeAngle |
btScalar | m_referenceSign |
bool | m_angularOnly |
bool | m_enableAngularMotor |
bool | m_useSolveConstraintObsolete |
bool | m_useOffsetForConstraintFrame |
bool | m_useReferenceFrameA |
btScalar | m_accMotorImpulse |
int | m_flags |
btScalar | m_normalCFM |
btScalar | m_normalERP |
btScalar | m_stopCFM |
btScalar | m_stopERP |
btHingeAccumulatedAngleConstraint | __pad1__ |
The getAccumulatedHingeAngle returns the accumulated hinge angle, taking rotation across the -PI/PI boundary into account. More... | |
#define _BT_USE_CENTER_LIMIT_ 1 |
Definition at line 21 of file btHingeConstraint.h.
#define btHingeConstraintData btHingeConstraintFloatData |
Definition at line 33 of file btHingeConstraint.h.
#define btHingeConstraintDataName "btHingeConstraintFloatData" |
Definition at line 34 of file btHingeConstraint.h.
enum btHingeFlags |
Enumerator | |
---|---|
BT_HINGE_FLAGS_CFM_STOP | |
BT_HINGE_FLAGS_ERP_STOP | |
BT_HINGE_FLAGS_CFM_NORM | |
BT_HINGE_FLAGS_ERP_NORM |
Definition at line 37 of file btHingeConstraint.h.
BT_DECLARE_ALIGNED_ALLOCATOR | ( | ) |
btHingeAccumulatedAngleConstraint | ( | btRigidBody & | rbA, |
btRigidBody & | rbB, | ||
const btTransform & | rbAFrame, | ||
const btTransform & | rbBFrame, | ||
bool | useReferenceFrameA = false |
||
) |
Definition at line 381 of file btHingeConstraint.h.
References getHingeAngle().
btHingeAccumulatedAngleConstraint | ( | btRigidBody & | rbA, |
btRigidBody & | rbB, | ||
const btVector3 & | pivotInA, | ||
const btVector3 & | pivotInB, | ||
const btVector3 & | axisInA, | ||
const btVector3 & | axisInB, | ||
bool | useReferenceFrameA = false |
||
) |
Definition at line 369 of file btHingeConstraint.h.
References getHingeAngle().
btHingeAccumulatedAngleConstraint | ( | btRigidBody & | rbA, |
const btTransform & | rbAFrame, | ||
bool | useReferenceFrameA = false |
||
) |
Definition at line 387 of file btHingeConstraint.h.
References getHingeAngle().
btHingeAccumulatedAngleConstraint | ( | btRigidBody & | rbA, |
const btVector3 & | pivotInA, | ||
const btVector3 & | axisInA, | ||
bool | useReferenceFrameA = false |
||
) |
Definition at line 375 of file btHingeConstraint.h.
References getHingeAngle().
btHingeConstraint::btHingeConstraint | ( | btRigidBody & | rbA, |
btRigidBody & | rbB, | ||
const btTransform & | rbAFrame, | ||
const btTransform & | rbBFrame, | ||
bool | useReferenceFrameA = false |
||
) |
Definition at line 144 of file btHingeConstraint.cpp.
References m_biasFactor, m_limitSoftness, m_lowerLimit, m_referenceSign, m_relaxationFactor, m_upperLimit, and m_useReferenceFrameA.
btHingeConstraint::btHingeConstraint | ( | btRigidBody & | rbA, |
btRigidBody & | rbB, | ||
const btVector3 & | pivotInA, | ||
const btVector3 & | pivotInB, | ||
const btVector3 & | axisInA, | ||
const btVector3 & | axisInB, | ||
bool | useReferenceFrameA = false |
||
) |
Definition at line 30 of file btHingeConstraint.cpp.
References btVector3, btRigidBody::getCenterOfMassTransform(), m_biasFactor, m_limitSoftness, m_lowerLimit, m_rbAFrame, m_rbBFrame, m_referenceSign, m_relaxationFactor, m_upperLimit, m_useReferenceFrameA, quatRotate(), shortestArcQuat(), and SIMD_EPSILON.
Referenced by debugDrawConstraint(), RB_constraint_new_hinge(), and RB_constraint_set_limits_hinge().
btHingeConstraint::btHingeConstraint | ( | btRigidBody & | rbA, |
const btTransform & | rbAFrame, | ||
bool | useReferenceFrameA = false |
||
) |
not providing rigidbody B means implicitly using worldspace for body B
Definition at line 173 of file btHingeConstraint.cpp.
References btRigidBody::getCenterOfMassTransform(), m_biasFactor, m_limitSoftness, m_lowerLimit, m_rbA, m_rbAFrame, m_rbBFrame, m_referenceSign, m_relaxationFactor, m_upperLimit, and m_useReferenceFrameA.
btHingeConstraint::btHingeConstraint | ( | btRigidBody & | rbA, |
const btVector3 & | pivotInA, | ||
const btVector3 & | axisInA, | ||
bool | useReferenceFrameA = false |
||
) |
Definition at line 95 of file btHingeConstraint.cpp.
References btPlaneSpace1(), btVector3, btRigidBody::getCenterOfMassTransform(), m_biasFactor, m_limitSoftness, m_lowerLimit, m_rbAFrame, m_rbBFrame, m_referenceSign, m_relaxationFactor, m_upperLimit, m_useReferenceFrameA, quatRotate(), and shortestArcQuat().
|
virtual |
obsolete methods
performs Jacobian calculation, and also calculates angle differences and axis
performs Jacobian calculation, and also calculates angle differences and axis
obsolete methods
we need it for both methods
we need it for both methods
Definition at line 322 of file btGeneric6DofSpring2Constraint.h.
|
virtual |
Definition at line 159 of file btHingeConstraint.h.
References enableMotor(), m_enableAngularMotor, m_maxMotorImpulse, and m_motorTargetVelocity.
Definition at line 169 of file btHingeConstraint.h.
References m_enableAngularMotor.
Referenced by enableAngularMotor().
btScalar btHingeAccumulatedAngleConstraint::getAccumulatedHingeAngle | ( | ) |
Definition at line 315 of file btHingeConstraint.cpp.
References btShortestAngleUpdate(), and getHingeAngle().
const btTransform& getAFrame | ( | ) | const |
Definition at line 273 of file btHingeConstraint.h.
References m_rbAFrame.
|
inline |
Definition at line 297 of file btHingeConstraint.h.
References m_angularOnly.
const btTransform& getBFrame | ( | ) | const |
Definition at line 274 of file btHingeConstraint.h.
References m_rbBFrame.
|
inline |
Definition at line 301 of file btHingeConstraint.h.
References m_enableAngularMotor.
Referenced by getInfo2Internal(), and getInfo2InternalUsingFrameOffset().
|
virtual |
Definition at line 326 of file btHingeConstraint.h.
References m_flags.
btTransform& getFrameOffsetA | ( | ) |
Definition at line 142 of file btHingeConstraint.h.
References m_rbAFrame.
btTransform& getFrameOffsetB | ( | ) |
Definition at line 147 of file btHingeConstraint.h.
References m_rbBFrame.
btScalar btHingeConstraint::getHingeAngle | ( | ) |
The getHingeAngle gives the hinge angle in range [-PI,PI].
Definition at line 642 of file btHingeConstraint.cpp.
References btRigidBody::getCenterOfMassTransform(), m_rbA, and m_rbB.
Referenced by btHingeAccumulatedAngleConstraint(), getAccumulatedHingeAngle(), setMotorTarget(), and testLimit().
btScalar btHingeConstraint::getHingeAngle | ( | const btTransform & | transA, |
const btTransform & | transB | ||
) |
Definition at line 647 of file btHingeConstraint.cpp.
References angle(), btAtan2(), btVector3, m_rbAFrame, m_rbBFrame, and m_referenceSign.
|
virtual |
void getInfo1NonVirtual | ( | btConstraintInfo1 * | info | ) |
|
virtual |
void btHingeConstraint::getInfo2Internal | ( | btConstraintInfo2 * | info, |
const btTransform & | transA, | ||
const btTransform & | transB, | ||
const btVector3 & | angVelA, | ||
const btVector3 & | angVelB | ||
) |
Definition at line 392 of file btHingeConstraint.cpp.
References BT_HINGE_FLAGS_CFM_NORM, BT_HINGE_FLAGS_CFM_STOP, BT_HINGE_FLAGS_ERP_NORM, BT_HINGE_FLAGS_ERP_STOP, btAssert, btTransform, btVector3, btConstraintInfo2::cfm, btConstraintInfo2::erp, btConstraintInfo2::fps, btAngularLimit::getBiasFactor(), btAngularLimit::getCorrection(), getEnableAngularMotor(), getLowerLimit(), getMotorFactor(), btAngularLimit::getRelaxationFactor(), getSolveLimit(), getUpperLimit(), if(), m_angularOnly, m_biasFactor, btConstraintInfo2::m_constraintError, m_flags, m_hingeAngle, btConstraintInfo2::m_J1angularAxis, btConstraintInfo2::m_J1linearAxis, btConstraintInfo2::m_J2angularAxis, btConstraintInfo2::m_J2linearAxis, m_limit, btConstraintInfo2::m_lowerLimit, m_maxMotorImpulse, m_motorTargetVelocity, m_normalCFM, m_normalERP, m_rbAFrame, m_rbBFrame, m_referenceSign, m_relaxationFactor, m_stopCFM, m_stopERP, btConstraintInfo2::m_upperLimit, m_useSolveConstraintObsolete, btConstraintInfo2::rowskip, and SIMD_INFINITY.
Referenced by getInfo2NonVirtual().
void btHingeConstraint::getInfo2InternalUsingFrameOffset | ( | btConstraintInfo2 * | info, |
const btTransform & | transA, | ||
const btTransform & | transB, | ||
const btVector3 & | angVelA, | ||
const btVector3 & | angVelB | ||
) |
Definition at line 734 of file btHingeConstraint.cpp.
References BT_HINGE_FLAGS_CFM_NORM, BT_HINGE_FLAGS_CFM_STOP, BT_HINGE_FLAGS_ERP_NORM, BT_HINGE_FLAGS_ERP_STOP, btAssert, btSqrt(), btTransform, btVector3, btConstraintInfo2::cfm, btConstraintInfo2::erp, btConstraintInfo2::fps, btAngularLimit::getBiasFactor(), btAngularLimit::getCorrection(), getEnableAngularMotor(), btRigidBody::getInvMass(), getLowerLimit(), getMotorFactor(), btAngularLimit::getRelaxationFactor(), getRigidBodyA(), getRigidBodyB(), getSolveLimit(), getUpperLimit(), m_angularOnly, m_biasFactor, btConstraintInfo2::m_constraintError, m_flags, m_hingeAngle, btConstraintInfo2::m_J1angularAxis, btConstraintInfo2::m_J1linearAxis, btConstraintInfo2::m_J2angularAxis, btConstraintInfo2::m_J2linearAxis, m_limit, btConstraintInfo2::m_lowerLimit, m_maxMotorImpulse, m_motorTargetVelocity, m_normalCFM, m_normalERP, m_rbAFrame, m_rbBFrame, m_referenceSign, m_relaxationFactor, m_stopCFM, m_stopERP, btConstraintInfo2::m_upperLimit, m_useSolveConstraintObsolete, btConstraintInfo2::rowskip, SIMD_EPSILON, and SIMD_INFINITY.
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 384 of file btHingeConstraint.cpp.
References getInfo2Internal(), and testLimit().
btScalar getLimitBiasFactor | ( | ) | const |
Definition at line 197 of file btHingeConstraint.h.
References btAngularLimit::getBiasFactor(), m_biasFactor, and m_limit.
btScalar getLimitRelaxationFactor | ( | ) | const |
Definition at line 206 of file btHingeConstraint.h.
References btAngularLimit::getRelaxationFactor(), m_limit, and m_relaxationFactor.
|
inline |
Definition at line 288 of file btHingeConstraint.h.
References btAngularLimit::getSign(), and m_limit.
btScalar getLimitSoftness | ( | ) | const |
Definition at line 188 of file btHingeConstraint.h.
References btAngularLimit::getSoftness(), m_limit, and m_limitSoftness.
btScalar getLowerLimit | ( | ) | const |
Definition at line 248 of file btHingeConstraint.h.
References btAngularLimit::getLow(), m_limit, and m_lowerLimit.
Referenced by getInfo2Internal(), and getInfo2InternalUsingFrameOffset().
|
inline |
Definition at line 309 of file btHingeConstraint.h.
References m_maxMotorImpulse.
|
inline |
Definition at line 305 of file btHingeConstraint.h.
References m_motorTargetVelocity.
|
virtual |
return the local value of parameter
const btRigidBody& getRigidBodyA | ( | ) | const |
Definition at line 123 of file btHingeConstraint.h.
References m_rbA.
const btRigidBody& getRigidBodyB | ( | ) | const |
Definition at line 127 of file btHingeConstraint.h.
References m_rbB.
|
inline |
Definition at line 279 of file btHingeConstraint.h.
References btAngularLimit::isLimit(), and m_limit.
Referenced by getInfo2Internal(), and getInfo2InternalUsingFrameOffset().
btScalar getUpperLimit | ( | ) | const |
Definition at line 257 of file btHingeConstraint.h.
References btAngularLimit::getHigh(), m_limit, and m_upperLimit.
Referenced by getInfo2Internal(), and getInfo2InternalUsingFrameOffset().
bool getUseFrameOffset | ( | ) |
Definition at line 314 of file btHingeConstraint.h.
References m_useOffsetForConstraintFrame.
bool getUseReferenceFrameA | ( | ) | const |
Definition at line 317 of file btHingeConstraint.h.
References m_useReferenceFrameA.
bool hasLimit | ( | ) | const |
Definition at line 239 of file btHingeConstraint.h.
References btAngularLimit::getHalfRange(), m_limit, m_lowerLimit, and m_upperLimit.
|
virtual |
fills the dataBuffer and returns the struct name (and 0 on failure)
Definition at line 321 of file btHingeConstraint.cpp.
Definition at line 154 of file btHingeConstraint.h.
References m_angularOnly.
Definition at line 215 of file btHingeConstraint.h.
References btPlaneSpace1(), btVector3, btRigidBody::getCenterOfMassTransform(), m_rbA, m_rbAFrame, m_rbB, m_rbBFrame, quatRotate(), and shortestArcQuat().
void setFrames | ( | const btTransform & | frameA, |
const btTransform & | frameB | ||
) |
Definition at line 264 of file btSliderConstraint.h.
void setLimit | ( | btScalar | low, |
btScalar | high, | ||
btScalar | _softness = 0.9f , |
||
btScalar | _biasFactor = 0.3f , |
||
btScalar | _relaxationFactor = 1.0f |
||
) |
Definition at line 175 of file btHingeConstraint.h.
References btNormalizeAngle(), high(), low(), m_biasFactor, m_limit, m_limitSoftness, m_lowerLimit, m_relaxationFactor, m_upperLimit, and btAngularLimit::set().
Definition at line 170 of file btHingeConstraint.h.
References m_maxMotorImpulse.
Definition at line 715 of file btHingeConstraint.cpp.
References btAngularLimit::fit(), btRigidBody::getCenterOfMassTransform(), getHingeAngle(), m_limit, m_lowerLimit, m_motorTargetVelocity, m_rbA, m_rbB, and m_upperLimit.
void btHingeConstraint::setMotorTarget | ( | const btQuaternion & | qAinB, |
btScalar | dt | ||
) |
Definition at line 689 of file btHingeConstraint.cpp.
References btVector3, btQuaternion::getAngle(), btQuaternion::inverse(), m_rbAFrame, m_rbBFrame, btQuaternion::normalize(), quatRotate(), setMotorTarget(), shortestArcQuat(), SIMD_PI, and vHinge().
Definition at line 171 of file btHingeConstraint.h.
References m_motorTargetVelocity.
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.
Definition at line 315 of file btHingeConstraint.h.
References m_useOffsetForConstraintFrame.
Definition at line 318 of file btHingeConstraint.h.
References m_useReferenceFrameA.
void btHingeConstraint::testLimit | ( | const btTransform & | transA, |
const btTransform & | transB | ||
) |
Definition at line 657 of file btHingeConstraint.cpp.
References btAdjustAngleToLimits(), getHingeAngle(), m_hingeAngle, m_limit, m_lowerLimit, m_upperLimit, and btAngularLimit::test().
Referenced by getInfo2NonVirtual().
btHingeConstraint __pad0__ |
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 48 of file btHingeConstraint.h.
btHingeAccumulatedAngleConstraint __pad1__ |
The getAccumulatedHingeAngle returns the accumulated hinge angle, taking rotation across the -PI/PI boundary into account.
Definition at line 361 of file btHingeConstraint.h.
btScalar m_accLimitImpulse |
Definition at line 79 of file btHingeConstraint.h.
btScalar m_accMotorImpulse |
Definition at line 89 of file btHingeConstraint.h.
bool m_angularOnly |
Definition at line 83 of file btHingeConstraint.h.
Referenced by getAngularOnly(), and setAngularOnly().
bool m_enableAngularMotor |
Definition at line 84 of file btHingeConstraint.h.
Referenced by enableAngularMotor(), enableMotor(), and getEnableAngularMotor().
int m_flags |
Definition at line 91 of file btHingeConstraint.h.
Referenced by getFlags().
btScalar m_hingeAngle |
Definition at line 80 of file btHingeConstraint.h.
Referenced by getInfo2Internal(), getInfo2InternalUsingFrameOffset(), and testLimit().
btJacobianEntry m_jacAng[3] |
Definition at line 54 of file btHingeConstraint.h.
btScalar m_kHinge |
Definition at line 77 of file btHingeConstraint.h.
btAngularLimit m_limit |
Definition at line 63 of file btHingeConstraint.h.
Referenced by getInfo2Internal(), getInfo2InternalUsingFrameOffset(), getLimitBiasFactor(), getLimitRelaxationFactor(), getLimitSign(), getLimitSoftness(), getLowerLimit(), getSolveLimit(), getUpperLimit(), hasLimit(), setLimit(), setMotorTarget(), and testLimit().
btScalar m_maxMotorImpulse |
Definition at line 60 of file btHingeConstraint.h.
Referenced by enableAngularMotor(), getMaxMotorImpulse(), and setMaxMotorImpulse().
btScalar m_motorTargetVelocity |
Definition at line 59 of file btHingeConstraint.h.
Referenced by enableAngularMotor(), getInfo2Internal(), getInfo2InternalUsingFrameOffset(), getMotorTargetVelocity(), setMotorTarget(), and setMotorTargetVelocity().
btScalar m_normalCFM |
Definition at line 92 of file btHingeConstraint.h.
Referenced by getInfo2Internal(), and getInfo2InternalUsingFrameOffset().
btScalar m_normalERP |
Definition at line 93 of file btHingeConstraint.h.
Referenced by getInfo2Internal(), and getInfo2InternalUsingFrameOffset().
btTransform m_rbAFrame |
Definition at line 56 of file btHingeConstraint.h.
Referenced by getAFrame(), getFrameOffsetA(), and setAxis().
btTransform m_rbBFrame |
Definition at line 57 of file btHingeConstraint.h.
Referenced by getBFrame(), getFrameOffsetB(), and setAxis().
btScalar m_referenceSign |
Definition at line 81 of file btHingeConstraint.h.
Referenced by btHingeConstraint(), getHingeAngle(), getInfo2Internal(), and getInfo2InternalUsingFrameOffset().
btScalar m_stopCFM |
Definition at line 94 of file btHingeConstraint.h.
Referenced by getInfo2Internal(), and getInfo2InternalUsingFrameOffset().
btScalar m_stopERP |
Definition at line 95 of file btHingeConstraint.h.
Referenced by getInfo2Internal(), and getInfo2InternalUsingFrameOffset().
bool m_useOffsetForConstraintFrame |
Definition at line 86 of file btHingeConstraint.h.
Referenced by getUseFrameOffset(), and setUseFrameOffset().
bool m_useReferenceFrameA |
Definition at line 87 of file btHingeConstraint.h.
Referenced by btHingeConstraint(), getUseReferenceFrameA(), and setUseReferenceFrameA().
bool m_useSolveConstraintObsolete |
Definition at line 85 of file btHingeConstraint.h.