Blender V2.61 - r43446
|
TypedConstraint is the baseclass for Bullet constraints and vehicles. More...
#include <btTypedConstraint.h>
Classes | |
struct | btConstraintInfo1 |
struct | btConstraintInfo2 |
Public Member Functions | |
virtual | ~btTypedConstraint () |
btTypedConstraint (btTypedConstraintType type, btRigidBody &rbA) | |
btTypedConstraint (btTypedConstraintType type, btRigidBody &rbA, btRigidBody &rbB) | |
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 | |
virtual void | solveConstraintObsolete (btRigidBody &, btRigidBody &, btScalar) |
internal method used by the constraint solver, don't use them directly | |
const btRigidBody & | getRigidBodyA () const |
const btRigidBody & | getRigidBodyB () const |
btRigidBody & | getRigidBodyA () |
btRigidBody & | getRigidBodyB () |
int | getUserConstraintType () const |
void | setUserConstraintType (int userConstraintType) |
void | setUserConstraintId (int uid) |
int | getUserConstraintId () const |
void | setUserConstraintPtr (void *ptr) |
void * | getUserConstraintPtr () |
int | getUid () const |
bool | needsFeedback () const |
void | enableFeedback (bool needsFeedback) |
btScalar | getAppliedImpulse () const |
btTypedConstraintType | getConstraintType () const |
void | setDbgDrawSize (btScalar dbgDrawSize) |
btScalar | getDbgDrawSize () |
virtual void | setParam (int num, btScalar value, int axis=-1)=0 |
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) | |
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 | |
Static Protected Member Functions | |
static btRigidBody & | getFixedBody () |
Protected Attributes | |
btRigidBody & | m_rbA |
btRigidBody & | m_rbB |
btScalar | m_appliedImpulse |
btScalar | m_dbgDrawSize |
TypedConstraint is the baseclass for Bullet constraints and vehicles.
Definition at line 55 of file btTypedConstraint.h.
virtual btTypedConstraint::~btTypedConstraint | ( | ) | [inline, virtual] |
Definition at line 87 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 37 of file btTypedConstraint.cpp.
virtual void btTypedConstraint::buildJacobian | ( | ) | [inline, virtual] |
internal method used by the constraint solver, don't use them directly
Reimplemented in btConeTwistConstraint, and btGeneric6DofConstraint.
Definition at line 130 of file btTypedConstraint.h.
Referenced by btSliderConstraint::setFrames(), and btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup().
SIMD_FORCE_INLINE int btTypedConstraint::calculateSerializeBufferSize | ( | ) | const [virtual] |
Reimplemented in btConeTwistConstraint, btGeneric6DofConstraint, btGeneric6DofSpringConstraint, and btSliderConstraint.
Definition at line 309 of file btTypedConstraint.h.
Referenced by btDiscreteDynamicsWorld::serializeRigidBodies().
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 222 of file btTypedConstraint.h.
References needsFeedback().
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 229 of file btTypedConstraint.h.
References btAssert, and m_appliedImpulse.
Referenced by CcdPhysicsEnvironment::getAppliedImpulse().
btTypedConstraintType btTypedConstraint::getConstraintType | ( | ) | const [inline] |
Definition at line 235 of file btTypedConstraint.h.
References btTypedObject::m_objectType.
Referenced by btDiscreteDynamicsWorld::debugDrawConstraint().
btScalar btTypedConstraint::getDbgDrawSize | ( | ) | [inline] |
Definition at line 244 of file btTypedConstraint.h.
References m_dbgDrawSize.
Referenced by btDiscreteDynamicsWorld::debugDrawConstraint().
btRigidBody & btTypedConstraint::getFixedBody | ( | ) | [static, protected] |
Definition at line 136 of file btTypedConstraint.cpp.
References btRigidBody::setMassProps().
virtual void btTypedConstraint::getInfo1 | ( | btConstraintInfo1 * | info | ) | [pure virtual] |
internal method used by the constraint solver, don't use them directly
Implemented in btConeTwistConstraint, btGeneric6DofConstraint, and btSliderConstraint.
Referenced by btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup().
virtual void btTypedConstraint::getInfo2 | ( | btConstraintInfo2 * | info | ) | [pure virtual] |
internal method used by the constraint solver, don't use them directly
Implemented in btConeTwistConstraint, btGeneric6DofConstraint, btGeneric6DofSpringConstraint, and btSliderConstraint.
Referenced by btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup().
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 52 of file btTypedConstraint.cpp.
Referenced by btGeneric6DofConstraint::get_limit_motor_info2(), and btSliderConstraint::getInfo2NonVirtual().
virtual btScalar btTypedConstraint::getParam | ( | int | num, |
int | axis = -1 |
||
) | const [pure virtual] |
return the local value of parameter
Implemented in btConeTwistConstraint, btGeneric6DofConstraint, and btSliderConstraint.
const btRigidBody& btTypedConstraint::getRigidBodyA | ( | ) | const [inline] |
Reimplemented in btConeTwistConstraint, and btSliderConstraint.
Definition at line 162 of file btTypedConstraint.h.
References m_rbA.
Referenced by btDiscreteDynamicsWorld::addConstraint(), btGetConstraintIslandId(), btDiscreteDynamicsWorld::calculateSimulationIslands(), btGeneric6DofConstraint::calculateTransforms(), btRigidBody::checkCollideWithOverride(), CcdPhysicsEnvironment::removeConstraint(), btDiscreteDynamicsWorld::removeConstraint(), and btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup().
btRigidBody& btTypedConstraint::getRigidBodyA | ( | ) | [inline] |
Definition at line 171 of file btTypedConstraint.h.
References m_rbA.
const btRigidBody& btTypedConstraint::getRigidBodyB | ( | ) | const [inline] |
Reimplemented in btConeTwistConstraint, and btSliderConstraint.
Definition at line 166 of file btTypedConstraint.h.
References m_rbB.
Referenced by btDiscreteDynamicsWorld::addConstraint(), btGetConstraintIslandId(), btDiscreteDynamicsWorld::calculateSimulationIslands(), btGeneric6DofConstraint::calculateTransforms(), btRigidBody::checkCollideWithOverride(), CcdPhysicsEnvironment::removeConstraint(), btDiscreteDynamicsWorld::removeConstraint(), and btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup().
btRigidBody& btTypedConstraint::getRigidBodyB | ( | ) | [inline] |
Definition at line 175 of file btTypedConstraint.h.
References m_rbB.
int btTypedConstraint::getUid | ( | ) | const [inline] |
Definition at line 210 of file btTypedConstraint.h.
References m_userConstraintId.
int btTypedConstraint::getUserConstraintId | ( | ) | const [inline] |
Definition at line 195 of file btTypedConstraint.h.
References m_userConstraintId.
Referenced by CcdPhysicsEnvironment::createConstraint(), CcdPhysicsEnvironment::createUniversalD6Constraint(), CcdPhysicsEnvironment::getAppliedImpulse(), CcdPhysicsEnvironment::getConstraintById(), and CcdPhysicsEnvironment::removeConstraint().
void* btTypedConstraint::getUserConstraintPtr | ( | ) | [inline] |
Definition at line 205 of file btTypedConstraint.h.
References m_userConstraintPtr.
int btTypedConstraint::getUserConstraintType | ( | ) | const [inline] |
Definition at line 180 of file btTypedConstraint.h.
Referenced by CcdPhysicsEnvironment::getConstraintParam(), and CcdPhysicsEnvironment::setConstraintParam().
btScalar btTypedConstraint::internalGetAppliedImpulse | ( | ) | [inline] |
internal method used by the constraint solver, don't use them directly
Definition at line 153 of file btTypedConstraint.h.
References m_appliedImpulse.
Referenced by btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyFinish().
void btTypedConstraint::internalSetAppliedImpulse | ( | btScalar | appliedImpulse | ) | [inline] |
internal method used by the constraint solver, don't use them directly
Definition at line 148 of file btTypedConstraint.h.
References m_appliedImpulse.
Referenced by btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyFinish().
bool btTypedConstraint::needsFeedback | ( | ) | const [inline] |
Definition at line 215 of file btTypedConstraint.h.
Referenced by enableFeedback().
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, and btSliderConstraint.
Definition at line 102 of file btTypedConstraint.cpp.
References btRigidBodyData, btSerializer::findNameForPointer(), btRigidBody::getConstraintRef(), btRigidBody::getNumConstraintRefs(), btSerializer::getUniquePointer(), i, btTypedConstraintData::m_appliedImpulse, m_appliedImpulse, btTypedConstraintData::m_dbgDrawSize, m_dbgDrawSize, btTypedConstraintData::m_disableCollisionsBetweenLinkedBodies, btTypedConstraintData::m_name, btTypedConstraintData::m_needsFeedback, btTypedConstraintData::m_objectType, btTypedObject::m_objectType, m_rbA, btTypedConstraintData::m_rbA, m_rbB, btTypedConstraintData::m_rbB, btTypedConstraintData::m_userConstraintId, m_userConstraintId, btTypedConstraintData::m_userConstraintType, and btSerializer::serializeName().
Referenced by btDiscreteDynamicsWorld::serializeRigidBodies().
void btTypedConstraint::setDbgDrawSize | ( | btScalar | dbgDrawSize | ) | [inline] |
Definition at line 240 of file btTypedConstraint.h.
References m_dbgDrawSize.
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, btGeneric6DofConstraint, 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 133 of file btTypedConstraint.h.
void btTypedConstraint::setUserConstraintId | ( | int | uid | ) | [inline] |
Definition at line 190 of file btTypedConstraint.h.
References m_userConstraintId.
Referenced by CcdPhysicsEnvironment::createConstraint(), and CcdPhysicsEnvironment::createUniversalD6Constraint().
void btTypedConstraint::setUserConstraintPtr | ( | void * | ptr | ) | [inline] |
Definition at line 200 of file btTypedConstraint.h.
References m_userConstraintPtr.
void btTypedConstraint::setUserConstraintType | ( | int | userConstraintType | ) | [inline] |
Definition at line 185 of file btTypedConstraint.h.
Referenced by CcdPhysicsEnvironment::createConstraint(), and CcdPhysicsEnvironment::createUniversalD6Constraint().
virtual void btTypedConstraint::solveConstraintObsolete | ( | btRigidBody & | , |
btRigidBody & | , | ||
btScalar | |||
) | [inline, virtual] |
internal method used by the constraint solver, don't use them directly
Reimplemented in btConeTwistConstraint.
Definition at line 159 of file btTypedConstraint.h.
Referenced by btSequentialImpulseConstraintSolver::solveSingleIteration().
btScalar btTypedConstraint::m_appliedImpulse [protected] |
Definition at line 77 of file btTypedConstraint.h.
Referenced by btConeTwistConstraint::buildJacobian(), getAppliedImpulse(), internalGetAppliedImpulse(), internalSetAppliedImpulse(), serialize(), and btConeTwistConstraint::solveConstraintObsolete().
btScalar btTypedConstraint::m_dbgDrawSize [protected] |
Definition at line 78 of file btTypedConstraint.h.
Referenced by getDbgDrawSize(), serialize(), and setDbgDrawSize().
btRigidBody& btTypedConstraint::m_rbA [protected] |
Definition at line 75 of file btTypedConstraint.h.
Referenced by btGeneric6DofConstraint::buildAngularJacobian(), btGeneric6DofConstraint::buildJacobian(), btConeTwistConstraint::buildJacobian(), btGeneric6DofConstraint::buildLinearJacobian(), btGeneric6DofConstraint::calcAnchorPos(), btGeneric6DofConstraint::calculateTransforms(), btSliderConstraint::getAncorInA(), btConeTwistConstraint::getInfo1(), btSliderConstraint::getInfo1(), btGeneric6DofConstraint::getInfo1(), btConeTwistConstraint::getInfo2(), btSliderConstraint::getInfo2(), btGeneric6DofConstraint::getInfo2(), btSliderConstraint::getInfo2NonVirtual(), getRigidBodyA(), btSliderConstraint::getRigidBodyA(), btConeTwistConstraint::getRigidBodyA(), btSliderConstraint::initParams(), btGeneric6DofSpringConstraint::internalUpdateSprings(), serialize(), btGeneric6DofSpringConstraint::setAxis(), btGeneric6DofConstraint::setAxis(), btUniversalConstraint::setAxis(), btSliderConstraint::setFrames(), btConeTwistConstraint::setMotorTarget(), and btConeTwistConstraint::solveConstraintObsolete().
btRigidBody& btTypedConstraint::m_rbB [protected] |
Definition at line 76 of file btTypedConstraint.h.
Referenced by btGeneric6DofConstraint::buildAngularJacobian(), btGeneric6DofConstraint::buildJacobian(), btConeTwistConstraint::buildJacobian(), btGeneric6DofConstraint::buildLinearJacobian(), btGeneric6DofConstraint::calcAnchorPos(), btGeneric6DofConstraint::calculateTransforms(), btConeTwistConstraint::getInfo1(), btSliderConstraint::getInfo1(), btGeneric6DofConstraint::getInfo1(), btConeTwistConstraint::getInfo2(), btSliderConstraint::getInfo2(), btGeneric6DofConstraint::getInfo2(), btSliderConstraint::getInfo2NonVirtual(), getRigidBodyB(), btSliderConstraint::getRigidBodyB(), btConeTwistConstraint::getRigidBodyB(), btSliderConstraint::initParams(), btGeneric6DofSpringConstraint::internalUpdateSprings(), serialize(), btGeneric6DofSpringConstraint::setAxis(), btGeneric6DofConstraint::setAxis(), btUniversalConstraint::setAxis(), btSliderConstraint::setFrames(), btConeTwistConstraint::setMotorTarget(), and btConeTwistConstraint::solveConstraintObsolete().
Definition at line 61 of file btTypedConstraint.h.
Referenced by getUid(), getUserConstraintId(), serialize(), and setUserConstraintId().
Definition at line 62 of file btTypedConstraint.h.
Referenced by getUserConstraintPtr(), and setUserConstraintPtr().