16 #ifndef BT_GENERIC_6DOF_SPRING_CONSTRAINT_H
17 #define BT_GENERIC_6DOF_SPRING_CONSTRAINT_H
23 #ifdef BT_USE_DOUBLE_PRECISION
24 #define btGeneric6DofSpringConstraintData2 btGeneric6DofSpringConstraintDoubleData2
25 #define btGeneric6DofSpringConstraintDataName "btGeneric6DofSpringConstraintDoubleData2"
27 #define btGeneric6DofSpringConstraintData2 btGeneric6DofSpringConstraintData
28 #define btGeneric6DofSpringConstraintDataName "btGeneric6DofSpringConstraintData"
45 bool m_springEnabled[6];
66 return m_springEnabled[index];
125 for (i = 0; i < 6; i++)
129 dof->m_springEnabled[i] = m_springEnabled[i] ? 1 : 0;
btFixedConstraint btRigidBody & rbB
btFixedConstraint btRigidBody const btTransform & frameInA
btFixedConstraint btRigidBody const btTransform const btTransform & frameInB
btGeneric6DofConstraint(btRigidBody &rbA, btRigidBody &rbB, const btTransform &frameInA, const btTransform &frameInB, bool useLinearReferenceFrameA)
BT_DECLARE_ALIGNED_ALLOCATOR()
virtual void getInfo2(btConstraintInfo2 *info)
btScalar m_equilibriumPoint[6]
#define btGeneric6DofSpringConstraintDataName
btScalar m_springDamping[6]
#define btGeneric6DofSpringConstraintData2
virtual int calculateSerializeBufferSize() const
void internalUpdateSprings(btConstraintInfo2 *info)
btScalar getDamping(int index) const
void setEquilibriumPoint()
void enableSpring(int index, bool onOff)
void setDamping(int index, btScalar damping)
btScalar m_springStiffness[6]
void setStiffness(int index, btScalar stiffness)
btGeneric6DofSpringConstraint(btRigidBody &rbA, btRigidBody &rbB, const btTransform &frameInA, const btTransform &frameInB, bool useLinearReferenceFrameA)
bool isSpringEnabled(int index) const
btScalar getStiffness(int index) const
virtual void setAxis(const btVector3 &axis1, const btVector3 &axis2)
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btScalar getEquilibriumPoint(int index) const
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
#define SIMD_FORCE_INLINE
btVector3
btVector3 can be used to represent 3D points and vectors. It has an un-used w component to suit 16-by...
btGeneric6DofConstraintData m_6dofData
float m_springStiffness[6]
float m_equilibriumPoint[6]
double m_equilibriumPoint[6]
double m_springDamping[6]
double m_springStiffness[6]
btGeneric6DofConstraintDoubleData2 m_6dofData