16 #ifndef BT_GENERIC_6DOF_SPRING_CONSTRAINT_H 17 #define BT_GENERIC_6DOF_SPRING_CONSTRAINT_H 24 #ifdef BT_USE_DOUBLE_PRECISION 25 #define btGeneric6DofSpringConstraintData2 btGeneric6DofSpringConstraintDoubleData2 26 #define btGeneric6DofSpringConstraintDataName "btGeneric6DofSpringConstraintDoubleData2" 28 #define btGeneric6DofSpringConstraintData2 btGeneric6DofSpringConstraintData 29 #define btGeneric6DofSpringConstraintDataName "btGeneric6DofSpringConstraintData" 30 #endif //BT_USE_DOUBLE_PRECISION 47 bool m_springEnabled[6];
59 void enableSpring(
int index,
bool onOff);
60 void setStiffness(
int index,
btScalar stiffness);
61 void setDamping(
int index,
btScalar damping);
62 void setEquilibriumPoint();
63 void setEquilibriumPoint(
int index);
64 void setEquilibriumPoint(
int index,
btScalar val);
68 return m_springEnabled[index];
73 return m_springStiffness[index];
78 return m_springDamping[index];
83 return m_equilibriumPoint[index];
88 virtual void getInfo2 (btConstraintInfo2* info);
90 virtual int calculateSerializeBufferSize()
const;
92 virtual const char* serialize(
void* dataBuffer,
btSerializer* serializer)
const;
140 #endif // BT_GENERIC_6DOF_SPRING_CONSTRAINT_H double m_springStiffness[6]
btGeneric6DofConstraintDoubleData2 m_6dofData
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
btGeneric6DofConstraint between two rigidbodies each with a pivotpoint that descibes the axis locatio...
#define SIMD_FORCE_INLINE
#define btGeneric6DofSpringConstraintData2
btScalar m_springDamping[6]
btScalar m_equilibriumPoint[6]
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btGeneric6DofConstraintData m_6dofData
btScalar getStiffness(int index) const
btScalar getDamping(int index) const
btScalar m_springStiffness[6]
The btRigidBody is the main class for rigid body objects.
btVector3 can be used to represent 3D points and vectors.
#define ATTRIBUTE_ALIGNED16(a)
bool isSpringEnabled(int index) const
#define btGeneric6DofSpringConstraintDataName
float m_equilibriumPoint[6]
double m_equilibriumPoint[6]
#define BT_DECLARE_ALIGNED_ALLOCATOR()
float m_springStiffness[6]
double m_springDamping[6]
virtual int calculateSerializeBufferSize() const
Generic 6 DOF constraint that allows to set spring motors to any translational and rotational DOF.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...