Blender V2.61 - r43446
|
#include <btRigidBody.h>
Classes | |
struct | btRigidBodyConstructionInfo |
Public Member Functions | |
btRigidBody (const btRigidBodyConstructionInfo &constructionInfo) | |
btRigidBody constructor using construction info | |
btRigidBody (btScalar mass, btMotionState *motionState, btCollisionShape *collisionShape, const btVector3 &localInertia=btVector3(0, 0, 0)) | |
virtual | ~btRigidBody () |
void | proceedToTransform (const btTransform &newTrans) |
void | predictIntegratedTransform (btScalar step, btTransform &predictedTransform) |
continuous collision detection needs prediction | |
void | saveKinematicState (btScalar step) |
void | applyGravity () |
void | setGravity (const btVector3 &acceleration) |
const btVector3 & | getGravity () const |
void | setDamping (btScalar lin_damping, btScalar ang_damping) |
btScalar | getLinearDamping () const |
btScalar | getAngularDamping () const |
btScalar | getLinearSleepingThreshold () const |
btScalar | getAngularSleepingThreshold () const |
void | applyDamping (btScalar timeStep) |
applyDamping damps the velocity, using the given m_linearDamping and m_angularDamping | |
SIMD_FORCE_INLINE const btCollisionShape * | getCollisionShape () const |
SIMD_FORCE_INLINE btCollisionShape * | getCollisionShape () |
void | setMassProps (btScalar mass, const btVector3 &inertia) |
const btVector3 & | getLinearFactor () const |
void | setLinearFactor (const btVector3 &linearFactor) |
btScalar | getInvMass () const |
const btMatrix3x3 & | getInvInertiaTensorWorld () const |
void | integrateVelocities (btScalar step) |
void | setCenterOfMassTransform (const btTransform &xform) |
void | applyCentralForce (const btVector3 &force) |
const btVector3 & | getTotalForce () const |
const btVector3 & | getTotalTorque () const |
const btVector3 & | getInvInertiaDiagLocal () const |
void | setInvInertiaDiagLocal (const btVector3 &diagInvInertia) |
void | setSleepingThresholds (btScalar linear, btScalar angular) |
void | applyTorque (const btVector3 &torque) |
void | applyForce (const btVector3 &force, const btVector3 &rel_pos) |
void | applyCentralImpulse (const btVector3 &impulse) |
void | applyTorqueImpulse (const btVector3 &torque) |
void | applyImpulse (const btVector3 &impulse, const btVector3 &rel_pos) |
void | clearForces () |
void | updateInertiaTensor () |
const btVector3 & | getCenterOfMassPosition () const |
btQuaternion | getOrientation () const |
const btTransform & | getCenterOfMassTransform () const |
const btVector3 & | getLinearVelocity () const |
const btVector3 & | getAngularVelocity () const |
void | setLinearVelocity (const btVector3 &lin_vel) |
void | setAngularVelocity (const btVector3 &ang_vel) |
btVector3 | getVelocityInLocalPoint (const btVector3 &rel_pos) const |
void | translate (const btVector3 &v) |
void | getAabb (btVector3 &aabbMin, btVector3 &aabbMax) const |
SIMD_FORCE_INLINE btScalar | computeImpulseDenominator (const btVector3 &pos, const btVector3 &normal) const |
SIMD_FORCE_INLINE btScalar | computeAngularImpulseDenominator (const btVector3 &axis) const |
SIMD_FORCE_INLINE void | updateDeactivation (btScalar timeStep) |
SIMD_FORCE_INLINE bool | wantsSleeping () |
const btBroadphaseProxy * | getBroadphaseProxy () const |
btBroadphaseProxy * | getBroadphaseProxy () |
void | setNewBroadphaseProxy (btBroadphaseProxy *broadphaseProxy) |
btMotionState * | getMotionState () |
const btMotionState * | getMotionState () const |
void | setMotionState (btMotionState *motionState) |
void | setAngularFactor (const btVector3 &angFac) |
void | setAngularFactor (btScalar angFac) |
const btVector3 & | getAngularFactor () const |
bool | isInWorld () const |
virtual bool | checkCollideWithOverride (btCollisionObject *co) |
void | addConstraintRef (btTypedConstraint *c) |
void | removeConstraintRef (btTypedConstraint *c) |
btTypedConstraint * | getConstraintRef (int index) |
int | getNumConstraintRefs () const |
void | setFlags (int flags) |
int | getFlags () const |
const btVector3 & | getDeltaLinearVelocity () const |
const btVector3 & | getDeltaAngularVelocity () const |
const btVector3 & | getPushVelocity () const |
const btVector3 & | getTurnVelocity () const |
btVector3 & | internalGetDeltaLinearVelocity () |
btVector3 & | internalGetDeltaAngularVelocity () |
const btVector3 & | internalGetAngularFactor () const |
const btVector3 & | internalGetInvMass () const |
btVector3 & | internalGetPushVelocity () |
btVector3 & | internalGetTurnVelocity () |
SIMD_FORCE_INLINE void | internalGetVelocityInLocalPointObsolete (const btVector3 &rel_pos, btVector3 &velocity) const |
SIMD_FORCE_INLINE void | internalGetAngularVelocity (btVector3 &angVel) const |
SIMD_FORCE_INLINE void | internalApplyImpulse (const btVector3 &linearComponent, const btVector3 &angularComponent, const btScalar impulseMagnitude) |
SIMD_FORCE_INLINE void | internalApplyPushImpulse (const btVector3 &linearComponent, const btVector3 &angularComponent, btScalar impulseMagnitude) |
void | internalWritebackVelocity () |
void | internalWritebackVelocity (btScalar timeStep) |
virtual int | calculateSerializeBufferSize () const |
virtual const char * | serialize (void *dataBuffer, class btSerializer *serializer) const |
fills the dataBuffer and returns the struct name (and 0 on failure) | |
virtual void | serializeSingleObject (class btSerializer *serializer) const |
Static Public Member Functions | |
static const btRigidBody * | upcast (const btCollisionObject *colObj) |
static btRigidBody * | upcast (btCollisionObject *colObj) |
Public Attributes | |
int | m_contactSolverType |
int | m_frictionSolverType |
Protected Member Functions | |
ATTRIBUTE_ALIGNED64 (btVector3 m_deltaLinearVelocity) | |
void | setupRigidBody (const btRigidBodyConstructionInfo &constructionInfo) |
setupRigidBody is only used internally by the constructor | |
Protected Attributes | |
btVector3 | m_deltaAngularVelocity |
btVector3 | m_angularFactor |
btVector3 | m_invMass |
btVector3 | m_pushVelocity |
btVector3 | m_turnVelocity |
The btRigidBody is the main class for rigid body objects. It is derived from btCollisionObject, so it keeps a pointer to a btCollisionShape. It is recommended for performance and memory use to share btCollisionShape objects whenever possible. There are 3 types of rigid bodies:
Definition at line 55 of file btRigidBody.h.
btRigidBody::btRigidBody | ( | const btRigidBodyConstructionInfo & | constructionInfo | ) |
btRigidBody constructor using construction info
Definition at line 30 of file btRigidBody.cpp.
References setupRigidBody().
btRigidBody::btRigidBody | ( | btScalar | mass, |
btMotionState * | motionState, | ||
btCollisionShape * | collisionShape, | ||
const btVector3 & | localInertia = btVector3(0,0,0) |
||
) |
btRigidBody constructor for backwards compatibility. To specify friction (etc) during rigid body construction, please use the other constructor (using btRigidBodyConstructionInfo)
Definition at line 35 of file btRigidBody.cpp.
References setupRigidBody().
virtual btRigidBody::~btRigidBody | ( | ) | [inline, virtual] |
Definition at line 171 of file btRigidBody.h.
References btAssert, and btAlignedObjectArray< T >::size().
void btRigidBody::addConstraintRef | ( | btTypedConstraint * | c | ) |
Definition at line 341 of file btRigidBody.cpp.
References btAlignedObjectArray< T >::findLinearSearch(), btAlignedObjectArray< T >::push_back(), and btAlignedObjectArray< T >::size().
Referenced by btDiscreteDynamicsWorld::addConstraint().
void btRigidBody::applyCentralForce | ( | const btVector3 & | force | ) | [inline] |
Definition at line 268 of file btRigidBody.h.
Referenced by applyForce(), CcdPhysicsController::ApplyForce(), and applyGravity().
void btRigidBody::applyCentralImpulse | ( | const btVector3 & | impulse | ) | [inline] |
Definition at line 310 of file btRigidBody.h.
Referenced by btSoftBody::Body::applyDCImpulse(), applyImpulse(), and CcdPhysicsEnvironment::processFhSprings().
void btRigidBody::applyDamping | ( | btScalar | timeStep | ) |
applyDamping damps the velocity, using the given m_linearDamping and m_angularDamping
Definition at line 158 of file btRigidBody.cpp.
References btPow().
Referenced by btSimpleDynamicsWorld::predictUnconstraintMotion(), and btDiscreteDynamicsWorld::predictUnconstraintMotion().
void btRigidBody::applyForce | ( | const btVector3 & | force, |
const btVector3 & | rel_pos | ||
) | [inline] |
Definition at line 304 of file btRigidBody.h.
References applyCentralForce(), and applyTorque().
void btRigidBody::applyGravity | ( | ) |
Definition at line 215 of file btRigidBody.cpp.
References applyCentralForce().
Referenced by btDiscreteDynamicsWorld::applyGravity(), and btSimpleDynamicsWorld::predictUnconstraintMotion().
void btRigidBody::applyImpulse | ( | const btVector3 & | impulse, |
const btVector3 & | rel_pos | ||
) | [inline] |
Definition at line 320 of file btRigidBody.h.
References applyCentralImpulse(), applyTorqueImpulse(), and m_angularFactor.
Referenced by btSoftBody::Body::applyDImpulse(), CcdPhysicsController::applyImpulse(), btSoftBody::Body::applyVImpulse(), btSoftBody::PSolve_Anchors(), btSoftBody::PSolve_RContacts(), btRaycastVehicle::updateFriction(), and btRaycastVehicle::updateVehicle().
void btRigidBody::applyTorque | ( | const btVector3 & | torque | ) | [inline] |
Definition at line 299 of file btRigidBody.h.
References m_angularFactor.
Referenced by applyForce(), and CcdPhysicsController::ApplyTorque().
void btRigidBody::applyTorqueImpulse | ( | const btVector3 & | torque | ) | [inline] |
Definition at line 315 of file btRigidBody.h.
References m_angularFactor.
Referenced by btSoftBody::Body::applyDAImpulse(), applyImpulse(), and btSoftBody::Body::applyVAImpulse().
btRigidBody::ATTRIBUTE_ALIGNED64 | ( | btVector3 | m_deltaLinearVelocity | ) | [protected] |
int btRigidBody::calculateSerializeBufferSize | ( | ) | const [virtual] |
Definition at line 356 of file btRigidBody.cpp.
References btRigidBodyData.
Referenced by ATTRIBUTE_ALIGNED16(), and serializeSingleObject().
bool btRigidBody::checkCollideWithOverride | ( | btCollisionObject * | co | ) | [virtual] |
Definition at line 303 of file btRigidBody.cpp.
References btTypedConstraint::getRigidBodyA(), btTypedConstraint::getRigidBodyB(), i, btAlignedObjectArray< T >::size(), and upcast().
void btRigidBody::clearForces | ( | ) | [inline] |
Definition at line 332 of file btRigidBody.h.
Referenced by btSimpleDynamicsWorld::clearForces(), and btDiscreteDynamicsWorld::clearForces().
SIMD_FORCE_INLINE btScalar btRigidBody::computeAngularImpulseDenominator | ( | const btVector3 & | axis | ) | const [inline] |
Definition at line 399 of file btRigidBody.h.
References getInvInertiaTensorWorld().
Referenced by btConeTwistConstraint::solveConstraintObsolete().
SIMD_FORCE_INLINE btScalar btRigidBody::computeImpulseDenominator | ( | const btVector3 & | pos, |
const btVector3 & | normal | ||
) | const [inline] |
Definition at line 387 of file btRigidBody.h.
References cross(), getCenterOfMassPosition(), and getInvInertiaTensorWorld().
Referenced by btWheelContactPoint::btWheelContactPoint(), and btSequentialImpulseConstraintSolver::setupContactConstraint().
void btRigidBody::getAabb | ( | btVector3 & | aabbMin, |
btVector3 & | aabbMax | ||
) | const |
Definition at line 126 of file btRigidBody.cpp.
References btCollisionShape::getAabb(), and getCollisionShape().
btScalar btRigidBody::getAngularDamping | ( | ) | const [inline] |
Definition at line 223 of file btRigidBody.h.
const btVector3& btRigidBody::getAngularFactor | ( | ) | const [inline] |
Definition at line 486 of file btRigidBody.h.
References m_angularFactor.
Referenced by CcdPhysicsController::ApplyTorque(), CcdPhysicsController::PostProcessReplica(), btSequentialImpulseConstraintSolver::setupContactConstraint(), btSequentialImpulseConstraintSolver::setupFrictionConstraint(), and btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup().
btScalar btRigidBody::getAngularSleepingThreshold | ( | ) | const [inline] |
Definition at line 233 of file btRigidBody.h.
const btVector3& btRigidBody::getAngularVelocity | ( | ) | const [inline] |
Definition at line 351 of file btRigidBody.h.
Referenced by btSoftBody::Body::angularVelocity(), ATTRIBUTE_ALIGNED64(), CcdPhysicsController::GetAngularVelocity(), btGeneric6DofConstraint::getInfo2(), btSliderConstraint::getInfo2NonVirtual(), internalGetAngularVelocity(), internalGetVelocityInLocalPointObsolete(), internalWritebackVelocity(), CcdPhysicsEnvironment::processFhSprings(), resolveSingleBilateral(), CcdPhysicsController::SetCenterOfMassTransform(), setCenterOfMassTransform(), btSequentialImpulseConstraintSolver::setupContactConstraint(), btSequentialImpulseConstraintSolver::setupFrictionConstraint(), btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(), and updateDeactivation().
const btBroadphaseProxy* btRigidBody::getBroadphaseProxy | ( | ) | const [inline] |
Definition at line 444 of file btRigidBody.h.
Referenced by btDiscreteDynamicsWorld::integrateTransforms(), and isInWorld().
btBroadphaseProxy* btRigidBody::getBroadphaseProxy | ( | ) | [inline] |
Definition at line 448 of file btRigidBody.h.
const btVector3& btRigidBody::getCenterOfMassPosition | ( | ) | const [inline] |
Definition at line 340 of file btRigidBody.h.
Referenced by btConeTwistConstraint::buildJacobian(), btGeneric6DofConstraint::buildLinearJacobian(), calcRollingFriction(), computeImpulseDenominator(), CcdPhysicsEnvironment::processFhSprings(), btRaycastVehicle::rayCast(), resolveSingleBilateral(), btConeTwistConstraint::solveConstraintObsolete(), btTranslationalLimitMotor::solveLinearAxis(), btRaycastVehicle::updateFriction(), btRaycastVehicle::updateVehicle(), and btWheelInfo::updateWheel().
const btTransform& btRigidBody::getCenterOfMassTransform | ( | ) | const [inline] |
Definition at line 345 of file btRigidBody.h.
Referenced by btGeneric6DofConstraint::btGeneric6DofConstraint(), btHinge2Constraint::btHinge2Constraint(), btSliderConstraint::btSliderConstraint(), btUniversalConstraint::btUniversalConstraint(), btGeneric6DofConstraint::buildAngularJacobian(), btGeneric6DofConstraint::buildJacobian(), btConeTwistConstraint::buildJacobian(), btGeneric6DofConstraint::buildLinearJacobian(), btConeTwistConstraint::calcAngleInfo(), btGeneric6DofConstraint::calculateTransforms(), CcdPhysicsEnvironment::createConstraint(), btDiscreteDynamicsWorld::debugDrawConstraint(), btSliderConstraint::getAncorInA(), btRaycastVehicle::getChassisWorldTransform(), btConeTwistConstraint::getInfo1(), btSliderConstraint::getInfo1(), btGeneric6DofConstraint::getInfo1(), btConeTwistConstraint::getInfo2(), btSliderConstraint::getInfo2(), btGeneric6DofConstraint::getInfo2(), btSliderConstraint::initParams(), CcdPhysicsEnvironment::processFhSprings(), resolveSingleBilateral(), btGeneric6DofSpringConstraint::setAxis(), btGeneric6DofConstraint::setAxis(), btUniversalConstraint::setAxis(), btSliderConstraint::setFrames(), btConeTwistConstraint::setMotorTarget(), btConeTwistConstraint::solveConstraintObsolete(), CcdPhysicsController::SynchronizeMotionStates(), and btRaycastVehicle::updateFriction().
SIMD_FORCE_INLINE const btCollisionShape* btRigidBody::getCollisionShape | ( | ) | const [inline] |
Definition at line 240 of file btRigidBody.h.
Referenced by btSimpleDynamicsWorld::addRigidBody(), btDiscreteDynamicsWorld::addRigidBody(), getAabb(), btDiscreteDynamicsWorld::integrateTransforms(), CcdPhysicsController::setScaling(), and CcdPhysicsEnvironment::updateCcdPhysicsController().
SIMD_FORCE_INLINE btCollisionShape* btRigidBody::getCollisionShape | ( | ) | [inline] |
Definition at line 244 of file btRigidBody.h.
btTypedConstraint* btRigidBody::getConstraintRef | ( | int | index | ) | [inline] |
Definition at line 502 of file btRigidBody.h.
Referenced by CcdPhysicsEnvironment::removeCcdPhysicsController(), and btTypedConstraint::serialize().
const btVector3& btRigidBody::getDeltaAngularVelocity | ( | ) | const [inline] |
Definition at line 527 of file btRigidBody.h.
References m_deltaAngularVelocity.
const btVector3& btRigidBody::getDeltaLinearVelocity | ( | ) | const [inline] |
Definition at line 522 of file btRigidBody.h.
int btRigidBody::getFlags | ( | void | ) | const [inline] |
Definition at line 517 of file btRigidBody.h.
Referenced by btDiscreteDynamicsWorld::addRigidBody(), and btDiscreteDynamicsWorld::setGravity().
const btVector3& btRigidBody::getGravity | ( | ) | const [inline] |
Definition at line 211 of file btRigidBody.h.
const btVector3& btRigidBody::getInvInertiaDiagLocal | ( | ) | const [inline] |
Definition at line 283 of file btRigidBody.h.
Referenced by btGeneric6DofConstraint::buildAngularJacobian(), btConeTwistConstraint::buildJacobian(), btGeneric6DofConstraint::buildLinearJacobian(), resolveSingleBilateral(), CcdPhysicsController::setRigidBody(), and btSequentialImpulseConstraintSolver::setupFrictionConstraint().
const btMatrix3x3& btRigidBody::getInvInertiaTensorWorld | ( | ) | const [inline] |
Definition at line 260 of file btRigidBody.h.
Referenced by btConeTwistConstraint::buildJacobian(), computeAngularImpulseDenominator(), computeImpulseDenominator(), btConeTwistConstraint::getInfo1(), btConeTwistConstraint::getInfo2(), btSoftBody::Body::invWorldInertia(), btSequentialImpulseConstraintSolver::setupContactConstraint(), btSequentialImpulseConstraintSolver::setupFrictionConstraint(), btRotationalLimitMotor::solveAngularLimits(), btConeTwistConstraint::solveConstraintObsolete(), btSoftBody::solveConstraints(), btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(), and btTranslationalLimitMotor::solveLinearAxis().
btScalar btRigidBody::getInvMass | ( | ) | const [inline] |
Definition at line 259 of file btRigidBody.h.
Referenced by btConeTwistConstraint::buildJacobian(), btGeneric6DofConstraint::buildLinearJacobian(), btGeneric6DofConstraint::calcAnchorPos(), btGeneric6DofConstraint::calculateTransforms(), btSequentialImpulseConstraintSolver::convertContact(), btDiscreteDynamicsWorld::debugDrawConstraint(), btSliderConstraint::getInfo2(), btSequentialImpulseConstraintSolver::getOrInitSolverBody(), btSoftBody::Body::invMass(), CcdPhysicsEnvironment::processFhSprings(), resolveSingleBilateral(), btSequentialImpulseConstraintSolver::setFrictionConstraintImpulse(), btSequentialImpulseConstraintSolver::setupContactConstraint(), btSequentialImpulseConstraintSolver::setupFrictionConstraint(), btConeTwistConstraint::solveConstraintObsolete(), btSoftBody::solveConstraints(), btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(), btTranslationalLimitMotor::solveLinearAxis(), and btRaycastVehicle::updateSuspension().
btScalar btRigidBody::getLinearDamping | ( | ) | const [inline] |
Definition at line 218 of file btRigidBody.h.
const btVector3& btRigidBody::getLinearFactor | ( | ) | const [inline] |
Definition at line 250 of file btRigidBody.h.
Referenced by CcdPhysicsController::PostProcessReplica(), btSequentialImpulseConstraintSolver::setFrictionConstraintImpulse(), and btSequentialImpulseConstraintSolver::setupContactConstraint().
btScalar btRigidBody::getLinearSleepingThreshold | ( | ) | const [inline] |
Definition at line 228 of file btRigidBody.h.
const btVector3& btRigidBody::getLinearVelocity | ( | ) | const [inline] |
Definition at line 348 of file btRigidBody.h.
Referenced by ATTRIBUTE_ALIGNED64(), btSliderConstraint::getInfo2(), btGeneric6DofConstraint::getInfo2(), CcdPhysicsController::GetLinearVelocity(), internalGetVelocityInLocalPointObsolete(), btGeneric6DofSpringConstraint::internalUpdateSprings(), internalWritebackVelocity(), btSoftBody::Body::linearVelocity(), CcdPhysicsEnvironment::processFhSprings(), resolveSingleBilateral(), CcdPhysicsController::SetCenterOfMassTransform(), setCenterOfMassTransform(), btSequentialImpulseConstraintSolver::setupContactConstraint(), btSequentialImpulseConstraintSolver::setupFrictionConstraint(), btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup(), CcdPhysicsController::SynchronizeMotionStates(), updateDeactivation(), and btRaycastVehicle::updateVehicle().
btMotionState* btRigidBody::getMotionState | ( | ) | [inline] |
Definition at line 458 of file btRigidBody.h.
Referenced by saveKinematicState(), btSimpleDynamicsWorld::synchronizeMotionStates(), btDiscreteDynamicsWorld::synchronizeSingleMotionState(), and btRaycastVehicle::updateWheelTransformsWS().
const btMotionState* btRigidBody::getMotionState | ( | ) | const [inline] |
Definition at line 462 of file btRigidBody.h.
int btRigidBody::getNumConstraintRefs | ( | ) | const [inline] |
Definition at line 507 of file btRigidBody.h.
References btAlignedObjectArray< T >::size().
Referenced by CcdPhysicsEnvironment::removeCcdPhysicsController(), and btTypedConstraint::serialize().
btQuaternion btRigidBody::getOrientation | ( | ) | const |
Definition at line 278 of file btRigidBody.cpp.
const btVector3& btRigidBody::getPushVelocity | ( | ) | const [inline] |
Definition at line 532 of file btRigidBody.h.
References m_pushVelocity.
const btVector3& btRigidBody::getTotalForce | ( | ) | const [inline] |
Definition at line 273 of file btRigidBody.h.
const btVector3& btRigidBody::getTotalTorque | ( | ) | const [inline] |
Definition at line 278 of file btRigidBody.h.
const btVector3& btRigidBody::getTurnVelocity | ( | ) | const [inline] |
Definition at line 537 of file btRigidBody.h.
References m_turnVelocity.
btVector3 btRigidBody::getVelocityInLocalPoint | ( | const btVector3 & | rel_pos | ) | const [inline] |
Definition at line 366 of file btRigidBody.h.
Referenced by calcRollingFriction(), CcdPhysicsController::GetVelocity(), CcdPhysicsEnvironment::processFhSprings(), btSoftBody::PSolve_Anchors(), btSoftBody::PSolve_RContacts(), btRaycastVehicle::rayCast(), btSolve2LinearConstraint::resolveBilateralPairConstraint(), resolveSingleBilateral(), btSolve2LinearConstraint::resolveUnilateralPairConstraint(), btSequentialImpulseConstraintSolver::setupContactConstraint(), btRaycastVehicle::updateVehicle(), and btWheelInfo::updateWheel().
void btRigidBody::integrateVelocities | ( | btScalar | step | ) |
clamp angular velocity. collision calculations will fail on higher angular velocities
Definition at line 260 of file btRigidBody.cpp.
References MAX_ANGVEL, and step().
Referenced by btSimpleDynamicsWorld::predictUnconstraintMotion(), and btDiscreteDynamicsWorld::predictUnconstraintMotion().
SIMD_FORCE_INLINE void btRigidBody::internalApplyImpulse | ( | const btVector3 & | linearComponent, |
const btVector3 & | angularComponent, | ||
const btScalar | impulseMagnitude | ||
) | [inline] |
Definition at line 588 of file btRigidBody.h.
References m_angularFactor, and m_deltaAngularVelocity.
Referenced by btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGeneric(), btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimit(), btSequentialImpulseConstraintSolver::setFrictionConstraintImpulse(), btSequentialImpulseConstraintSolver::setupContactConstraint(), btRotationalLimitMotor::solveAngularLimits(), btConeTwistConstraint::solveConstraintObsolete(), and btTranslationalLimitMotor::solveLinearAxis().
SIMD_FORCE_INLINE void btRigidBody::internalApplyPushImpulse | ( | const btVector3 & | linearComponent, |
const btVector3 & | angularComponent, | ||
btScalar | impulseMagnitude | ||
) | [inline] |
Definition at line 597 of file btRigidBody.h.
References m_angularFactor, m_pushVelocity, and m_turnVelocity.
Referenced by btSequentialImpulseConstraintSolver::resolveSplitPenetrationImpulseCacheFriendly().
const btVector3& btRigidBody::internalGetAngularFactor | ( | ) | const [inline] |
Definition at line 556 of file btRigidBody.h.
References m_angularFactor.
SIMD_FORCE_INLINE void btRigidBody::internalGetAngularVelocity | ( | btVector3 & | angVel | ) | const [inline] |
Definition at line 581 of file btRigidBody.h.
References getAngularVelocity(), and m_deltaAngularVelocity.
Referenced by btRotationalLimitMotor::solveAngularLimits(), and btConeTwistConstraint::solveConstraintObsolete().
btVector3& btRigidBody::internalGetDeltaAngularVelocity | ( | ) | [inline] |
Definition at line 551 of file btRigidBody.h.
References m_deltaAngularVelocity.
Referenced by btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGeneric(), btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGenericSIMD(), btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimit(), btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimitSIMD(), and btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup().
btVector3& btRigidBody::internalGetDeltaLinearVelocity | ( | ) | [inline] |
some internal methods, don't use them
Definition at line 546 of file btRigidBody.h.
Referenced by btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGeneric(), btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGenericSIMD(), btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimit(), btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimitSIMD(), and btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup().
const btVector3& btRigidBody::internalGetInvMass | ( | ) | const [inline] |
Definition at line 561 of file btRigidBody.h.
References m_invMass.
Referenced by btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGeneric(), btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGenericSIMD(), btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimit(), btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimitSIMD(), btSequentialImpulseConstraintSolver::resolveSplitPenetrationImpulseCacheFriendly(), and btSequentialImpulseConstraintSolver::resolveSplitPenetrationSIMD().
btVector3& btRigidBody::internalGetPushVelocity | ( | ) | [inline] |
Definition at line 566 of file btRigidBody.h.
References m_pushVelocity.
Referenced by btSequentialImpulseConstraintSolver::resolveSplitPenetrationImpulseCacheFriendly(), btSequentialImpulseConstraintSolver::resolveSplitPenetrationSIMD(), and btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup().
btVector3& btRigidBody::internalGetTurnVelocity | ( | ) | [inline] |
Definition at line 571 of file btRigidBody.h.
References m_turnVelocity.
Referenced by btSequentialImpulseConstraintSolver::resolveSplitPenetrationImpulseCacheFriendly(), btSequentialImpulseConstraintSolver::resolveSplitPenetrationSIMD(), and btSequentialImpulseConstraintSolver::solveGroupCacheFriendlySetup().
SIMD_FORCE_INLINE void btRigidBody::internalGetVelocityInLocalPointObsolete | ( | const btVector3 & | rel_pos, |
btVector3 & | velocity | ||
) | const [inline] |
Definition at line 576 of file btRigidBody.h.
References cross(), getAngularVelocity(), getLinearVelocity(), and m_deltaAngularVelocity.
Referenced by btConeTwistConstraint::solveConstraintObsolete(), and btTranslationalLimitMotor::solveLinearAxis().
void btRigidBody::internalWritebackVelocity | ( | ) | [inline] |
Definition at line 606 of file btRigidBody.h.
References getAngularVelocity(), getLinearVelocity(), m_deltaAngularVelocity, setAngularVelocity(), and setLinearVelocity().
Referenced by btSequentialImpulseConstraintSolver::solveGroupCacheFriendlyFinish().
void btRigidBody::internalWritebackVelocity | ( | btScalar | timeStep | ) |
Definition at line 319 of file btRigidBody.cpp.
References getAngularVelocity(), getLinearVelocity(), btTransformUtil::integrateTransform(), m_deltaAngularVelocity, m_pushVelocity, m_turnVelocity, setAngularVelocity(), and setLinearVelocity().
bool btRigidBody::isInWorld | ( | ) | const [inline] |
Definition at line 492 of file btRigidBody.h.
References getBroadphaseProxy().
void btRigidBody::predictIntegratedTransform | ( | btScalar | step, |
btTransform & | predictedTransform | ||
) |
continuous collision detection needs prediction
Definition at line 103 of file btRigidBody.cpp.
References btTransformUtil::integrateTransform().
Referenced by btSimpleDynamicsWorld::integrateTransforms(), btDiscreteDynamicsWorld::integrateTransforms(), btSimpleDynamicsWorld::predictUnconstraintMotion(), and btDiscreteDynamicsWorld::predictUnconstraintMotion().
void btRigidBody::proceedToTransform | ( | const btTransform & | newTrans | ) |
Definition at line 224 of file btRigidBody.cpp.
References setCenterOfMassTransform().
Referenced by btSimpleDynamicsWorld::integrateTransforms(), and btDiscreteDynamicsWorld::integrateTransforms().
void btRigidBody::removeConstraintRef | ( | btTypedConstraint * | c | ) |
Definition at line 350 of file btRigidBody.cpp.
References btAlignedObjectArray< T >::remove(), and btAlignedObjectArray< T >::size().
Referenced by CcdPhysicsEnvironment::removeCcdPhysicsController(), and btDiscreteDynamicsWorld::removeConstraint().
void btRigidBody::saveKinematicState | ( | btScalar | step | ) |
Definition at line 108 of file btRigidBody.cpp.
References btTransformUtil::calculateVelocity(), getMotionState(), and btMotionState::getWorldTransform().
Referenced by btDiscreteDynamicsWorld::saveKinematicState().
const char * btRigidBody::serialize | ( | void * | dataBuffer, |
class btSerializer * | serializer | ||
) | const [virtual] |
fills the dataBuffer and returns the struct name (and 0 on failure)
Definition at line 363 of file btRigidBody.cpp.
References btRigidBodyData, btRigidBodyDataName, m_angularFactor, and btMatrix3x3::serialize().
Referenced by ATTRIBUTE_ALIGNED16(), and serializeSingleObject().
void btRigidBody::serializeSingleObject | ( | class btSerializer * | serializer | ) | const [virtual] |
Definition at line 395 of file btRigidBody.cpp.
References btSerializer::allocate(), BT_RIGIDBODY_CODE, calculateSerializeBufferSize(), btSerializer::finalizeChunk(), btChunk::m_oldPtr, and serialize().
void btRigidBody::setAngularFactor | ( | btScalar | angFac | ) | [inline] |
Definition at line 482 of file btRigidBody.h.
References m_angularFactor.
void btRigidBody::setAngularFactor | ( | const btVector3 & | angFac | ) | [inline] |
Definition at line 477 of file btRigidBody.h.
References m_angularFactor.
Referenced by CcdPhysicsController::ApplyTorque(), CcdPhysicsController::CreateRigidbody(), and CcdPhysicsController::PostProcessReplica().
void btRigidBody::setAngularVelocity | ( | const btVector3 & | ang_vel | ) | [inline] |
Definition at line 361 of file btRigidBody.h.
Referenced by ATTRIBUTE_ALIGNED64(), internalWritebackVelocity(), CcdPhysicsEnvironment::processFhSprings(), CcdPhysicsController::SetAngularVelocity(), and btDiscreteDynamicsWorld::updateActivationState().
void btRigidBody::setCenterOfMassTransform | ( | const btTransform & | xform | ) |
Definition at line 286 of file btRigidBody.cpp.
References getAngularVelocity(), getLinearVelocity(), and updateInertiaTensor().
Referenced by proceedToTransform(), and CcdPhysicsController::SetCenterOfMassTransform().
Definition at line 148 of file btRigidBody.cpp.
References btClamped().
Referenced by CcdPhysicsController::CreateRigidbody(), and setupRigidBody().
void btRigidBody::setFlags | ( | int | flags | ) | [inline] |
Definition at line 512 of file btRigidBody.h.
void btRigidBody::setGravity | ( | const btVector3 & | acceleration | ) |
Definition at line 134 of file btRigidBody.cpp.
Referenced by CcdPhysicsEnvironment::addCcdPhysicsController(), btSimpleDynamicsWorld::addRigidBody(), btDiscreteDynamicsWorld::addRigidBody(), CcdPhysicsController::CreateRigidbody(), btSimpleDynamicsWorld::setGravity(), and btDiscreteDynamicsWorld::setGravity().
void btRigidBody::setInvInertiaDiagLocal | ( | const btVector3 & | diagInvInertia | ) | [inline] |
Definition at line 288 of file btRigidBody.h.
Referenced by CcdPhysicsController::setRigidBody().
void btRigidBody::setLinearFactor | ( | const btVector3 & | linearFactor | ) | [inline] |
Definition at line 254 of file btRigidBody.h.
References m_invMass.
Referenced by CcdPhysicsController::PostProcessReplica().
void btRigidBody::setLinearVelocity | ( | const btVector3 & | lin_vel | ) | [inline] |
Definition at line 356 of file btRigidBody.h.
Referenced by ATTRIBUTE_ALIGNED64(), internalWritebackVelocity(), CcdPhysicsEnvironment::processFhSprings(), CcdPhysicsController::SetLinearVelocity(), CcdPhysicsController::SynchronizeMotionStates(), and btDiscreteDynamicsWorld::updateActivationState().
void btRigidBody::setMassProps | ( | btScalar | mass, |
const btVector3 & | inertia | ||
) |
Definition at line 230 of file btRigidBody.cpp.
References m_invMass.
Referenced by btActionInterface::getFixedBody(), btTypedConstraint::getFixedBody(), btSequentialImpulseConstraintSolver::getFixedBody(), CcdPhysicsController::PostProcessReplica(), CcdPhysicsController::setScaling(), setupRigidBody(), and CcdPhysicsEnvironment::updateCcdPhysicsController().
void btRigidBody::setMotionState | ( | btMotionState * | motionState | ) | [inline] |
Definition at line 466 of file btRigidBody.h.
References btMotionState::getWorldTransform().
void btRigidBody::setNewBroadphaseProxy | ( | btBroadphaseProxy * | broadphaseProxy | ) | [inline] |
Definition at line 452 of file btRigidBody.h.
Definition at line 293 of file btRigidBody.h.
void btRigidBody::setupRigidBody | ( | const btRigidBodyConstructionInfo & | constructionInfo | ) | [protected] |
setupRigidBody is only used internally by the constructor
Definition at line 41 of file btRigidBody.cpp.
References btMotionState::getWorldTransform(), btRigidBody::btRigidBodyConstructionInfo::m_additionalAngularDampingFactor, btRigidBody::btRigidBodyConstructionInfo::m_additionalAngularDampingThresholdSqr, btRigidBody::btRigidBodyConstructionInfo::m_additionalDamping, btRigidBody::btRigidBodyConstructionInfo::m_additionalDampingFactor, btRigidBody::btRigidBodyConstructionInfo::m_additionalLinearDampingThresholdSqr, btRigidBody::btRigidBodyConstructionInfo::m_angularDamping, m_angularFactor, btRigidBody::btRigidBodyConstructionInfo::m_angularSleepingThreshold, btRigidBody::btRigidBodyConstructionInfo::m_collisionShape, m_contactSolverType, m_deltaAngularVelocity, btRigidBody::btRigidBodyConstructionInfo::m_friction, m_frictionSolverType, m_invMass, btRigidBody::btRigidBodyConstructionInfo::m_linearDamping, btRigidBody::btRigidBodyConstructionInfo::m_linearSleepingThreshold, btRigidBody::btRigidBodyConstructionInfo::m_localInertia, btRigidBody::btRigidBodyConstructionInfo::m_mass, btRigidBody::btRigidBodyConstructionInfo::m_motionState, m_pushVelocity, btRigidBody::btRigidBodyConstructionInfo::m_restitution, btRigidBody::btRigidBodyConstructionInfo::m_startWorldTransform, m_turnVelocity, setDamping(), setMassProps(), uniqueId, and updateInertiaTensor().
Referenced by btRigidBody().
void btRigidBody::translate | ( | const btVector3 & | v | ) | [inline] |
Definition at line 375 of file btRigidBody.h.
static const btRigidBody* btRigidBody::upcast | ( | const btCollisionObject * | colObj | ) | [inline, static] |
to keep collision detection and dynamics separate we don't store a rigidbody pointer but a rigidbody is derived from btCollisionObject, so we can safely perform an upcast
Definition at line 189 of file btRigidBody.h.
Referenced by btDefaultVehicleRaycaster::castRay(), checkCollideWithOverride(), btSimpleDynamicsWorld::clearForces(), CcdPhysicsController::GetRigidBody(), btSimpleDynamicsWorld::integrateTransforms(), btSimpleDynamicsWorld::predictUnconstraintMotion(), btSimpleDynamicsWorld::removeCollisionObject(), btDiscreteDynamicsWorld::removeCollisionObject(), btDiscreteDynamicsWorld::saveKinematicState(), btSimpleDynamicsWorld::setGravity(), btDiscreteDynamicsWorld::synchronizeMotionStates(), btSimpleDynamicsWorld::synchronizeMotionStates(), and btSimpleDynamicsWorld::updateAabbs().
static btRigidBody* btRigidBody::upcast | ( | btCollisionObject * | colObj | ) | [inline, static] |
Definition at line 195 of file btRigidBody.h.
SIMD_FORCE_INLINE void btRigidBody::updateDeactivation | ( | btScalar | timeStep | ) | [inline] |
Definition at line 405 of file btRigidBody.h.
References DISABLE_DEACTIVATION, getAngularVelocity(), getLinearVelocity(), and ISLAND_SLEEPING.
Referenced by btDiscreteDynamicsWorld::updateActivationState(), and CcdPhysicsController::UpdateDeactivation().
void btRigidBody::updateInertiaTensor | ( | ) |
Definition at line 254 of file btRigidBody.cpp.
References btMatrix3x3::scaled(), and btMatrix3x3::transpose().
Referenced by setCenterOfMassTransform(), CcdPhysicsController::SetCenterOfMassTransform(), CcdPhysicsController::setRigidBody(), and setupRigidBody().
SIMD_FORCE_INLINE bool btRigidBody::wantsSleeping | ( | ) | [inline] |
Definition at line 422 of file btRigidBody.h.
References DISABLE_DEACTIVATION, gDeactivationTime, gDisableDeactivation, ISLAND_SLEEPING, and WANTS_DEACTIVATION.
Referenced by btDiscreteDynamicsWorld::updateActivationState(), and CcdPhysicsController::wantsSleeping().
btVector3 btRigidBody::m_angularFactor [protected] |
Definition at line 98 of file btRigidBody.h.
Referenced by applyImpulse(), applyTorque(), applyTorqueImpulse(), getAngularFactor(), internalApplyImpulse(), internalApplyPushImpulse(), internalGetAngularFactor(), serialize(), setAngularFactor(), and setupRigidBody().
Definition at line 474 of file btRigidBody.h.
Referenced by setupRigidBody().
btVector3 btRigidBody::m_deltaAngularVelocity [protected] |
Definition at line 97 of file btRigidBody.h.
Referenced by getDeltaAngularVelocity(), internalApplyImpulse(), internalGetAngularVelocity(), internalGetDeltaAngularVelocity(), internalGetVelocityInLocalPointObsolete(), internalWritebackVelocity(), and setupRigidBody().
Definition at line 475 of file btRigidBody.h.
Referenced by setupRigidBody().
btVector3 btRigidBody::m_invMass [protected] |
Definition at line 99 of file btRigidBody.h.
Referenced by internalGetInvMass(), setLinearFactor(), setMassProps(), and setupRigidBody().
btVector3 btRigidBody::m_pushVelocity [protected] |
Definition at line 100 of file btRigidBody.h.
Referenced by getPushVelocity(), internalApplyPushImpulse(), internalGetPushVelocity(), internalWritebackVelocity(), and setupRigidBody().
btVector3 btRigidBody::m_turnVelocity [protected] |
Definition at line 101 of file btRigidBody.h.
Referenced by getTurnVelocity(), internalApplyPushImpulse(), internalGetTurnVelocity(), internalWritebackVelocity(), and setupRigidBody().