Public Member Functions | Protected Member Functions | Protected Attributes

btGeneric6DofSpringConstraint Class Reference

Generic 6 DOF constraint that allows to set spring motors to any translational and rotational DOF. More...

#include <btGeneric6DofSpringConstraint.h>

Inheritance diagram for btGeneric6DofSpringConstraint:
Inheritance graph
[legend]
Collaboration diagram for btGeneric6DofSpringConstraint:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BT_DECLARE_ALIGNED_ALLOCATOR ()
 btGeneric6DofSpringConstraint (btRigidBody &rbA, btRigidBody &rbB, const btTransform &frameInA, const btTransform &frameInB, bool useLinearReferenceFrameA)
 btGeneric6DofSpringConstraint (btRigidBody &rbB, const btTransform &frameInB, bool useLinearReferenceFrameB)
void enableSpring (int index, bool onOff)
void setStiffness (int index, btScalar stiffness)
void setDamping (int index, btScalar damping)
void setEquilibriumPoint ()
void setEquilibriumPoint (int index)
void setEquilibriumPoint (int index, btScalar val)
virtual void setAxis (const btVector3 &axis1, const btVector3 &axis2)
virtual void getInfo2 (btConstraintInfo2 *info)
 internal method used by the constraint solver, don't use them directly
virtual int calculateSerializeBufferSize () const
virtual const char * serialize (void *dataBuffer, btSerializer *serializer) const
 fills the dataBuffer and returns the struct name (and 0 on failure)

Protected Member Functions

void init ()
void internalUpdateSprings (btConstraintInfo2 *info)

Protected Attributes

bool m_springEnabled [6]
btScalar m_equilibriumPoint [6]
btScalar m_springStiffness [6]
btScalar m_springDamping [6]

Detailed Description

Generic 6 DOF constraint that allows to set spring motors to any translational and rotational DOF.

DOF index used in enableSpring() and setStiffness() means: 0 : translation X 1 : translation Y 2 : translation Z 3 : rotation X (3rd Euler rotational around new position of X axis, range [-PI+epsilon, PI-epsilon] ) 4 : rotation Y (2nd Euler rotational around new position of Y axis, range [-PI/2+epsilon, PI/2-epsilon] ) 5 : rotation Z (1st Euler rotational around Z axis, range [-PI+epsilon, PI-epsilon] )

Definition at line 35 of file btGeneric6DofSpringConstraint.h.


Constructor & Destructor Documentation

btGeneric6DofSpringConstraint::btGeneric6DofSpringConstraint ( btRigidBody rbA,
btRigidBody rbB,
const btTransform frameInA,
const btTransform frameInB,
bool  useLinearReferenceFrameA 
)

Definition at line 21 of file btGeneric6DofSpringConstraint.cpp.

btGeneric6DofSpringConstraint::btGeneric6DofSpringConstraint ( btRigidBody rbB,
const btTransform frameInB,
bool  useLinearReferenceFrameB 
)

Definition at line 28 of file btGeneric6DofSpringConstraint.cpp.


Member Function Documentation

btGeneric6DofSpringConstraint::BT_DECLARE_ALIGNED_ALLOCATOR (  ) 

Reimplemented from btGeneric6DofConstraint.

Reimplemented in btHinge2Constraint.

int btGeneric6DofSpringConstraint::calculateSerializeBufferSize (  )  const [inline, virtual]

Reimplemented from btGeneric6DofConstraint.

Definition at line 79 of file btGeneric6DofSpringConstraint.h.

void btGeneric6DofSpringConstraint::enableSpring ( int  index,
bool  onOff 
)

Definition at line 49 of file btGeneric6DofSpringConstraint.cpp.

void btGeneric6DofSpringConstraint::getInfo2 ( btConstraintInfo2 info  )  [virtual]

internal method used by the constraint solver, don't use them directly

Reimplemented from btGeneric6DofConstraint.

Definition at line 155 of file btGeneric6DofSpringConstraint.cpp.

void btGeneric6DofSpringConstraint::init (  )  [protected]

Definition at line 35 of file btGeneric6DofSpringConstraint.cpp.

void btGeneric6DofSpringConstraint::internalUpdateSprings ( btConstraintInfo2 info  )  [protected]

Definition at line 117 of file btGeneric6DofSpringConstraint.cpp.

const char * btGeneric6DofSpringConstraint::serialize ( void *  dataBuffer,
btSerializer serializer 
) const [inline, virtual]

fills the dataBuffer and returns the struct name (and 0 on failure)

Reimplemented from btGeneric6DofConstraint.

Definition at line 85 of file btGeneric6DofSpringConstraint.h.

void btGeneric6DofSpringConstraint::setAxis ( const btVector3 axis1,
const btVector3 axis2 
) [virtual]

Reimplemented from btGeneric6DofConstraint.

Definition at line 165 of file btGeneric6DofSpringConstraint.cpp.

void btGeneric6DofSpringConstraint::setDamping ( int  index,
btScalar  damping 
)

Definition at line 72 of file btGeneric6DofSpringConstraint.cpp.

void btGeneric6DofSpringConstraint::setEquilibriumPoint ( int  index,
btScalar  val 
)

Definition at line 110 of file btGeneric6DofSpringConstraint.cpp.

void btGeneric6DofSpringConstraint::setEquilibriumPoint (  ) 

Definition at line 79 of file btGeneric6DofSpringConstraint.cpp.

void btGeneric6DofSpringConstraint::setEquilibriumPoint ( int  index  ) 

Definition at line 96 of file btGeneric6DofSpringConstraint.cpp.

void btGeneric6DofSpringConstraint::setStiffness ( int  index,
btScalar  stiffness 
)

Definition at line 65 of file btGeneric6DofSpringConstraint.cpp.


Member Data Documentation

Definition at line 39 of file btGeneric6DofSpringConstraint.h.

Definition at line 41 of file btGeneric6DofSpringConstraint.h.

Definition at line 38 of file btGeneric6DofSpringConstraint.h.

Definition at line 40 of file btGeneric6DofSpringConstraint.h.


The documentation for this class was generated from the following files: