Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes

btTypedConstraint Class Reference

TypedConstraint is the baseclass for Bullet constraints and vehicles. More...

#include <btTypedConstraint.h>

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

List of all members.

Classes

struct  btConstraintInfo1
struct  btConstraintInfo2

Public Member Functions

 BT_DECLARE_ALIGNED_ALLOCATOR ()
virtual ~btTypedConstraint ()
 btTypedConstraint (btTypedConstraintType type, btRigidBody &rbA)
 btTypedConstraint (btTypedConstraintType type, btRigidBody &rbA, btRigidBody &rbB)
int getOverrideNumSolverIterations () const
void setOverrideNumSolverIterations (int overideNumIterations)
 override the number of constraint solver iterations used to solve this constraint -1 will use the default number of iterations, as specified in SolverInfo.m_numIterations
virtual void buildJacobian ()
 internal method used by the constraint solver, don't use them directly
virtual void setupSolverConstraint (btConstraintArray &ca, int solverBodyA, int solverBodyB, btScalar timeStep)
 internal method used by the constraint solver, don't use them directly
virtual void getInfo1 (btConstraintInfo1 *info)=0
 internal method used by the constraint solver, don't use them directly
virtual void getInfo2 (btConstraintInfo2 *info)=0
 internal method used by the constraint solver, don't use them directly
void internalSetAppliedImpulse (btScalar appliedImpulse)
 internal method used by the constraint solver, don't use them directly
btScalar internalGetAppliedImpulse ()
 internal method used by the constraint solver, don't use them directly
btScalar getBreakingImpulseThreshold () const
void setBreakingImpulseThreshold (btScalar threshold)
bool isEnabled () const
void setEnabled (bool enabled)
virtual void solveConstraintObsolete (btSolverBody &, btSolverBody &, btScalar)
 internal method used by the constraint solver, don't use them directly
const btRigidBodygetRigidBodyA () const
const btRigidBodygetRigidBodyB () const
btRigidBodygetRigidBodyA ()
btRigidBodygetRigidBodyB ()
int getUserConstraintType () const
void setUserConstraintType (int userConstraintType)
void setUserConstraintId (int uid)
int getUserConstraintId () const
void setUserConstraintPtr (void *ptr)
void * getUserConstraintPtr ()
void setJointFeedback (btJointFeedback *jointFeedback)
const btJointFeedbackgetJointFeedback () const
btJointFeedbackgetJointFeedback ()
int getUid () const
bool needsFeedback () const
void enableFeedback (bool needsFeedback)
 enableFeedback will allow to read the applied linear and angular impulse use getAppliedImpulse, getAppliedLinearImpulse and getAppliedAngularImpulse to read feedback information
btScalar getAppliedImpulse () const
 getAppliedImpulse is an estimated total applied impulse.
btTypedConstraintType getConstraintType () const
void setDbgDrawSize (btScalar dbgDrawSize)
btScalar getDbgDrawSize ()
virtual void setParam (int num, btScalar value, int axis=-1)=0
 override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).
virtual btScalar getParam (int num, int axis=-1) const =0
 return the local value of parameter
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)

Static Public Member Functions

static btRigidBodygetFixedBody ()

Protected Member Functions

btScalar getMotorFactor (btScalar pos, btScalar lowLim, btScalar uppLim, btScalar vel, btScalar timeFact)
 internal method used by the constraint solver, don't use them directly

Protected Attributes

btRigidBodym_rbA
btRigidBodym_rbB
btScalar m_appliedImpulse
btScalar m_dbgDrawSize
btJointFeedbackm_jointFeedback

Private Member Functions

btTypedConstraintoperator= (btTypedConstraint &other)

Private Attributes

int m_userConstraintType
union {
   int   m_userConstraintId
   void *   m_userConstraintPtr
}; 
btScalar m_breakingImpulseThreshold
bool m_isEnabled
bool m_needsFeedback
int m_overrideNumSolverIterations

Detailed Description

TypedConstraint is the baseclass for Bullet constraints and vehicles.

Definition at line 66 of file btTypedConstraint.h.


Constructor & Destructor Documentation

virtual btTypedConstraint::~btTypedConstraint (  )  [inline, virtual]

Definition at line 104 of file btTypedConstraint.h.

