|
Blender V4.5
|
#include "LinearMath/btScalar.h"#include "btSolverConstraint.h"#include "BulletDynamics/Dynamics/btRigidBody.h"Go to the source code of this file.
Classes | |
| struct | btConstraintInfo1 |
| struct | btConstraintInfo2 |
| struct | btTypedConstraintFloatData |
| do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 More... | |
| struct | btTypedConstraintData |
| this structure is not used, except for loading pre-2.82 .bullet files More... | |
| struct | btTypedConstraintDoubleData |
| class | btAngularLimit |
| union | [union].__unnamed0__ |
Macros | |
| #define | btTypedConstraintData2 btTypedConstraintFloatData |
| #define | btTypedConstraintDataName "btTypedConstraintFloatData" |
| #define | btAssertConstrParams(_par) |
| #define | BT_BACKWARDS_COMPATIBLE_SERIALIZATION |
| do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 | |
Functions | |
| btTypedConstraint & | operator= (btTypedConstraint &other) |
| btScalar | getMotorFactor (btScalar pos, btScalar lowLim, btScalar uppLim, btScalar vel, btScalar timeFact) |
| internal method used by the constraint solver, don't use them directly | |
| BT_DECLARE_ALIGNED_ALLOCATOR () | |
| virtual | ~btTypedConstraint () |
| btTypedConstraint (btTypedConstraintType type, btRigidBody &rbA) | |
| btTypedConstraint (btTypedConstraintType type, btRigidBody &rbA, btRigidBody &rbB) | |
| static btRigidBody & | getFixedBody () |
| int | getOverrideNumSolverIterations () const |
| void | setOverrideNumSolverIterations (int overideNumIterations) |
| virtual void | buildJacobian () |
| internal method used by the constraint solver, don't use them directly | |
| virtual void | setupSolverConstraint (btConstraintArray &ca, int solverBodyA, int solverBodyB, btScalar timeStep) |
| internal method used by the constraint solver, don't use them directly | |
| virtual void | getInfo1 (btConstraintInfo1 *info)=0 |
| internal method used by the constraint solver, don't use them directly | |
| virtual void | getInfo2 (btConstraintInfo2 *info)=0 |
| internal method used by the constraint solver, don't use them directly | |
| void | internalSetAppliedImpulse (btScalar appliedImpulse) |
| internal method used by the constraint solver, don't use them directly | |
| btScalar | internalGetAppliedImpulse () |
| internal method used by the constraint solver, don't use them directly | |
| btScalar | getBreakingImpulseThreshold () const |
| void | setBreakingImpulseThreshold (btScalar threshold) |
| bool | isEnabled () const |
| void | setEnabled (bool enabled) |
| virtual void | solveConstraintObsolete (btSolverBody &, btSolverBody &, btScalar) |
| internal method used by the constraint solver, don't use them directly | |
| const btRigidBody & | getRigidBodyA () const |
| const btRigidBody & | getRigidBodyB () const |
| int | getUserConstraintType () const |
| void | setUserConstraintType (int userConstraintType) |
| void | setUserConstraintId (int uid) |
| int | getUserConstraintId () const |
| void | setUserConstraintPtr (void *ptr) |
| void * | getUserConstraintPtr () |
| void | setJointFeedback (btJointFeedback *jointFeedback) |
| const btJointFeedback * | getJointFeedback () const |
| int | getUid () const |
| bool | needsFeedback () const |
| void | enableFeedback (bool needsFeedback) |
| btScalar | getAppliedImpulse () const |
| btTypedConstraintType | getConstraintType () const |
| void | setDbgDrawSize (btScalar dbgDrawSize) |
| btScalar | getDbgDrawSize () |
| virtual void | setParam (int num, btScalar value, int axis=-1)=0 |
| virtual btScalar | getParam (int num, int axis=-1) const =0 |
| 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) | |
| SIMD_FORCE_INLINE btScalar | btAdjustAngleToLimits (btScalar angleInRadians, btScalar angleLowerLimitInRadians, btScalar angleUpperLimitInRadians) |
Variables | |
| btJointFeedback | |
| btVector3 | m_appliedForceBodyA |
| btVector3 | m_appliedTorqueBodyA |
| btVector3 | m_appliedForceBodyB |
| btVector3 | m_appliedTorqueBodyB |
| btTypedConstraint | __pad0__ |
| TypedConstraint is the baseclass for Bullet constraints and vehicles. | |
| union | |
| btScalar | m_breakingImpulseThreshold |
| bool | m_isEnabled |
| bool | m_needsFeedback |
| int | m_overrideNumSolverIterations |
| btRigidBody & | m_rbA |
| btRigidBody & | m_rbB |
| btScalar | m_appliedImpulse |
| btScalar | m_dbgDrawSize |
| btJointFeedback * | m_jointFeedback |
| #define BT_BACKWARDS_COMPATIBLE_SERIALIZATION |
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64
Definition at line 384 of file btTypedConstraint.h.
| #define btAssertConstrParams | ( | _par | ) |
Definition at line 58 of file btTypedConstraint.h.
| #define btTypedConstraintData2 btTypedConstraintFloatData |
Definition at line 27 of file btTypedConstraint.h.
| #define btTypedConstraintDataName "btTypedConstraintFloatData" |
Definition at line 28 of file btTypedConstraint.h.
| enum btConstraintParams |
| Enumerator | |
|---|---|
| BT_CONSTRAINT_ERP | |
| BT_CONSTRAINT_STOP_ERP | |
| BT_CONSTRAINT_CFM | |
| BT_CONSTRAINT_STOP_CFM | |
Definition at line 49 of file btTypedConstraint.h.
Definition at line 34 of file btTypedConstraint.h.
| BT_DECLARE_ALIGNED_ALLOCATOR | ( | ) |
References BT_DECLARE_ALIGNED_ALLOCATOR.
| SIMD_FORCE_INLINE btScalar btAdjustAngleToLimits | ( | btScalar | angleInRadians, |
| btScalar | angleLowerLimitInRadians, | ||
| btScalar | angleUpperLimitInRadians ) |
Definition at line 331 of file btTypedConstraint.h.
References btAdjustAngleToLimits(), btFabs(), btNormalizeAngle(), SIMD_2_PI, and SIMD_FORCE_INLINE.
Referenced by btAdjustAngleToLimits(), testAngLimits(), testAngularLimitMotor(), and testLimit().
| btTypedConstraint::btTypedConstraint | ( | btTypedConstraintType | type, |
| btRigidBody & | rbA ) |
Definition at line 22 of file btTypedConstraint.cpp.
References DEFAULT_DEBUGDRAW_SIZE, false, m_appliedImpulse, m_breakingImpulseThreshold, m_dbgDrawSize, m_isEnabled, m_jointFeedback, m_needsFeedback, m_overrideNumSolverIterations, m_rbA, m_rbB, SIMD_INFINITY, and true.
Referenced by addConstraint(), btDynamicsWorld::addConstraint(), btRigidBody::addConstraintRef(), btSimulationIslandManagerMt::addConstraintsToIslands(), btConeTwistConstraint(), btConeTwistConstraint(), btContactConstraint(), btGearConstraint::btGearConstraint(), btGeneric6DofConstraint(), btGeneric6DofConstraint(), btGeneric6DofSpring2Constraint(), btGeneric6DofSpring2Constraint(), btGetConstraintIslandId(), btGetConstraintIslandId1(), btGetConstraintIslandId2(), btHingeConstraint(), btHingeConstraint(), btHingeConstraint(), btHingeConstraint(), btPoint2PointConstraint(), btPoint2PointConstraint(), btSliderConstraint(), btSliderConstraint(), btSimulationIslandManagerMt::buildAndProcessIslands(), btMultiBodyDynamicsWorld::calculateSimulationIslands(), convertJoint(), convertJoints(), convertJoints(), ConvertJointsLoop::ConvertJointsLoop(), debugDrawConstraint(), btDynamicsWorld::getConstraint(), btDynamicsWorld::getConstraint(), getConstraint(), btRigidBody::getConstraintRef(), InitJointsLoop::InitJointsLoop(), internalConvertMultipleJoints(), internalInitMultipleJoints(), btSortConstraintOnIslandPredicate2::operator()(), btSortConstraintOnIslandPredicate::operator()(), operator=(), DeformableBodyInplaceSolverIslandCallback::processConstraints(), InplaceSolverIslandCallback::processConstraints(), MultiBodyInplaceSolverIslandCallback::processConstraints(), InplaceSolverIslandCallback::processIsland(), MultiBodyInplaceSolverIslandCallback::processIsland(), RB_body_delete(), RB_constraint_delete(), RB_constraint_new_6dof(), RB_constraint_new_6dof_spring(), RB_constraint_new_6dof_spring2(), RB_constraint_new_point(), RB_constraint_set_breaking_threshold(), RB_constraint_set_enabled(), RB_constraint_set_solver_iterations(), RB_dworld_add_constraint(), RB_dworld_remove_constraint(), removeCollisionObject(), btDynamicsWorld::removeConstraint(), removeConstraint(), btRigidBody::removeConstraintRef(), serializeRigidBodies(), InplaceSolverIslandCallback::setup(), MultiBodyInplaceSolverIslandCallback::setup(), btDeformableMultiBodyDynamicsWorld::setupConstraints(), solveDeformableBodyGroup(), solveDeformableGroupIterations(), btMultiBodyDynamicsWorld::solveExternalForces(), btConstraintSolver::solveGroup(), btConstraintSolverPoolMt::solveGroup(), solveGroup(), solveGroupCacheFriendlyFinish(), btMLCPSolver::solveGroupCacheFriendlyIterations(), btMultiBodyMLCPConstraintSolver::solveGroupCacheFriendlyIterations(), solveGroupCacheFriendlyIterations(), btMLCPSolver::solveGroupCacheFriendlySetup(), btMultiBodyMLCPConstraintSolver::solveGroupCacheFriendlySetup(), solveGroupCacheFriendlySetup(), solveGroupCacheFriendlySetup(), solveGroupCacheFriendlySplitImpulseIterations(), solveGroupCacheFriendlySplitImpulseIterations(), btSimulationIslandManagerMt::solveIsland(), solveMultiBodyGroup(), solveSingleIteration(), solveSingleIteration(), writeBackJoints(), and ~btTypedConstraint().
| btTypedConstraint::btTypedConstraint | ( | btTypedConstraintType | type, |
| btRigidBody & | rbA, | ||
| btRigidBody & | rbB ) |
Definition at line 38 of file btTypedConstraint.cpp.
References DEFAULT_DEBUGDRAW_SIZE, false, m_appliedImpulse, m_breakingImpulseThreshold, m_dbgDrawSize, m_isEnabled, m_jointFeedback, m_needsFeedback, m_overrideNumSolverIterations, m_rbA, m_rbB, rbB, SIMD_INFINITY, and true.
|
virtual |
internal method used by the constraint solver, don't use them directly
we need it for both methods
Definition at line 163 of file btTypedConstraint.h.
References btJacobianEntry, btPlaneSpace1(), btVector3, buildJacobian(), calcAngleInfo2(), btRigidBody::getCenterOfMassPosition(), btRigidBody::getCenterOfMassTransform(), btRigidBody::getInvInertiaDiagLocal(), btRigidBody::getInvInertiaTensorWorld(), btRigidBody::getInvMass(), i, m_accMotorImpulse, m_accSwingLimitImpulse, m_accTwistLimitImpulse, m_angularOnly, m_appliedImpulse, m_rbA, m_rbAFrame, m_rbB, m_rbBFrame, m_useSolveConstraintObsolete, and SIMD_EPSILON.
Referenced by BT_DECLARE_ALIGNED_ALLOCATOR(), buildJacobian(), getInfo2(), and setFrames().
|
virtual |
References calculateSerializeBufferSize().
| void enableFeedback | ( | bool | needsFeedback | ) |
enableFeedback will allow to read the applied linear and angular impulse use getAppliedImpulse, getAppliedLinearImpulse and getAppliedAngularImpulse to read feedback information
Definition at line 289 of file btTypedConstraint.h.
References enableFeedback(), m_needsFeedback, and needsFeedback().
Referenced by enableFeedback().
| btScalar getAppliedImpulse | ( | ) | const |
getAppliedImpulse is an estimated total applied impulse. This feedback could be used to determine breaking constraints or playing sounds.
Definition at line 296 of file btTypedConstraint.h.
References btAssert, getAppliedImpulse(), m_appliedImpulse, and m_needsFeedback.
Referenced by getAppliedImpulse(), and getAppliedImpulse().
| btScalar getBreakingImpulseThreshold | ( | ) | const |
Definition at line 191 of file btTypedConstraint.h.
References getBreakingImpulseThreshold(), and m_breakingImpulseThreshold.
Referenced by getBreakingImpulseThreshold().
| btTypedConstraintType getConstraintType | ( | ) | const |
Definition at line 302 of file btTypedConstraint.h.
References getConstraintType().
Referenced by getConstraintType().
| btScalar getDbgDrawSize | ( | ) |
Definition at line 311 of file btTypedConstraint.h.
References getDbgDrawSize(), and m_dbgDrawSize.
Referenced by getDbgDrawSize().
|
static |
|
pure virtual |
internal method used by the constraint solver, don't use them directly
References getInfo1().
|
pure virtual |
internal method used by the constraint solver, don't use them directly
References getInfo2().
| btJointFeedback * getJointFeedback | ( | ) | const |
Definition at line 267 of file btTypedConstraint.h.
References btJointFeedback, getJointFeedback(), and m_jointFeedback.
Referenced by getJointFeedback().
|
protected |
internal method used by the constraint solver, don't use them directly
Definition at line 54 of file btTypedConstraint.cpp.
Referenced by get_limit_motor_info2(), get_limit_motor_info2(), getInfo2Internal(), getInfo2InternalUsingFrameOffset(), and getInfo2NonVirtual().
| int getOverrideNumSolverIterations | ( | ) | const |
Definition at line 150 of file btTypedConstraint.h.
References getOverrideNumSolverIterations(), and m_overrideNumSolverIterations.
Referenced by getOverrideNumSolverIterations().
|
pure virtual |
return the local value of parameter
References getParam(), and num.
| const btRigidBody & getRigidBodyA | ( | ) | const |
Definition at line 214 of file btTypedConstraint.h.
References getRigidBodyA(), and m_rbA.
| const btRigidBody & getRigidBodyB | ( | ) | const |
Definition at line 218 of file btTypedConstraint.h.
References getRigidBodyB(), and m_rbB.
| int getUid | ( | ) | const |
Definition at line 277 of file btTypedConstraint.h.
References getUid().
| int getUserConstraintId | ( | ) | const |
Definition at line 247 of file btTypedConstraint.h.
References getUserConstraintId().
Referenced by getUserConstraintId().
| void * getUserConstraintPtr | ( | ) |
Definition at line 257 of file btTypedConstraint.h.
References getUserConstraintPtr().
Referenced by getUserConstraintPtr().
| int getUserConstraintType | ( | ) | const |
Definition at line 232 of file btTypedConstraint.h.
References getUserConstraintType().
Referenced by getUserConstraintType().
| btScalar internalGetAppliedImpulse | ( | ) |
internal method used by the constraint solver, don't use them directly
Definition at line 186 of file btTypedConstraint.h.
References internalGetAppliedImpulse(), and m_appliedImpulse.
Referenced by internalGetAppliedImpulse().
| void internalSetAppliedImpulse | ( | btScalar | appliedImpulse | ) |
internal method used by the constraint solver, don't use them directly
Definition at line 181 of file btTypedConstraint.h.
References internalSetAppliedImpulse(), and m_appliedImpulse.
Referenced by internalSetAppliedImpulse(), and internalSetAppliedImpulse().
| bool isEnabled | ( | ) | const |
Definition at line 201 of file btTypedConstraint.h.
References isEnabled(), and m_isEnabled.
Referenced by convertJoints(), isEnabled(), and solveSingleIteration().
| bool needsFeedback | ( | ) | const |
Definition at line 282 of file btTypedConstraint.h.
References m_needsFeedback, and needsFeedback().
Referenced by enableFeedback(), and needsFeedback().
| btTypedConstraint & operator= | ( | btTypedConstraint & | other | ) |
Definition at line 89 of file btTypedConstraint.h.
References btAssert, btTypedConstraint(), and operator=().
|
virtual |
fills the dataBuffer and returns the struct name (and 0 on failure)
References serialize().
| void setBreakingImpulseThreshold | ( | btScalar | threshold | ) |
Definition at line 196 of file btTypedConstraint.h.
References m_breakingImpulseThreshold, and setBreakingImpulseThreshold().
Referenced by setBreakingImpulseThreshold().
| void setDbgDrawSize | ( | btScalar | dbgDrawSize | ) |
Definition at line 307 of file btTypedConstraint.h.
References m_dbgDrawSize, and setDbgDrawSize().
Referenced by setDbgDrawSize().
| void setEnabled | ( | bool | enabled | ) |
Definition at line 206 of file btTypedConstraint.h.
References m_isEnabled, and setEnabled().
Referenced by setEnabled().
| void setJointFeedback | ( | btJointFeedback * | jointFeedback | ) |
Definition at line 262 of file btTypedConstraint.h.
References btJointFeedback, m_jointFeedback, and setJointFeedback().
Referenced by setJointFeedback().
| void setOverrideNumSolverIterations | ( | int | overideNumIterations | ) |
override the number of constraint solver iterations used to solve this constraint -1 will use the default number of iterations, as specified in SolverInfo.m_numIterations
Definition at line 157 of file btTypedConstraint.h.
References m_overrideNumSolverIterations, and setOverrideNumSolverIterations().
Referenced by setOverrideNumSolverIterations().
|
pure 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.
References num, and setParam().
|
virtual |
internal method used by the constraint solver, don't use them directly
Definition at line 166 of file btTypedConstraint.h.
References setupSolverConstraint().
Referenced by setupSolverConstraint().
| void setUserConstraintId | ( | int | uid | ) |
Definition at line 242 of file btTypedConstraint.h.
References setUserConstraintId().
Referenced by setUserConstraintId().
| void setUserConstraintPtr | ( | void * | ptr | ) |
Definition at line 252 of file btTypedConstraint.h.
References setUserConstraintPtr().
Referenced by setUserConstraintPtr().
| void setUserConstraintType | ( | int | userConstraintType | ) |
Definition at line 237 of file btTypedConstraint.h.
References setUserConstraintType().
Referenced by setUserConstraintType().
|
virtual |
internal method used by the constraint solver, don't use them directly
solve angular part
Definition at line 212 of file btTypedConstraint.h.
References btAssert, btMax(), btSolverBody, btTransform, btVector3, btTransformUtil::calculateVelocity(), btRigidBody::computeAngularImpulseDenominator(), dot(), btRigidBody::getCenterOfMassPosition(), btRigidBody::getCenterOfMassTransform(), btRigidBody::getInvInertiaTensorWorld(), btRigidBody::getInvMass(), getRigidBodyA(), getRigidBodyB(), i, 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, SIMD_EPSILON, and solveConstraintObsolete().
Referenced by getInfo2(), and solveConstraintObsolete().
|
virtual |
Definition at line 109 of file btTypedConstraint.h.
References btTypedConstraint().
| union [union].__unnamed0__ @203016117116163046035341354141203142367214374121 |
| btTypedConstraint __pad0__ |
TypedConstraint is the baseclass for Bullet constraints and vehicles.
Definition at line 75 of file btTypedConstraint.h.
| btJointFeedback |
Definition at line 64 of file btTypedConstraint.h.
Referenced by convertJoints(), getJointFeedback(), internalInitMultipleJoints(), setJointFeedback(), and writeBackJoints().
| btVector3 m_appliedForceBodyA |
Definition at line 67 of file btTypedConstraint.h.
| btVector3 m_appliedForceBodyB |
Definition at line 69 of file btTypedConstraint.h.
|
protected |
Definition at line 99 of file btTypedConstraint.h.
| btVector3 m_appliedTorqueBodyA |
Definition at line 68 of file btTypedConstraint.h.
| btVector3 m_appliedTorqueBodyB |
Definition at line 70 of file btTypedConstraint.h.
| btScalar m_breakingImpulseThreshold |
Definition at line 84 of file btTypedConstraint.h.
Referenced by btTypedConstraint(), btTypedConstraint(), getBreakingImpulseThreshold(), and setBreakingImpulseThreshold().
|
protected |
Definition at line 100 of file btTypedConstraint.h.
Referenced by btTypedConstraint(), btTypedConstraint(), getDbgDrawSize(), and setDbgDrawSize().
| bool m_isEnabled |
Definition at line 85 of file btTypedConstraint.h.
Referenced by btTypedConstraint(), btTypedConstraint(), isEnabled(), and setEnabled().
|
protected |
Definition at line 101 of file btTypedConstraint.h.
Referenced by btTypedConstraint(), btTypedConstraint(), computeAccelerationsArticulatedBodyAlgorithmMultiDof(), getJointFeedback(), and setJointFeedback().
| bool m_needsFeedback |
Definition at line 86 of file btTypedConstraint.h.
Referenced by btTypedConstraint(), btTypedConstraint(), enableFeedback(), getAppliedImpulse(), and needsFeedback().
| int m_overrideNumSolverIterations |
Definition at line 87 of file btTypedConstraint.h.
|
protected |
Definition at line 97 of file btTypedConstraint.h.
Referenced by btHingeConstraint(), btTypedConstraint(), btTypedConstraint(), buildAngularJacobian(), buildJacobian(), buildLinearJacobian(), calcAnchorPos(), calculateTransforms(), get_limit_motor_info2(), getAncorInA(), getHingeAngle(), btGearConstraint::getInfo2(), getInfo2NonVirtual(), getRigidBodyA(), initParams(), setAxis(), setAxis(), setFrames(), setMotorTarget(), and solveConstraintObsolete().
|
protected |
Definition at line 98 of file btTypedConstraint.h.
Referenced by btTypedConstraint(), btTypedConstraint(), buildAngularJacobian(), buildJacobian(), buildLinearJacobian(), calcAnchorPos(), calculateTransforms(), get_limit_motor_info2(), getHingeAngle(), btGearConstraint::getInfo2(), getInfo2NonVirtual(), getRigidBodyB(), initParams(), setAxis(), setAxis(), setFrames(), setMotorTarget(), and solveConstraintObsolete().