| Bullet Collision Detection & Physics Library
    | 
 
 
 
Go to the documentation of this file.
   26 #ifndef BT_GENERIC_6DOF_CONSTRAINT_H 
   27 #define BT_GENERIC_6DOF_CONSTRAINT_H 
   35 #ifdef BT_USE_DOUBLE_PRECISION 
   36 #define btGeneric6DofConstraintData2 btGeneric6DofConstraintDoubleData2 
   37 #define btGeneric6DofConstraintDataName "btGeneric6DofConstraintDoubleData2" 
   39 #define btGeneric6DofConstraintData2 btGeneric6DofConstraintData 
   40 #define btGeneric6DofConstraintDataName "btGeneric6DofConstraintData" 
   41 #endif  //BT_USE_DOUBLE_PRECISION 
  165                 for (
int i = 0; i < 3; i++)
 
  186                 for (
int i = 0; i < 3; i++)
 
  228 #define BT_6DOF_FLAGS_AXIS_SHIFT 3  // bits per axis 
  325         void buildLinearJacobian(
 
  332         void calculateLinearInfo();
 
  335         void calculateAngleInfo();
 
  353         void calculateTransforms();
 
  361                 return m_calculatedTransformA;
 
  370                 return m_calculatedTransformB;
 
  394         virtual void buildJacobian();
 
  396         virtual void getInfo1(btConstraintInfo1 * info);
 
  398         void getInfo1NonVirtual(btConstraintInfo1 * info);
 
  400         virtual void getInfo2(btConstraintInfo2 * info);
 
  416         btScalar getAngle(
int axis_index) 
const;
 
  422         btScalar getRelativePivotPosition(
int axis_index) 
const;
 
  431         bool testAngularLimitMotor(
int axis_index);
 
  455                 for (
int i = 0; i < 3; i++)
 
  461                 for (
int i = 0; i < 3; i++)
 
  462                         angularLower[i] = m_angularLimits[i].m_loLimit;
 
  467                 for (
int i = 0; i < 3; i++)
 
  473                 for (
int i = 0; i < 3; i++)
 
  474                         angularUpper[i] = m_angularLimits[i].m_hiLimit;
 
  480                 return &m_angularLimits[index];
 
  486                 return &m_linearLimits;
 
  501                         m_angularLimits[axis - 3].
m_loLimit = lo;
 
  502                         m_angularLimits[axis - 3].
m_hiLimit = hi;
 
  517                         return m_linearLimits.
isLimited(limitIndex);
 
  519                 return m_angularLimits[limitIndex - 3].
isLimited();
 
  522         virtual void calcAnchorPos(
void);  
 
  526                                                           btConstraintInfo2* info, 
int row, 
btVector3& ax1, 
int rotational, 
int rotAllowed = 
false);
 
  530         void setUseFrameOffset(
bool frameOffsetOnOff) { m_useOffsetForConstraintFrame = frameOffsetOnOff; }
 
  537         virtual void setParam(
int num, 
btScalar value, 
int axis = -1);
 
  539         virtual btScalar getParam(
int num, 
int axis = -1) 
const;
 
  548         virtual int calculateSerializeBufferSize() 
const;
 
  551         virtual const char* serialize(
void* dataBuffer, 
btSerializer* serializer) 
const;
 
  601         for (i = 0; i < 3; i++)
 
  615 #endif  //BT_GENERIC_6DOF_CONSTRAINT_H 
  