btTypedConstraint::btTypedConstraint ( btTypedConstraintType  type,
btRigidBody rbA 
)

Definition at line 24 of file btTypedConstraint.cpp.

btTypedConstraint::btTypedConstraint ( btTypedConstraintType  type,
btRigidBody rbA,
btRigidBody rbB 
)

Definition at line 41 of file btTypedConstraint.cpp.


Member Function Documentation

btTypedConstraint::BT_DECLARE_ALIGNED_ALLOCATOR (  ) 
virtual void btTypedConstraint::buildJacobian (  )  [inline, virtual]

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

Reimplemented in btConeTwistConstraint, btContactConstraint, btGeneric6DofConstraint, btHingeConstraint, and btPoint2PointConstraint.

Definition at line 161 of file btTypedConstraint.h.

int btTypedConstraint::calculateSerializeBufferSize (  )  const [inline, virtual]
void btTypedConstraint::enableFeedback ( bool  needsFeedback  )  [inline]

enableFeedback will allow to read the applied linear and angular impulse use getAppliedImpulse, getAppliedLinearImpulse and getAppliedAngularImpulse to read feedback information

Definition at line 291 of file btTypedConstraint.h.

btScalar btTypedConstraint::getAppliedImpulse (  )  const [inline]

getAppliedImpulse is an estimated total applied impulse.

This feedback could be used to determine breaking constraints or playing sounds.

Definition at line 298 of file btTypedConstraint.h.

btScalar btTypedConstraint::getBreakingImpulseThreshold (  )  const [inline]

Definition at line 190 of file btTypedConstraint.h.

btTypedConstraintType btTypedConstraint::getConstraintType (  )  const [inline]

Definition at line 304 of file btTypedConstraint.h.

btScalar btTypedConstraint::getDbgDrawSize (  )  [inline]

Definition at line 313 of file btTypedConstraint.h.

btRigidBody & btTypedConstraint::getFixedBody (  )  [static]

Definition at line 148 of file btTypedConstraint.cpp.

virtual void btTypedConstraint::getInfo1 ( btConstraintInfo1 info  )  [pure virtual]

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

Implemented in btConeTwistConstraint, btContactConstraint, btGearConstraint, btGeneric6DofConstraint, btHingeConstraint, btPoint2PointConstraint, and btSliderConstraint.

virtual void btTypedConstraint::getInfo2 ( btConstraintInfo2 info  )  [pure virtual]
const btJointFeedback* btTypedConstraint::getJointFeedback (  )  const [inline]

Definition at line 268 of file btTypedConstraint.h.

btJointFeedback* btTypedConstraint::getJointFeedback (  )  [inline]

Definition at line 273 of file btTypedConstraint.h.

btScalar btTypedConstraint::getMotorFactor ( btScalar  pos,
btScalar  lowLim,
btScalar  uppLim,
btScalar  vel,
btScalar  timeFact 
) [protected]

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

Definition at line 60 of file btTypedConstraint.cpp.

int btTypedConstraint::getOverrideNumSolverIterations (  )  const [inline]

Definition at line 148 of file btTypedConstraint.h.

virtual btScalar btTypedConstraint::getParam ( int  num,
int  axis = -1 
) const [pure virtual]
const btRigidBody& btTypedConstraint::getRigidBodyA (  )  const [inline]

Reimplemented in btConeTwistConstraint, btHingeConstraint, and btSliderConstraint.

Definition at line 215 of file btTypedConstraint.h.

btRigidBody& btTypedConstraint::getRigidBodyA (  )  [inline]

Reimplemented in btHingeConstraint.

Definition at line 224 of file btTypedConstraint.h.

const btRigidBody& btTypedConstraint::getRigidBodyB (  )  const [inline]

Reimplemented in btConeTwistConstraint, btHingeConstraint, and btSliderConstraint.

Definition at line 219 of file btTypedConstraint.h.

btRigidBody& btTypedConstraint::getRigidBodyB (  )  [inline]

Reimplemented in btHingeConstraint.

Definition at line 228 of file btTypedConstraint.h.

int btTypedConstraint::getUid (  )  const [inline]

Definition at line 279 of file btTypedConstraint.h.

int btTypedConstraint::getUserConstraintId (  )  const [inline]

