Bullet Collision Detection & Physics Library
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
btConeTwistConstraint Class Reference

btConeTwistConstraint can be used to simulate ragdoll joints (upper arm, leg etc) More...

#include <btConeTwistConstraint.h>

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

Public Member Functions

 BT_DECLARE_ALIGNED_ALLOCATOR ()
 
 btConeTwistConstraint (btRigidBody &rbA, btRigidBody &rbB, const btTransform &rbAFrame, const btTransform &rbBFrame)
 
 btConeTwistConstraint (btRigidBody &rbA, const btTransform &rbAFrame)
 
virtual void buildJacobian ()
 internal method used by the constraint solver, don't use them directly More...
 
virtual void getInfo1 (btConstraintInfo1 *info)
 internal method used by the constraint solver, don't use them directly More...
 
void getInfo1NonVirtual (btConstraintInfo1 *info)
 
virtual void getInfo2 (btConstraintInfo2 *info)
 internal method used by the constraint solver, don't use them directly More...
 
void getInfo2NonVirtual (btConstraintInfo2 *info, const btTransform &transA, const btTransform &transB, const btMatrix3x3 &invInertiaWorldA, const btMatrix3x3 &invInertiaWorldB)
 
virtual void solveConstraintObsolete (btSolverBody &bodyA, btSolverBody &bodyB, btScalar timeStep)
 internal method used by the constraint solver, don't use them directly More...
 
void updateRHS (btScalar timeStep)
 
const btRigidBodygetRigidBodyA () const
 
const btRigidBodygetRigidBodyB () const
 
void setAngularOnly (bool angularOnly)
 
void setLimit (int limitIndex, btScalar limitValue)
 
void setLimit (btScalar _swingSpan1, btScalar _swingSpan2, btScalar _twistSpan, btScalar _softness=1.f, btScalar _biasFactor=0.3f, btScalar _relaxationFactor=1.0f)
 
const btTransformgetAFrame ()
 
const btTransformgetBFrame ()
 
int getSolveTwistLimit ()
 
int getSolveSwingLimit ()
 
btScalar getTwistLimitSign ()
 
void calcAngleInfo ()
 
void calcAngleInfo2 (const btTransform &transA, const btTransform &transB, const btMatrix3x3 &invInertiaWorldA, const btMatrix3x3 &invInertiaWorldB)
 
btScalar getSwingSpan1 ()
 
btScalar getSwingSpan2 ()
 
btScalar getTwistSpan ()
 
btScalar getTwistAngle ()
 
bool isPastSwingLimit ()
 
void setDamping (btScalar damping)
 
void enableMotor (bool b)
 
void setMaxMotorImpulse (btScalar maxMotorImpulse)
 
void setMaxMotorImpulseNormalized (btScalar maxMotorImpulse)
 
btScalar getFixThresh ()
 
void setFixThresh (btScalar fixThresh)
 
void setMotorTarget (const btQuaternion &q)
 
void setMotorTargetInConstraintSpace (const btQuaternion &q)
 
btVector3 GetPointForAngle (btScalar fAngleInRadians, btScalar fLength) const
 
virtual void setParam (int num, btScalar value, int axis=-1)
 override the default global value of a parameter (such as ERP or CFM), optionally provide the axis (0..5). More...
 
virtual void setFrames (const btTransform &frameA, const btTransform &frameB)
 
const btTransformgetFrameOffsetA () const
 
const btTransformgetFrameOffsetB () const
 
virtual btScalar getParam (int num, int axis=-1) const
 return the local value of parameter More...
 
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) More...
 
- Public Member Functions inherited from btTypedConstraint
 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 More...
 
virtual void setupSolverConstraint (btConstraintArray &ca, int solverBodyA, int solverBodyB, btScalar timeStep)
 internal method used by the constraint solver, don't use them directly More...
 
void internalSetAppliedImpulse (btScalar appliedImpulse)
 internal method used by the constraint solver, don't use them directly More...
 
btScalar internalGetAppliedImpulse ()
 internal method used by the constraint solver, don't use them directly More...
 
btScalar getBreakingImpulseThreshold () const
 
void setBreakingImpulseThreshold (btScalar threshold)
 
bool isEnabled () const
 
void setEnabled (bool enabled)
 
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 More...
 
btScalar getAppliedImpulse () const
 getAppliedImpulse is an estimated total applied impulse. More...
 
btTypedConstraintType getConstraintType () const
 
void setDbgDrawSize (btScalar dbgDrawSize)
 
btScalar getDbgDrawSize ()
 
- Public Member Functions inherited from btTypedObject
 btTypedObject (int objectType)
 