void getAngularUpperLimit(btVector3 &angularUpper) const
btTranslationalLimitMotor * getTranslationalLimitMotor()
Retrieves the limit informacion.
int m_useLinearReferenceFrameA
TypedConstraint is the baseclass for Bullet constraints and vehicles.
int testLimitValue(btScalar test_value)
calculates error
void setUseFrameOffset(bool frameOffsetOnOff)
void getLinearLowerLimit(btVector3 &linearLower) const
btVector3FloatData m_linearUpperLimit
bool isLimited(int limitIndex) const
Test limit.
The btRigidBody is the main class for rigid body objects.
btScalar m_damping
Damping.
btScalar m_stopCFM
Constraint force mixing factor when joint is at limit.
bool isLimited(int limitIndex) const
Test limit.
btScalar m_bounce
restitution factor
bool getUseLinearReferenceFrameA() const
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btVector3 m_stopCFM
Constraint force mixing factor when joint is at limit.
btTransform m_calculatedTransformA
Jacobian entry is an abstraction that allows to describe constraints it can be used in combination wi...
btVector3DoubleData m_linearLowerLimit
btVector3 m_currentLimitError
bool m_useSolveConstraintObsolete
for backwards compatibility during the transition to 'getInfo/getInfo2'
#define btGeneric6DofConstraintData2
btScalar m_timeStep
temporal variables
int m_currentLimit
current value of angle
btGeneric6DofConstraint between two rigidbodies each with a pivotpoint that descibes the axis locatio...
const btTransform & getCalculatedTransformB() const
Gets the global transform of the offset for body B.
const btTransform & getFrameOffsetA() const
const btTransform & getCalculatedTransformA() const
Gets the global transform of the offset for body A.
btGeneric6DofConstraint & operator=(btGeneric6DofConstraint &other)
btTransformFloatData m_rbAFrame
void setUseLinearReferenceFrameA(bool linearReferenceFrameA)
bool m_useOffsetForConstraintFrame
void getAngularLowerLimit(btVector3 &angularLower) const
btScalar m_maxLimitForce
max force on limit
btVector3DoubleData m_angularUpperLimit
btScalar solveAngularLimits(btScalar timeStep, btVector3 &axis, btScalar jacDiagABInv, btRigidBody *body0, btRigidBody *body1)
apply the correction impulses for two bodies
btScalar m_hiLimit
joint limit
void getLinearUpperLimit(btVector3 &linearUpper) const
btTransform m_calculatedTransformB
void setAngularUpperLimit(const btVector3 &angularUpper)
bool needApplyTorques() const
Need apply correction.
#define btGeneric6DofConstraintDataName
btScalar m_maxMotorForce
max force on motor
btVector3FloatData m_angularUpperLimit
btTranslationalLimitMotor m_linearLimits
Linear_Limit_parameters.
btVector3 m_calculatedLinearDiff
int testLimitValue(int limitIndex, btScalar test_value)
btTypedConstraintDoubleData m_typeConstraintData
btScalar btNormalizeAngle(btScalar angleInRadians)
btVector3 m_upperLimit
the constraint upper limits
btRotationalLimitMotor(const btRotationalLimitMotor &limot)
int m_currentLimit[3]
Current relative offset of constraint frames.
btScalar m_loLimit
limit_parameters
btRotationalLimitMotor m_angularLimits[3]
hinge_parameters
btVector3DoubleData m_angularLowerLimit
btVector3 m_lowerLimit
the constraint lower limits
const btTransform & getFrameOffsetB() const
btVector3 m_targetVelocity
target motor velocity
btVector3 m_calculatedAxisAngleDiff
btTranslationalLimitMotor()
#define BT_DECLARE_ALIGNED_ALLOCATOR()
btVector3 can be used to represent 3D points and vectors.
btRotationalLimitMotor * getRotationalLimitMotor(int index)
Retrieves the angular limit informacion.
btVector3 m_maxMotorForce
max force on motor
bool needApplyForce(int limitIndex) const
btTypedConstraintData m_typeConstraintData
btVector3 m_normalCFM
Bounce parameter for linear limit.
btVector3DoubleData m_linearUpperLimit
btTransform & getFrameOffsetA()
btTransformDoubleData m_rbAFrame
btScalar m_currentLimitError
temp_variables
#define ATTRIBUTE_ALIGNED16(a)
btScalar m_damping
Damping for linear limit.
void setLimit(int axis, btScalar lo, btScalar hi)
int m_useOffsetForConstraintFrame
btTransform m_frameInA
relative_frames
#define SIMD_FORCE_INLINE
btVector3FloatData m_linearLowerLimit
int m_useLinearReferenceFrameA
virtual int calculateSerializeBufferSize() const
btScalar m_stopERP
Error tolerance factor when joint is at limit.
Rotation Limit structure for generic joints.
btScalar m_limitSoftness
Linear_Limit_parameters.
this structure is not used, except for loading pre-2.82 .bullet files
btTransform m_frameInB
the constraint space w.r.t body B
void setAngularLowerLimit(const btVector3 &angularLower)
int m_useOffsetForConstraintFrame
virtual int getFlags() const
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
void setLinearLowerLimit(const btVector3 &linearLower)
btTransformDoubleData m_rbBFrame
btTranslationalLimitMotor(const btTranslationalLimitMotor &other)
btVector3 m_accumulatedImpulse
btTransform & getFrameOffsetB()
btScalar m_accumulatedImpulse
bool getUseFrameOffset() const
btTransformFloatData m_rbBFrame
btScalar solveLinearAxis(btScalar timeStep, btScalar jacDiagABInv, btRigidBody &body1, const btVector3 &pointInA, btRigidBody &body2, const btVector3 &pointInB, int limit_index, const btVector3 &axis_normal_on_a, const btVector3 &anchorPos)
btVector3 m_currentLinearDiff
How much is violated this limit.
bool isLimited() const
Is limited.
void setLinearUpperLimit(const btVector3 &linearUpper)
btScalar m_currentPosition
How much is violated this limit.
btScalar m_normalCFM
Relaxation factor.
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btVector3 m_stopERP
Error tolerance factor when joint is at limit.
bool m_useLinearReferenceFrameA
btVector3FloatData m_angularLowerLimit
btScalar m_targetVelocity
target motor velocity