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];
57 void enableSpring(
int index,
bool onOff);
58 void setStiffness(
int index,
btScalar stiffness);
59 void setDamping(
int index,
btScalar damping);
60 void setEquilibriumPoint();
61 void setEquilibriumPoint(
int index);
62 void setEquilibriumPoint(
int index,
btScalar val);
66 return m_springEnabled[index];
71 return m_springStiffness[index];
76 return m_springDamping[index];
81 return m_equilibriumPoint[index];
86 virtual void getInfo2(btConstraintInfo2 * info);
88 virtual int calculateSerializeBufferSize()
const;
90 virtual const char* serialize(
void* dataBuffer,
btSerializer* serializer)
const;
125 for (i = 0; i < 6; i++)
#define btGeneric6DofSpringConstraintDataName
#define btGeneric6DofSpringConstraintData2
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
btGeneric6DofConstraint between two rigidbodies each with a pivotpoint that descibes the axis locatio...
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
Generic 6 DOF constraint that allows to set spring motors to any translational and rotational DOF.
btScalar m_springDamping[6]
BT_DECLARE_ALIGNED_ALLOCATOR()
btScalar getEquilibriumPoint(int index) const
virtual const char * serialize(void *dataBuffer, btSerializer *serializer) const
fills the dataBuffer and returns the struct name (and 0 on failure)
btScalar m_equilibriumPoint[6]
btScalar getStiffness(int index) const
btScalar getDamping(int index) const
btScalar m_springStiffness[6]
virtual int calculateSerializeBufferSize() const
bool isSpringEnabled(int index) const
The btRigidBody is the main class for rigid body objects.
btVector3 can be used to represent 3D points and vectors.
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