int getObjectType () const
 

Protected Member Functions

void init ()
 
void computeConeLimitInfo (const btQuaternion &qCone, btScalar &swingAngle, btVector3 &vSwingAxis, btScalar &swingLimit)
 
void computeTwistLimitInfo (const btQuaternion &qTwist, btScalar &twistAngle, btVector3 &vTwistAxis)
 
void adjustSwingAxisToUseEllipseNormal (btVector3 &vSwingAxis) const
 
- Protected Member Functions inherited from btTypedConstraint
btScalar getMotorFactor (btScalar pos, btScalar lowLim, btScalar uppLim, btScalar vel, btScalar timeFact)
 internal method used by the constraint solver, don't use them directly More...
 

Private Attributes

btJacobianEntry m_jac [3]
 
btTransform m_rbAFrame
 
btTransform m_rbBFrame
 
btScalar m_limitSoftness
 
btScalar m_biasFactor
 
btScalar m_relaxationFactor
 
btScalar m_damping
 
btScalar m_swingSpan1
 
btScalar m_swingSpan2
 
btScalar m_twistSpan
 
btScalar m_fixThresh
 
btVector3 m_swingAxis
 
btVector3 m_twistAxis
 
btScalar m_kSwing
 
btScalar m_kTwist
 
btScalar m_twistLimitSign
 
btScalar m_swingCorrection
 
btScalar m_twistCorrection
 
btScalar m_twistAngle
 
btScalar m_accSwingLimitImpulse
 
btScalar m_accTwistLimitImpulse
 
bool m_angularOnly
 
bool m_solveTwistLimit
 
bool m_solveSwingLimit
 
bool m_useSolveConstraintObsolete
 
btScalar m_swingLimitRatio
 
btScalar m_twistLimitRatio
 
btVector3 m_twistAxisA
 
bool m_bMotorEnabled
 
bool m_bNormalizedMotorStrength
 
btQuaternion m_qTarget
 
btScalar m_maxMotorImpulse
 
btVector3 m_accMotorImpulse
 
int m_flags
 
btScalar m_linCFM
 
btScalar m_linERP
 
btScalar m_angCFM
 

Additional Inherited Members

- Static Public Member Functions inherited from btTypedConstraint
static btRigidBodygetFixedBody ()
 
- Public Attributes inherited from btTypedObject
int m_objectType
 
- Protected Attributes inherited from btTypedConstraint
btRigidBodym_rbA
 
btRigidBodym_rbB
 
btScalar m_appliedImpulse
 
btScalar m_dbgDrawSize
 
btJointFeedbackm_jointFeedback
 

Detailed Description

btConeTwistConstraint can be used to simulate ragdoll joints (upper arm, leg etc)

Definition at line 62 of file btConeTwistConstraint.h.

Constructor & Destructor Documentation

btConeTwistConstraint::btConeTwistConstraint ( btRigidBody rbA,
btRigidBody rbB,
const btTransform rbAFrame,
const btTransform rbBFrame 
)

Definition at line 41 of file btConeTwistConstraint.cpp.

btConeTwistConstraint::btConeTwistConstraint ( btRigidBody rbA,
const btTransform rbAFrame 
)

Definition at line 50 of file btConeTwistConstraint.cpp.

Member Function Documentation

void btConeTwistConstraint::adjustSwingAxisToUseEllipseNormal ( btVector3 vSwingAxis) const
protected

Definition at line 952 of file btConeTwistConstraint.cpp.

btConeTwistConstraint::BT_DECLARE_ALIGNED_ALLOCATOR ( )
void btConeTwistConstraint::buildJacobian ( )
virtual

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

Reimplemented from btTypedConstraint.

Definition at line 263 of file btConeTwistConstraint.cpp.

void btConeTwistConstraint::calcAngleInfo ( )

Definition at line 536 of file btConeTwistConstraint.cpp.

void btConeTwistConstraint::calcAngleInfo2 ( const btTransform transA,
const btTransform transB,
const btMatrix3x3 invInertiaWorldA,
const btMatrix3x3 invInertiaWorldB 
)

Definition at line 627 of file btConeTwistConstraint.cpp.

int btConeTwistConstraint::calculateSerializeBufferSize ( ) const
inlinevirtual

Reimplemented from btTypedConstraint.

Definition at line 353 of file btConeTwistConstraint.h.

void btConeTwistConstraint::computeConeLimitInfo ( const btQuaternion qCone,
btScalar swingAngle,
btVector3 vSwingAxis,
btScalar swingLimit 
)
protected

