16 #ifndef BT_TYPED_CONSTRAINT_H    17 #define BT_TYPED_CONSTRAINT_H    24 #ifdef BT_USE_DOUBLE_PRECISION    25 #define btTypedConstraintData2          btTypedConstraintDoubleData    26 #define btTypedConstraintDataName       "btTypedConstraintDoubleData"    28 #define btTypedConstraintData2          btTypedConstraintFloatData    29 #define btTypedConstraintDataName  "btTypedConstraintFloatData"     30 #endif //BT_USE_DOUBLE_PRECISION    61         #define btAssertConstrParams(_par) btAssert(_par)     63         #define btAssertConstrParams(_par)   121                 int m_numConstraintRows,
nub;
   162                 return m_overrideNumSolverIterations;
   169                 m_overrideNumSolverIterations = overideNumIterations;
   193                 m_appliedImpulse = appliedImpulse;
   198                 return m_appliedImpulse;
   204                 return  m_breakingImpulseThreshold;
   209                 m_breakingImpulseThreshold = threshold;
   247                 return m_userConstraintType ;
   252                 m_userConstraintType = userConstraintType;
   257                 m_userConstraintId = uid;
   262                 return m_userConstraintId;
   267                 m_userConstraintPtr = ptr;
   272                 return m_userConstraintPtr;
   277                 m_jointFeedback = jointFeedback;
   282                 return m_jointFeedback;
   287                 return m_jointFeedback;
   293                 return m_userConstraintId;   
   298                 return m_needsFeedback;
   305                 m_needsFeedback = needsFeedback;
   313                 return m_appliedImpulse;
   323                 m_dbgDrawSize = dbgDrawSize;
   327                 return m_dbgDrawSize;
   332         virtual void    setParam(
int num, 
btScalar value, 
int axis = -1) = 0;
   335         virtual btScalar getParam(
int num, 
int axis = -1) 
const = 0;
   337         virtual int     calculateSerializeBufferSize() 
const;
   340         virtual const char*     serialize(
void* dataBuffer, 
btSerializer* serializer) 
const;
   348         if(angleLowerLimitInRadians >= angleUpperLimitInRadians)
   350                 return angleInRadians;
   352         else if(angleInRadians < angleLowerLimitInRadians)
   356                 return (diffLo < diffHi) ? angleInRadians : (angleInRadians + 
SIMD_2_PI);
   358         else if(angleInRadians > angleUpperLimitInRadians)
   362                 return (diffLo < diffHi) ? (angleInRadians - 
SIMD_2_PI) : angleInRadians;
   366                 return angleInRadians;
   395 #define BT_BACKWARDS_COMPATIBLE_SERIALIZATION   396 #ifdef BT_BACKWARDS_COMPATIBLE_SERIALIZATION   419 #endif //BACKWARDS_COMPATIBLE   474                 m_relaxationFactor(1.0f),
   504                 return m_relaxationFactor;
   546 #endif //BT_TYPED_CONSTRAINT_H btScalar * m_constraintError
void enableFeedback(bool needsFeedback)
enableFeedback will allow to read the applied linear and angular impulse use getAppliedImpulse, getAppliedLinearImpulse and getAppliedAngularImpulse to read feedback information 
btRigidBodyFloatData * m_rbB
int getUserConstraintType() const 
double m_breakingImpulseThreshold
btTypedConstraintType getConstraintType() const 
void setUserConstraintPtr(void *ptr)
float m_breakingImpulseThreshold
void * m_userConstraintPtr
void setJointFeedback(btJointFeedback *jointFeedback)
bool isLimit() const 
Returns true when the last test() invocation recognized limit violation. 
int m_disableCollisionsBetweenLinkedBodies
int m_disableCollisionsBetweenLinkedBodies
btScalar getBreakingImpulseThreshold() const 
#define SIMD_FORCE_INLINE
int m_disableCollisionsBetweenLinkedBodies
void setUserConstraintId(int uid)
int m_overrideNumSolverIterations
btJointFeedback * m_jointFeedback
int getUserConstraintId() const 
btVector3 m_appliedForceBodyB
const btJointFeedback * getJointFeedback() const 
void setBreakingImpulseThreshold(btScalar threshold)
btScalar m_breakingImpulseThreshold
void setDbgDrawSize(btScalar dbgDrawSize)
btTypedConstraint & operator=(btTypedConstraint &other)
btScalar getHalfRange() const 
Gives half of the distance between min and max limit angle. 
bool needsFeedback() const 
btVector3 m_appliedForceBodyA
btScalar getSign() const 
Returns sign value evaluated when test() was invoked. 
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
btScalar getSoftness() const 
Returns limit's softness. 
void setOverrideNumSolverIterations(int overideNumIterations)
override the number of constraint solver iterations used to solve this constraint -1 will use the def...
btScalar getBiasFactor() const 
Returns limit's bias factor. 
virtual ~btTypedConstraint()
#define btTypedConstraintData2
The btRigidBody is the main class for rigid body objects. 
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
this structure is not used, except for loading pre-2.82 .bullet files 
btScalar btAdjustAngleToLimits(btScalar angleInRadians, btScalar angleLowerLimitInRadians, btScalar angleUpperLimitInRadians)
btRigidBodyDoubleData * m_rbA
btVector3 can be used to represent 3D points and vectors. 
#define ATTRIBUTE_ALIGNED16(a)
void setUserConstraintType(int userConstraintType)
btScalar btNormalizeAngle(btScalar angleInRadians)
virtual void solveConstraintObsolete(btSolverBody &, btSolverBody &, btScalar)
internal method used by the constraint solver, don't use them directly 
int m_overrideNumSolverIterations
float m_breakingImpulseThreshold
rudimentary class to provide type info 
btVector3 m_appliedTorqueBodyB
The btSolverBody is an internal datastructure for the constraint solver. Only necessary data is packe...
btScalar * m_J2linearAxis
btScalar getRelaxationFactor() const 
Returns limit's relaxation factor. 
virtual void setupSolverConstraint(btConstraintArray &ca, int solverBodyA, int solverBodyB, btScalar timeStep)
internal method used by the constraint solver, don't use them directly 
TypedConstraint is the baseclass for Bullet constraints and vehicles. 
btScalar internalGetAppliedImpulse()
internal method used by the constraint solver, don't use them directly 
const btRigidBody & getRigidBodyA() const 
void setEnabled(bool enabled)
#define BT_DECLARE_ALIGNED_ALLOCATOR()
virtual int calculateSerializeBufferSize() const 
btRigidBody & getRigidBodyB()
btVector3 m_appliedTorqueBodyA
btScalar m_appliedImpulse
btScalar getCorrection() const 
Returns correction value evaluated when test() was invoked. 
btRigidBodyFloatData * m_rbA
btAngularLimit()
Default constructor initializes limit as inactive, allowing free constraint movement. 
btScalar getAppliedImpulse() const 
getAppliedImpulse is an estimated total applied impulse. 
void internalSetAppliedImpulse(btScalar appliedImpulse)
internal method used by the constraint solver, don't use them directly 
btRigidBody & getRigidBodyA()
void * getUserConstraintPtr()
btScalar getDbgDrawSize()
int m_overrideNumSolverIterations
const btRigidBody & getRigidBodyB() const 
int getOverrideNumSolverIterations() const 
int m_overrideNumSolverIterations
virtual void buildJacobian()
internal method used by the constraint solver, don't use them directly 
do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 ...
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btRigidBodyDoubleData * m_rbB
btJointFeedback * getJointFeedback()
btScalar btFabs(btScalar x)