Blender
V3.3
|
Go to the source code of this file.
Classes | |
struct | btConeTwistConstraintDoubleData |
struct | btConeTwistConstraintData |
this structure is not used, except for loading pre-2.82 .bullet files More... | |
Macros | |
#define | btConeTwistConstraintData2 btConeTwistConstraintData |
#define | btConeTwistConstraintDataName "btConeTwistConstraintData" |
Enumerations | |
enum | btConeTwistFlags { BT_CONETWIST_FLAGS_LIN_CFM = 1 , BT_CONETWIST_FLAGS_LIN_ERP = 2 , BT_CONETWIST_FLAGS_ANG_CFM = 4 } |
#define btConeTwistConstraintData2 btConeTwistConstraintData |
Definition at line 43 of file btConeTwistConstraint.h.
#define btConeTwistConstraintDataName "btConeTwistConstraintData" |
Definition at line 44 of file btConeTwistConstraint.h.
enum btConeTwistFlags |
Enumerator | |
---|---|
BT_CONETWIST_FLAGS_LIN_CFM | |
BT_CONETWIST_FLAGS_LIN_ERP | |
BT_CONETWIST_FLAGS_ANG_CFM |
Definition at line 49 of file btConeTwistConstraint.h.
|
protected |
Definition at line 929 of file btConeTwistConstraint.cpp.
References fabs(), grad(), m_swingSpan1, m_swingSpan2, SIMD_EPSILON, y, and z.
Referenced by calcAngleInfo2().
BT_DECLARE_ALIGNED_ALLOCATOR | ( | ) |
btConeTwistConstraint::btConeTwistConstraint | ( | btRigidBody & | rbA, |
btRigidBody & | rbB, | ||
const btTransform & | rbAFrame, | ||
const btTransform & | rbBFrame | ||
) |
Definition at line 35 of file btConeTwistConstraint.cpp.
References init.
Referenced by debugDrawConstraint().
btConeTwistConstraint::btConeTwistConstraint | ( | btRigidBody & | rbA, |
const btTransform & | rbAFrame | ||
) |
Definition at line 42 of file btConeTwistConstraint.cpp.
References btVector3, init, m_rbAFrame, and m_rbBFrame.
|
virtual |
internal method used by the constraint solver, don't use them directly
we need it for both methods
Definition at line 246 of file btConeTwistConstraint.cpp.
References btJacobianEntry, btPlaneSpace1(), btVector3, calcAngleInfo2(), btRigidBody::getCenterOfMassPosition(), btRigidBody::getCenterOfMassTransform(), btRigidBody::getInvInertiaDiagLocal(), btRigidBody::getInvInertiaTensorWorld(), btRigidBody::getInvMass(), m_accMotorImpulse, m_accSwingLimitImpulse, m_accTwistLimitImpulse, m_angularOnly, m_appliedImpulse, m_rbA, m_rbAFrame, m_rbB, m_rbBFrame, m_useSolveConstraintObsolete, normal, and SIMD_EPSILON.
Referenced by setFrames().
void btConeTwistConstraint::calcAngleInfo | ( | ) |
Definition at line 515 of file btConeTwistConstraint.cpp.
References btAtan2Fast(), btFabs(), btVector3, btRigidBody::getCenterOfMassTransform(), getRigidBodyA(), getRigidBodyB(), m_rbAFrame, m_rbBFrame, m_solveSwingLimit, m_solveTwistLimit, m_swingAxis, m_swingCorrection, m_swingSpan1, m_swingSpan2, m_twistAngle, m_twistAxis, m_twistCorrection, m_twistLimitSign, m_twistSpan, quatRotate(), and shortestArcQuat().
void btConeTwistConstraint::calcAngleInfo2 | ( | const btTransform & | transA, |
const btTransform & | transB, | ||
const btMatrix3x3 & | invInertiaWorldA, | ||
const btMatrix3x3 & | invInertiaWorldB | ||
) |
Definition at line 604 of file btConeTwistConstraint.cpp.
References adjustSwingAxisToUseEllipseNormal(), btAtan2(), btCos(), btFuzzyZero(), btSin(), btTransform, btVector3, computeAngularImpulseDenominator(), computeConeLimitInfo(), computeTwistLimitInfo(), btQuaternion::getAngle(), btQuaternion::inverse(), m_bMotorEnabled, m_fixThresh, m_kSwing, m_kTwist, m_limitSoftness, m_qTarget, m_rbAFrame, m_rbBFrame, m_solveSwingLimit, m_solveTwistLimit, m_swingAxis, m_swingCorrection, m_swingLimitRatio, m_swingSpan1, m_swingSpan2, m_twistAngle, m_twistAxis, m_twistAxisA, m_twistCorrection, m_twistLimitRatio, m_twistLimitSign, m_twistSpan, m_useSolveConstraintObsolete, btQuaternion::normalize(), quatRotate(), shortestArcQuat(), SIMD_EPSILON, vTwist(), x, y, and z.
Referenced by buildJacobian(), and getInfo2NonVirtual().
|
virtual |
|
protected |
Definition at line 807 of file btConeTwistConstraint.cpp.
References btAssert, btVector3, fabs(), btQuaternion::getAngle(), m_swingSpan1, m_swingSpan2, norm(), SIMD_EPSILON, and sqrt().
Referenced by calcAngleInfo2(), and setMotorTargetInConstraintSpace().
|
protected |
Definition at line 904 of file btConeTwistConstraint.cpp.
References btAssert, btVector3, btQuaternion::getAngle(), SIMD_EPSILON, and SIMD_PI.
Referenced by calcAngleInfo2(), and setMotorTargetInConstraintSpace().
Definition at line 298 of file btConeTwistConstraint.h.
References usdtokens::b(), and m_bMotorEnabled.
btTransform & getAFrame | ( | ) | const |
Definition at line 244 of file btConeTwistConstraint.h.
References m_rbAFrame.
bool getAngularOnly | ( | ) | const |
Definition at line 165 of file btConeTwistConstraint.h.
References m_angularOnly.
btTransform & getBFrame | ( | ) | const |
Definition at line 245 of file btConeTwistConstraint.h.
References m_rbBFrame.
|
inline |
Definition at line 281 of file btConeTwistConstraint.h.
References m_biasFactor.
btScalar getDamping | ( | ) | const |
Definition at line 295 of file btConeTwistConstraint.h.
References m_damping.
btScalar getFixThresh | ( | ) |
Definition at line 313 of file btConeTwistConstraint.h.
References m_fixThresh.
int getFlags | ( | ) | const |
Definition at line 347 of file btConeTwistConstraint.h.
References m_flags.
btTransform & getFrameOffsetA | ( | ) | const |
Definition at line 334 of file btConeTwistConstraint.h.
References m_rbAFrame.
btTransform & getFrameOffsetB | ( | ) | const |
Definition at line 339 of file btConeTwistConstraint.h.
References m_rbBFrame.
|
virtual |
void btSliderConstraint::getInfo1NonVirtual | ( | btConstraintInfo1 * | info | ) |
Definition at line 97 of file btConeTwistConstraint.cpp.
References btConstraintInfo1::m_numConstraintRows, and btConstraintInfo1::nub.
|
virtual |
void btConeTwistConstraint::getInfo2NonVirtual | ( | btConstraintInfo2 * | info, |
const btTransform & | transA, | ||
const btTransform & | transB, | ||
const btMatrix3x3 & | invInertiaWorldA, | ||
const btMatrix3x3 & | invInertiaWorldB | ||
) |
Definition at line 109 of file btConeTwistConstraint.cpp.
References BT_CONETWIST_FLAGS_ANG_CFM, BT_CONETWIST_FLAGS_LIN_CFM, BT_CONETWIST_FLAGS_LIN_ERP, btAssert, btTransform, btVector3, calcAngleInfo2(), btConstraintInfo2::cfm, btConstraintInfo2::erp, btConstraintInfo2::fps, m_angCFM, m_biasFactor, m_bMotorEnabled, btConstraintInfo2::m_constraintError, m_fixThresh, m_flags, btConstraintInfo2::m_J1angularAxis, btConstraintInfo2::m_J1linearAxis, btConstraintInfo2::m_J2angularAxis, btConstraintInfo2::m_J2linearAxis, m_linCFM, m_linERP, btConstraintInfo2::m_lowerLimit, m_maxMotorImpulse, m_rbAFrame, m_rbBFrame, m_relaxationFactor, m_solveSwingLimit, m_solveTwistLimit, m_swingAxis, m_swingCorrection, m_swingSpan1, m_swingSpan2, m_twistAxis, m_twistCorrection, m_twistSpan, btConstraintInfo2::m_upperLimit, m_useSolveConstraintObsolete, btConstraintInfo2::rowskip, and SIMD_INFINITY.
btScalar getLimit | ( | int | limitIndex | ) | const |
Definition at line 195 of file btConeTwistConstraint.h.
References btAssert, m_swingSpan1, m_swingSpan2, and m_twistSpan.
|
inline |
Definition at line 277 of file btConeTwistConstraint.h.
References m_limitSoftness.
btScalar getMaxMotorImpulse | ( | ) | const |
Definition at line 300 of file btConeTwistConstraint.h.
References m_maxMotorImpulse.
const btQuaternion& getMotorTarget | ( | ) | const |
Definition at line 321 of file btConeTwistConstraint.h.
References m_qTarget.
|
virtual |
return the local value of parameter
btVector3 btConeTwistConstraint::GetPointForAngle | ( | btScalar | fAngleInRadians, |
btScalar | fLength | ||
) | const |
Definition at line 871 of file btConeTwistConstraint.cpp.
References btCos(), btSin(), btVector3, fabs(), m_swingSpan1, m_swingSpan2, norm(), quatRotate(), SIMD_EPSILON, and sqrt().
|
inline |
Definition at line 285 of file btConeTwistConstraint.h.
References m_relaxationFactor.
btRigidBody & getRigidBodyA | ( | ) | const |
Definition at line 151 of file btConeTwistConstraint.h.
References m_rbA.
Referenced by calcAngleInfo(), calculateTransforms(), getInfo2InternalUsingFrameOffset(), solveConstraintObsolete(), and solveSingleIteration().
btRigidBody & getRigidBodyB | ( | ) | const |
Definition at line 155 of file btConeTwistConstraint.h.
References m_rbB.
Referenced by calcAngleInfo(), calculateTransforms(), getInfo2InternalUsingFrameOffset(), solveConstraintObsolete(), and solveSingleIteration().
|
inline |
Definition at line 252 of file btConeTwistConstraint.h.
References m_solveSwingLimit.
|
inline |
Definition at line 247 of file btConeTwistConstraint.h.
References m_solveTwistLimit.
|
inline |
Definition at line 265 of file btConeTwistConstraint.h.
References m_swingSpan1.
|
inline |
Definition at line 269 of file btConeTwistConstraint.h.
References m_swingSpan2.
|
inline |
Definition at line 289 of file btConeTwistConstraint.h.
References m_twistAngle.
|
inline |
Definition at line 257 of file btConeTwistConstraint.h.
References m_twistLimitSign.
|
inline |
Definition at line 273 of file btConeTwistConstraint.h.
References m_twistSpan.
|
protected |
Definition at line 28 of file workbench_effect_antialiasing.c.
bool isMaxMotorImpulseNormalized | ( | ) | const |
Definition at line 301 of file btConeTwistConstraint.h.
References m_bNormalizedMotorStrength.
bool isMotorEnabled | ( | ) | const |
Definition at line 299 of file btConeTwistConstraint.h.
References m_bMotorEnabled.
bool isPastSwingLimit | ( | ) |
Definition at line 293 of file btConeTwistConstraint.h.
References m_solveSwingLimit.
|
virtual |
fills the dataBuffer and returns the struct name (and 0 on failure)
Definition at line 160 of file btConeTwistConstraint.h.
References m_angularOnly.
Definition at line 296 of file btConeTwistConstraint.h.
References m_damping.
Referenced by btHinge2Constraint().
Definition at line 314 of file btConeTwistConstraint.h.
References m_fixThresh.
|
virtual |
Definition at line 1110 of file btConeTwistConstraint.cpp.
References buildJacobian(), m_rbAFrame, and m_rbBFrame.
void setLimit | ( | btScalar | _swingSpan1, |
btScalar | _swingSpan2, | ||
btScalar | _twistSpan, | ||
btScalar | _softness = 1.f , |
||
btScalar | _biasFactor = 0.3f , |
||
btScalar | _relaxationFactor = 1.0f |
||
) |
Definition at line 233 of file btConeTwistConstraint.h.
References m_biasFactor, m_limitSoftness, m_relaxationFactor, m_swingSpan1, m_swingSpan2, and m_twistSpan.
Definition at line 170 of file btConeTwistConstraint.h.
References m_swingSpan1, m_swingSpan2, and m_twistSpan.
Definition at line 302 of file btConeTwistConstraint.h.
References m_bNormalizedMotorStrength, and m_maxMotorImpulse.
Definition at line 307 of file btConeTwistConstraint.h.
References m_bNormalizedMotorStrength, and m_maxMotorImpulse.
void btConeTwistConstraint::setMotorTarget | ( | const btQuaternion & | q | ) |
Definition at line 961 of file btConeTwistConstraint.cpp.
References m_rbAFrame, m_rbBFrame, and setMotorTargetInConstraintSpace().
Referenced by setMotorTarget().
void btConeTwistConstraint::setMotorTargetInConstraintSpace | ( | const btQuaternion & | q | ) |
Definition at line 974 of file btConeTwistConstraint.cpp.
References btVector3, computeConeLimitInfo(), computeTwistLimitInfo(), fabs(), btQuaternion::inverse(), m_qTarget, m_swingSpan1, m_swingSpan2, m_twistSpan, btQuaternion::normalize(), quatRotate(), shortestArcQuat(), SIMD_EPSILON, and vTwist().
Referenced by setMotorTarget().
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.
|
virtual |
internal method used by the constraint solver, don't use them directly
solve angular part
Definition at line 292 of file btConeTwistConstraint.cpp.
References btAssert, btMax(), btTransform, btVector3, btTransformUtil::calculateVelocity(), btRigidBody::computeAngularImpulseDenominator(), blender::math::dot(), btRigidBody::getCenterOfMassPosition(), btRigidBody::getCenterOfMassTransform(), btRigidBody::getInvInertiaTensorWorld(), btRigidBody::getInvMass(), getRigidBodyA(), getRigidBodyB(), btTransformUtil::integrateTransform(), m_accMotorImpulse, m_accSwingLimitImpulse, m_accTwistLimitImpulse, m_angularOnly, m_appliedImpulse, m_biasFactor, m_bMotorEnabled, m_bNormalizedMotorStrength, m_damping, m_kSwing, m_kTwist, m_maxMotorImpulse, m_qTarget, m_rbA, m_rbAFrame, m_rbB, m_rbBFrame, m_relaxationFactor, m_solveSwingLimit, m_solveTwistLimit, m_swingAxis, m_swingCorrection, m_swingLimitRatio, m_twistAxis, m_twistAxisA, m_twistCorrection, m_twistLimitRatio, m_useSolveConstraintObsolete, normal, and SIMD_EPSILON.
Definition at line 509 of file btConeTwistConstraint.cpp.
References void.
btConeTwistConstraint __pad0__ |
btConeTwistConstraint can be used to simulate ragdoll joints (upper arm, leg etc)
Definition at line 58 of file btConeTwistConstraint.h.
btVector3 m_accMotorImpulse |
Definition at line 111 of file btConeTwistConstraint.h.
Referenced by buildJacobian(), and solveConstraintObsolete().
btScalar m_accSwingLimitImpulse |
Definition at line 92 of file btConeTwistConstraint.h.
Referenced by buildJacobian(), and solveConstraintObsolete().
btScalar m_accTwistLimitImpulse |
Definition at line 93 of file btConeTwistConstraint.h.
Referenced by buildJacobian(), and solveConstraintObsolete().
btScalar m_angCFM |
Definition at line 117 of file btConeTwistConstraint.h.
Referenced by getInfo2NonVirtual().
bool m_angularOnly |
Definition at line 95 of file btConeTwistConstraint.h.
Referenced by buildJacobian(), getAngularOnly(), getInfo2Internal(), getInfo2InternalUsingFrameOffset(), setAngularOnly(), and solveConstraintObsolete().
btScalar m_biasFactor |
Definition at line 69 of file btConeTwistConstraint.h.
Referenced by btAngularLimit::btAngularLimit(), btHingeConstraint(), getBiasFactor(), btAngularLimit::getBiasFactor(), getInfo2Internal(), getInfo2InternalUsingFrameOffset(), getInfo2NonVirtual(), getLimitBiasFactor(), setLimit(), and solveConstraintObsolete().
bool m_bMotorEnabled |
Definition at line 107 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo2(), enableMotor(), getInfo2NonVirtual(), isMotorEnabled(), and solveConstraintObsolete().
bool m_bNormalizedMotorStrength |
Definition at line 108 of file btConeTwistConstraint.h.
Referenced by isMaxMotorImpulseNormalized(), setMaxMotorImpulse(), setMaxMotorImpulseNormalized(), and solveConstraintObsolete().
btScalar m_damping |
Definition at line 72 of file btConeTwistConstraint.h.
Referenced by btSolve2LinearConstraint::btSolve2LinearConstraint(), getDamping(), btSolve2LinearConstraint::resolveBilateralPairConstraint(), btSolve2LinearConstraint::resolveUnilateralPairConstraint(), setDamping(), and solveConstraintObsolete().
btScalar m_fixThresh |
Definition at line 78 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo2(), getFixThresh(), getInfo2NonVirtual(), and setFixThresh().
int m_flags |
Definition at line 114 of file btConeTwistConstraint.h.
Referenced by get_limit_motor_info2(), getFlags(), getInfo2Internal(), getInfo2InternalUsingFrameOffset(), getInfo2NonVirtual(), initParams(), btCollisionWorld::rayTestSingleInternal(), setAngularLimits(), and setLinearLimits().
btScalar m_kSwing |
Definition at line 83 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo2(), and solveConstraintObsolete().
btScalar m_kTwist |
Definition at line 84 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo2(), and solveConstraintObsolete().
btScalar m_limitSoftness |
Definition at line 68 of file btConeTwistConstraint.h.
Referenced by btHingeConstraint(), calcAngleInfo2(), getLimitSoftness(), and setLimit().
btScalar m_linCFM |
Definition at line 115 of file btConeTwistConstraint.h.
Referenced by getInfo2NonVirtual().
btScalar m_linERP |
Definition at line 116 of file btConeTwistConstraint.h.
Referenced by getInfo2NonVirtual().
btScalar m_maxMotorImpulse |
Definition at line 110 of file btConeTwistConstraint.h.
Referenced by getInfo2Internal(), getInfo2InternalUsingFrameOffset(), getInfo2NonVirtual(), getMaxMotorImpulse(), setMaxMotorImpulse(), setMaxMotorImpulseNormalized(), and solveConstraintObsolete().
btQuaternion m_qTarget |
Definition at line 109 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo2(), getMotorTarget(), setMotorTargetInConstraintSpace(), and solveConstraintObsolete().
btTransform m_rbAFrame |
Definition at line 65 of file btConeTwistConstraint.h.
Referenced by btConeTwistConstraint(), btHingeConstraint(), buildJacobian(), calcAngleInfo(), calcAngleInfo2(), getAFrame(), getFrameOffsetA(), getHingeAngle(), getInfo2Internal(), getInfo2InternalUsingFrameOffset(), getInfo2NonVirtual(), setFrames(), setMotorTarget(), and solveConstraintObsolete().
btTransform m_rbBFrame |
Definition at line 66 of file btConeTwistConstraint.h.
Referenced by btConeTwistConstraint(), btHingeConstraint(), buildJacobian(), calcAngleInfo(), calcAngleInfo2(), getBFrame(), getFrameOffsetB(), getHingeAngle(), getInfo2Internal(), getInfo2InternalUsingFrameOffset(), getInfo2NonVirtual(), setFrames(), setMotorTarget(), and solveConstraintObsolete().
btScalar m_relaxationFactor |
Definition at line 70 of file btConeTwistConstraint.h.
Referenced by btAngularLimit::btAngularLimit(), btHingeConstraint(), getInfo2Internal(), getInfo2InternalUsingFrameOffset(), getInfo2NonVirtual(), getLimitRelaxationFactor(), getRelaxationFactor(), btAngularLimit::getRelaxationFactor(), setLimit(), and solveConstraintObsolete().
bool m_solveSwingLimit |
Definition at line 97 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo(), calcAngleInfo2(), getInfo2NonVirtual(), getSolveSwingLimit(), isPastSwingLimit(), and solveConstraintObsolete().
bool m_solveTwistLimit |
Definition at line 96 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo(), calcAngleInfo2(), getInfo2NonVirtual(), getSolveTwistLimit(), and solveConstraintObsolete().
btVector3 m_swingAxis |
Definition at line 80 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo(), calcAngleInfo2(), getInfo2NonVirtual(), and solveConstraintObsolete().
btScalar m_swingCorrection |
Definition at line 87 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo(), calcAngleInfo2(), getInfo2NonVirtual(), and solveConstraintObsolete().
btScalar m_swingLimitRatio |
Definition at line 102 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo2(), and solveConstraintObsolete().
btScalar m_swingSpan1 |
Definition at line 74 of file btConeTwistConstraint.h.
Referenced by adjustSwingAxisToUseEllipseNormal(), calcAngleInfo(), calcAngleInfo2(), computeConeLimitInfo(), getInfo2NonVirtual(), getLimit(), GetPointForAngle(), getSwingSpan1(), setLimit(), and setMotorTargetInConstraintSpace().
btScalar m_swingSpan2 |
Definition at line 75 of file btConeTwistConstraint.h.
Referenced by adjustSwingAxisToUseEllipseNormal(), calcAngleInfo(), calcAngleInfo2(), computeConeLimitInfo(), getInfo2NonVirtual(), getLimit(), GetPointForAngle(), getSwingSpan2(), setLimit(), and setMotorTargetInConstraintSpace().
btScalar m_twistAngle |
Definition at line 90 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo(), calcAngleInfo2(), and getTwistAngle().
btVector3 m_twistAxis |
Definition at line 81 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo(), calcAngleInfo2(), getInfo2NonVirtual(), and solveConstraintObsolete().
btVector3 m_twistAxisA |
Definition at line 104 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo2(), and solveConstraintObsolete().
btScalar m_twistCorrection |
Definition at line 88 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo(), calcAngleInfo2(), getInfo2NonVirtual(), and solveConstraintObsolete().
btScalar m_twistLimitRatio |
Definition at line 103 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo2(), and solveConstraintObsolete().
btScalar m_twistLimitSign |
Definition at line 86 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo(), calcAngleInfo2(), and getTwistLimitSign().
btScalar m_twistSpan |
Definition at line 76 of file btConeTwistConstraint.h.
Referenced by calcAngleInfo(), calcAngleInfo2(), getInfo2NonVirtual(), getLimit(), getTwistSpan(), setLimit(), and setMotorTargetInConstraintSpace().
bool m_useSolveConstraintObsolete |
Definition at line 99 of file btConeTwistConstraint.h.
Referenced by buildJacobian(), calcAngleInfo2(), getInfo2Internal(), getInfo2InternalUsingFrameOffset(), getInfo2NonVirtual(), and solveConstraintObsolete().