Definition at line 829 of file btConeTwistConstraint.cpp.

void btConeTwistConstraint::computeTwistLimitInfo ( const btQuaternion qTwist,
btScalar twistAngle,
btVector3 vTwistAxis 
)
protected

Definition at line 926 of file btConeTwistConstraint.cpp.

void btConeTwistConstraint::enableMotor ( bool  b)
inline

Definition at line 262 of file btConeTwistConstraint.h.

const btTransform& btConeTwistConstraint::getAFrame ( )
inline

Definition at line 221 of file btConeTwistConstraint.h.

const btTransform& btConeTwistConstraint::getBFrame ( )
inline

Definition at line 222 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::getFixThresh ( )
inline

Definition at line 266 of file btConeTwistConstraint.h.

const btTransform& btConeTwistConstraint::getFrameOffsetA ( ) const
inline

Definition at line 286 of file btConeTwistConstraint.h.

const btTransform& btConeTwistConstraint::getFrameOffsetB ( ) const
inline

Definition at line 291 of file btConeTwistConstraint.h.

void btConeTwistConstraint::getInfo1 ( btConstraintInfo1 info)
virtual

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

Implements btTypedConstraint.

Definition at line 79 of file btConeTwistConstraint.cpp.

void btConeTwistConstraint::getInfo1NonVirtual ( btConstraintInfo1 info)

Definition at line 109 of file btConeTwistConstraint.cpp.

void btConeTwistConstraint::getInfo2 ( btConstraintInfo2 info)
virtual

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

Implements btTypedConstraint.

Definition at line 118 of file btConeTwistConstraint.cpp.

void btConeTwistConstraint::getInfo2NonVirtual ( btConstraintInfo2 info,
const btTransform transA,
const btTransform transB,
const btMatrix3x3 invInertiaWorldA,
const btMatrix3x3 invInertiaWorldB 
)

Definition at line 123 of file btConeTwistConstraint.cpp.

btScalar btConeTwistConstraint::getParam ( int  num,
int  axis = -1 
) const
virtual

return the local value of parameter

Implements btTypedConstraint.

Definition at line 1088 of file btConeTwistConstraint.cpp.

btVector3 btConeTwistConstraint::GetPointForAngle ( btScalar  fAngleInRadians,
btScalar  fLength 
) const

Definition at line 893 of file btConeTwistConstraint.cpp.

const btRigidBody& btConeTwistConstraint::getRigidBodyA ( ) const
inline

Definition at line 160 of file btConeTwistConstraint.h.

const btRigidBody& btConeTwistConstraint::getRigidBodyB ( ) const
inline

Definition at line 164 of file btConeTwistConstraint.h.

int btConeTwistConstraint::getSolveSwingLimit ( )
inline

Definition at line 229 of file btConeTwistConstraint.h.

int btConeTwistConstraint::getSolveTwistLimit ( )
inline

Definition at line 224 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::getSwingSpan1 ( )
inline

Definition at line 242 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::getSwingSpan2 ( )
inline

Definition at line 246 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::getTwistAngle ( )
inline

Definition at line 254 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::getTwistLimitSign ( )
inline

Definition at line 234 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::getTwistSpan ( )
inline

Definition at line 250 of file btConeTwistConstraint.h.

void btConeTwistConstraint::init ( )
protected

Definition at line 61 of file btConeTwistConstraint.cpp.

bool btConeTwistConstraint::isPastSwingLimit ( )
inline

Definition at line 258 of file btConeTwistConstraint.h.

const char * btConeTwistConstraint::serialize ( void *  dataBuffer,
btSerializer serializer 
) const
inlinevirtual

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

Reimplemented from btTypedConstraint.

Definition at line 361 of file btConeTwistConstraint.h.

void btConeTwistConstraint::setAngularOnly ( bool  angularOnly)
inline

Definition at line 169 of file btConeTwistConstraint.h.

void btConeTwistConstraint::setDamping ( btScalar  damping)
inline

Definition at line 260 of file btConeTwistConstraint.h.

void btConeTwistConstraint::setFixThresh ( btScalar  fixThresh)
inline

Definition at line 267 of file btConeTwistConstraint.h.

void btConeTwistConstraint::setFrames ( const btTransform frameA,
const btTransform frameB 
)
virtual

Definition at line 1133 of file btConeTwistConstraint.cpp.

void btConeTwistConstraint::setLimit ( int  limitIndex,
btScalar  limitValue 
)
inline

Definition at line 174 of file btConeTwistConstraint.h.