Definition at line 248 of file btTypedConstraint.h.

void* btTypedConstraint::getUserConstraintPtr (  )  [inline]

Definition at line 258 of file btTypedConstraint.h.

int btTypedConstraint::getUserConstraintType (  )  const [inline]

Definition at line 233 of file btTypedConstraint.h.

btScalar btTypedConstraint::internalGetAppliedImpulse (  )  [inline]

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

Definition at line 184 of file btTypedConstraint.h.

void btTypedConstraint::internalSetAppliedImpulse ( btScalar  appliedImpulse  )  [inline]

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

Definition at line 179 of file btTypedConstraint.h.

bool btTypedConstraint::isEnabled (  )  const [inline]

Definition at line 200 of file btTypedConstraint.h.

bool btTypedConstraint::needsFeedback (  )  const [inline]

Definition at line 284 of file btTypedConstraint.h.

btTypedConstraint& btTypedConstraint::operator= ( btTypedConstraint other  )  [inline, private]

Definition at line 82 of file btTypedConstraint.h.

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

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

Reimplemented in btConeTwistConstraint, btGeneric6DofConstraint, btGeneric6DofSpringConstraint, btHingeConstraint, btPoint2PointConstraint, and btSliderConstraint.

Definition at line 110 of file btTypedConstraint.cpp.

void btTypedConstraint::setBreakingImpulseThreshold ( btScalar  threshold  )  [inline]

Definition at line 195 of file btTypedConstraint.h.

void btTypedConstraint::setDbgDrawSize ( btScalar  dbgDrawSize  )  [inline]

Definition at line 309 of file btTypedConstraint.h.

void btTypedConstraint::setEnabled ( bool  enabled  )  [inline]

Definition at line 205 of file btTypedConstraint.h.

void btTypedConstraint::setJointFeedback ( btJointFeedback jointFeedback  )  [inline]

Definition at line 263 of file btTypedConstraint.h.

void btTypedConstraint::setOverrideNumSolverIterations ( int  overideNumIterations  )  [inline]

override the number of constraint solver iterations used to solve this constraint -1 will use the default number of iterations, as specified in SolverInfo.m_numIterations

Definition at line 155 of file btTypedConstraint.h.

virtual void btTypedConstraint::setParam ( int  num,
btScalar  value,
int  axis = -1 
) [pure virtual]

override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5).

If no axis is provided, it uses the default axis for this constraint.

Implemented in btConeTwistConstraint, btGearConstraint, btGeneric6DofConstraint, btHingeConstraint, btPoint2PointConstraint, and btSliderConstraint.

virtual void btTypedConstraint::setupSolverConstraint ( btConstraintArray ca,
int  solverBodyA,
int  solverBodyB,
btScalar  timeStep 
) [inline, virtual]

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

Definition at line 164 of file btTypedConstraint.h.

void btTypedConstraint::setUserConstraintId ( int  uid  )  [inline]

Definition at line 243 of file btTypedConstraint.h.

void btTypedConstraint::setUserConstraintPtr ( void *  ptr  )  [inline]

Definition at line 253 of file btTypedConstraint.h.

void btTypedConstraint::setUserConstraintType ( int  userConstraintType  )  [inline]

Definition at line 238 of file btTypedConstraint.h.

virtual void btTypedConstraint::solveConstraintObsolete ( btSolverBody &  ,
btSolverBody &  ,
btScalar   
) [inline, virtual]

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

Reimplemented in btConeTwistConstraint.

Definition at line 212 of file btTypedConstraint.h.


Member Data Documentation

union { ... } [private]

Definition at line 92 of file btTypedConstraint.h.

Definition at line 76 of file btTypedConstraint.h.

Definition at line 93 of file btTypedConstraint.h.

Definition at line 77 of file btTypedConstraint.h.

Definition at line 94 of file btTypedConstraint.h.

Definition at line 78 of file btTypedConstraint.h.

Definition at line 79 of file btTypedConstraint.h.

Definition at line 90 of file btTypedConstraint.h.

Definition at line 91 of file btTypedConstraint.h.

Definition at line 72 of file btTypedConstraint.h.

Definition at line 73 of file btTypedConstraint.h.

Definition at line 68 of file btTypedConstraint.h.


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