void btConeTwistConstraint::setLimit ( btScalar  _swingSpan1,
btScalar  _swingSpan2,
btScalar  _twistSpan,
btScalar  _softness = 1.f,
btScalar  _biasFactor = 0.3f,
btScalar  _relaxationFactor = 1.0f 
)
inline

Definition at line 210 of file btConeTwistConstraint.h.

void btConeTwistConstraint::setMaxMotorImpulse ( btScalar  maxMotorImpulse)
inline

Definition at line 263 of file btConeTwistConstraint.h.

void btConeTwistConstraint::setMaxMotorImpulseNormalized ( btScalar  maxMotorImpulse)
inline

Definition at line 264 of file btConeTwistConstraint.h.

void btConeTwistConstraint::setMotorTarget ( const btQuaternion q)

Definition at line 986 of file btConeTwistConstraint.cpp.

void btConeTwistConstraint::setMotorTargetInConstraintSpace ( const btQuaternion q)

Definition at line 1000 of file btConeTwistConstraint.cpp.

void btConeTwistConstraint::setParam ( int  num,
btScalar  value,
int  axis = -1 
)
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.

Implements btTypedConstraint.

Definition at line 1052 of file btConeTwistConstraint.cpp.

void btConeTwistConstraint::solveConstraintObsolete ( btSolverBody ,
btSolverBody ,
btScalar   
)
virtual

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

solve angular part

Reimplemented from btTypedConstraint.

Definition at line 311 of file btConeTwistConstraint.cpp.

void btConeTwistConstraint::updateRHS ( btScalar  timeStep)

Definition at line 528 of file btConeTwistConstraint.cpp.

Member Data Documentation

btVector3 btConeTwistConstraint::m_accMotorImpulse
private

Definition at line 115 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_accSwingLimitImpulse
private

Definition at line 96 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_accTwistLimitImpulse
private

Definition at line 97 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_angCFM
private

Definition at line 121 of file btConeTwistConstraint.h.

bool btConeTwistConstraint::m_angularOnly
private

Definition at line 99 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_biasFactor
private

Definition at line 73 of file btConeTwistConstraint.h.

bool btConeTwistConstraint::m_bMotorEnabled
private

Definition at line 111 of file btConeTwistConstraint.h.

bool btConeTwistConstraint::m_bNormalizedMotorStrength
private

Definition at line 112 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_damping
private

Definition at line 76 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_fixThresh
private

Definition at line 82 of file btConeTwistConstraint.h.

int btConeTwistConstraint::m_flags
private

Definition at line 118 of file btConeTwistConstraint.h.

btJacobianEntry btConeTwistConstraint::m_jac[3]
private

Definition at line 67 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_kSwing
private

Definition at line 87 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_kTwist
private

Definition at line 88 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_limitSoftness
private

Definition at line 72 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_linCFM
private

Definition at line 119 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_linERP
private

Definition at line 120 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_maxMotorImpulse
private

Definition at line 114 of file btConeTwistConstraint.h.

btQuaternion btConeTwistConstraint::m_qTarget
private

Definition at line 113 of file btConeTwistConstraint.h.

btTransform btConeTwistConstraint::m_rbAFrame
private

Definition at line 69 of file btConeTwistConstraint.h.

btTransform btConeTwistConstraint::m_rbBFrame
private

Definition at line 70 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_relaxationFactor
private

Definition at line 74 of file btConeTwistConstraint.h.

bool btConeTwistConstraint::m_solveSwingLimit
private

Definition at line 101 of file btConeTwistConstraint.h.

bool btConeTwistConstraint::m_solveTwistLimit
private

Definition at line 100 of file btConeTwistConstraint.h.

btVector3 btConeTwistConstraint::m_swingAxis
private

Definition at line 84 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_swingCorrection
private

Definition at line 91 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_swingLimitRatio
private

Definition at line 106 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_swingSpan1
private

Definition at line 78 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_swingSpan2
private

Definition at line 79 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_twistAngle
private

Definition at line 94 of file btConeTwistConstraint.h.

btVector3 btConeTwistConstraint::m_twistAxis
private

Definition at line 85 of file btConeTwistConstraint.h.

btVector3 btConeTwistConstraint::m_twistAxisA
private

Definition at line 108 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_twistCorrection
private

Definition at line 92 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_twistLimitRatio
private

Definition at line 107 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_twistLimitSign
private

Definition at line 90 of file btConeTwistConstraint.h.

btScalar btConeTwistConstraint::m_twistSpan
private

Definition at line 80 of file btConeTwistConstraint.h.

bool btConeTwistConstraint::m_useSolveConstraintObsolete
private

Definition at line 103 of file btConeTwistConstraint.h.


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