Blender V2.61 - r43446
|
CcdPhysicsController is a physics object that supports continuous collision detection and time of impact based physics resolution. More...
#include <CcdPhysicsController.h>
Public Member Functions | |
CcdPhysicsController (const CcdConstructionInfo &ci) | |
bool | DeleteControllerShape () |
bool | ReplaceControllerShape (btCollisionShape *newShape) |
virtual | ~CcdPhysicsController () |
CcdConstructionInfo & | getConstructionInfo () |
const CcdConstructionInfo & | getConstructionInfo () const |
btRigidBody * | GetRigidBody () |
btCollisionObject * | GetCollisionObject () |
btSoftBody * | GetSoftBody () |
CcdShapeConstructionInfo * | GetShapeInfo () |
btCollisionShape * | GetCollisionShape () |
virtual bool | SynchronizeMotionStates (float time) |
virtual void | WriteMotionStateToDynamics (bool nondynaonly) |
virtual void | WriteDynamicsToMotionState () |
virtual void | PostProcessReplica (class PHY_IMotionState *motionstate, class PHY_IPhysicsController *parentctrl) |
virtual void | SetPhysicsEnvironment (class PHY_IPhysicsEnvironment *env) |
virtual void | RelativeTranslate (float dlocX, float dlocY, float dlocZ, bool local) |
virtual void | RelativeRotate (const float drot[9], bool local) |
virtual void | getOrientation (float &quatImag0, float &quatImag1, float &quatImag2, float &quatReal) |
virtual void | setOrientation (float quatImag0, float quatImag1, float quatImag2, float quatReal) |
virtual void | setPosition (float posX, float posY, float posZ) |
virtual void | getPosition (PHY__Vector3 &pos) const |
virtual void | setScaling (float scaleX, float scaleY, float scaleZ) |
virtual void | ApplyTorque (float torqueX, float torqueY, float torqueZ, bool local) |
virtual void | ApplyForce (float forceX, float forceY, float forceZ, bool local) |
virtual void | SetAngularVelocity (float ang_velX, float ang_velY, float ang_velZ, bool local) |
virtual void | SetLinearVelocity (float lin_velX, float lin_velY, float lin_velZ, bool local) |
virtual void | applyImpulse (float attachX, float attachY, float attachZ, float impulseX, float impulseY, float impulseZ) |
virtual void | SetActive (bool active) |
virtual void | GetLinearVelocity (float &linvX, float &linvY, float &linvZ) |
virtual void | GetAngularVelocity (float &angVelX, float &angVelY, float &angVelZ) |
virtual void | GetVelocity (const float posX, const float posY, const float posZ, float &linvX, float &linvY, float &linvZ) |
virtual void | getReactionForce (float &forceX, float &forceY, float &forceZ) |
virtual void | setRigidBody (bool rigid) |
virtual void | resolveCombinedVelocities (float linvelX, float linvelY, float linvelZ, float angVelX, float angVelY, float angVelZ) |
virtual void * | getNewClientInfo () |
virtual void | setNewClientInfo (void *clientinfo) |
virtual PHY_IPhysicsController * | GetReplica () |
short int | GetCollisionFilterGroup () const |
There should be no 'SetCollisionFilterGroup' method, as changing this during run-time is will result in errors. | |
short int | GetCollisionFilterMask () const |
There should be no 'SetCollisionFilterGroup' method, as changing this during run-time is will result in errors. | |
virtual void | calcXform () |
virtual void | SetMargin (float margin) |
virtual float | GetMargin () const |
virtual float | GetRadius () const |
virtual void | SetRadius (float margin) |
virtual void | SetLinVelocityMin (float val) |
virtual float | GetLinVelocityMin () const |
virtual void | SetLinVelocityMax (float val) |
virtual float | GetLinVelocityMax () const |
bool | wantsSleeping () |
void | UpdateDeactivation (float timeStep) |
void | SetCenterOfMassTransform (btTransform &xform) |
void | setAabb (const btVector3 &aabbMin, const btVector3 &aabbMax) |
class PHY_IMotionState * | GetMotionState () |
class PHY_IMotionState * | GetMotionState () const |
class CcdPhysicsEnvironment * | GetPhysicsEnvironment () |
void | setParentCtrl (CcdPhysicsController *parentCtrl) |
CcdPhysicsController * | getParentCtrl () |
const CcdPhysicsController * | getParentCtrl () const |
virtual const char * | getName () |
Static Public Member Functions | |
static btTransform & | GetTransformFromMotionState (PHY_IMotionState *motionState) |
Public Attributes | |
int | m_collisionDelay |
Protected Member Functions | |
void | GetWorldOrientation (btMatrix3x3 &mat) |
void | CreateRigidbody () |
bool | CreateSoftbody () |
bool | Register () |
bool | Unregister () |
void | setWorldOrientation (const btMatrix3x3 &mat) |
void | forceWorldTransform (const btMatrix3x3 &mat, const btVector3 &pos) |
Protected Attributes | |
btCollisionObject * | m_object |
class PHY_IMotionState * | m_MotionState |
btMotionState * | m_bulletMotionState |
class btCollisionShape * | m_collisionShape |
class CcdShapeConstructionInfo * | m_shapeInfo |
bool | m_softbodyMappingDone |
bool | m_softBodyTransformInitialized |
bool | m_prototypeTransformInitialized |
btTransform | m_softbodyStartTrans |
void * | m_newClientInfo |
int | m_registerCount |
CcdConstructionInfo | m_cci |
CcdPhysicsController * | m_parentCtrl |
Friends | |
class | CcdPhysicsEnvironment |
CcdPhysicsController is a physics object that supports continuous collision detection and time of impact based physics resolution.
Definition at line 390 of file CcdPhysicsController.h.
CcdPhysicsController::CcdPhysicsController | ( | const CcdConstructionInfo & | ci | ) |
???
Definition at line 68 of file CcdPhysicsController.cpp.
References CcdShapeConstructionInfo::AddRef(), btCollisionShape::calculateLocalInertia(), CreateRigidbody(), m_bulletMotionState, m_cci, m_collisionDelay, CcdConstructionInfo::m_collisionShape, m_collisionShape, CcdConstructionInfo::m_localInertiaTensor, CcdConstructionInfo::m_mass, CcdConstructionInfo::m_MotionState, m_MotionState, m_newClientInfo, m_parentCtrl, m_prototypeTransformInitialized, m_registerCount, CcdConstructionInfo::m_scaling, m_shapeInfo, CcdConstructionInfo::m_shapeInfo, m_softbodyMappingDone, m_softBodyTransformInitialized, and btCollisionShape::setLocalScaling().
Referenced by GetReplica().
CcdPhysicsController::~CcdPhysicsController | ( | ) | [virtual] |
Definition at line 561 of file CcdPhysicsController.cpp.
References DeleteControllerShape(), m_bulletMotionState, m_cci, m_MotionState, m_object, CcdConstructionInfo::m_physicsEnv, m_shapeInfo, CcdShapeConstructionInfo::Release(), and CcdPhysicsEnvironment::removeCcdPhysicsController().
void CcdPhysicsController::ApplyForce | ( | float | forceX, |
float | forceY, | ||
float | forceZ, | ||
bool | local | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 1057 of file CcdPhysicsController.cpp.
References btSoftBody::addForce(), btRigidBody::applyCentralForce(), btTransform::getBasis(), GetRigidBody(), GetSoftBody(), CcdConstructionInfo::m_bSensor, m_cci, btSoftBody::m_nodes, m_object, SIMD_EPSILON, and btAlignedObjectArray< T >::size().
void CcdPhysicsController::applyImpulse | ( | float | attachX, |
float | attachY, | ||
float | attachZ, | ||
float | impulseX, | ||
float | impulseY, | ||
float | impulseZ | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 1148 of file CcdPhysicsController.cpp.
References btRigidBody::applyImpulse(), GetRigidBody(), CcdConstructionInfo::m_bSensor, m_cci, m_object, and SIMD_EPSILON.
void CcdPhysicsController::ApplyTorque | ( | float | torqueX, |
float | torqueY, | ||
float | torqueZ, | ||
bool | local | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 1017 of file CcdPhysicsController.cpp.
References btRigidBody::applyTorque(), btRigidBody::getAngularFactor(), btTransform::getBasis(), GetRigidBody(), CcdConstructionInfo::m_bRigid, CcdConstructionInfo::m_bSensor, m_cci, m_object, btRigidBody::setAngularFactor(), and SIMD_EPSILON.
virtual void CcdPhysicsController::calcXform | ( | ) | [inline, virtual] |
Implements PHY_IPhysicsController.
Definition at line 528 of file CcdPhysicsController.h.
void CcdPhysicsController::CreateRigidbody | ( | ) | [protected] |
either create a btCollisionObject, btRigidBody or btSoftBody
Definition at line 419 of file CcdPhysicsController.cpp.
References CreateSoftbody(), DISABLE_DEACTIVATION, GetCollisionObject(), GetRigidBody(), CcdConstructionInfo::m_angularDamping, btRigidBody::btRigidBodyConstructionInfo::m_angularDamping, CcdConstructionInfo::m_anisotropicFriction, CcdConstructionInfo::m_bRigid, CcdConstructionInfo::m_bSensor, m_bulletMotionState, m_cci, CcdConstructionInfo::m_collisionFlags, m_collisionShape, CcdConstructionInfo::m_contactProcessingThreshold, CcdConstructionInfo::m_do_anisotropic, CcdConstructionInfo::m_friction, btRigidBody::btRigidBodyConstructionInfo::m_friction, CcdConstructionInfo::m_gravity, CcdConstructionInfo::m_inertiaFactor, CcdConstructionInfo::m_linearDamping, btRigidBody::btRigidBodyConstructionInfo::m_linearDamping, CcdConstructionInfo::m_localInertiaTensor, CcdConstructionInfo::m_mass, m_MotionState, m_object, btRigidBody::btRigidBodyConstructionInfo::m_restitution, CcdConstructionInfo::m_restitution, btRigidBody::setAngularFactor(), btRigidBody::setDamping(), and btRigidBody::setGravity().
Referenced by CcdPhysicsController(), and PostProcessReplica().
bool CcdPhysicsController::CreateSoftbody | ( | ) | [protected] |
only deal with meshes that have 1 sub part/component, for now
only deal with meshes that have 1 sub part/component, for now
create a mapping between graphics mesh vertices and soft body vertices
Definition at line 171 of file CcdPhysicsController.cpp.
References btSoftBody::appendFace(), btSoftBody::appendLink(), CONVEX_HULL_SHAPE_PROXYTYPE, HullLibrary::CreateConvexHull(), CcdPhysicsEnvironment::getDynamicsWorld(), btCollisionShape::getShapeType(), btSoftRigidDynamicsWorld::getWorldInfo(), i, CcdConstructionInfo::m_angularDamping, btRigidBody::btRigidBodyConstructionInfo::m_angularDamping, CcdConstructionInfo::m_bSoft, m_bulletMotionState, m_cci, CcdConstructionInfo::m_collisionShape, m_collisionShape, CcdConstructionInfo::m_friction, btRigidBody::btRigidBodyConstructionInfo::m_friction, HullResult::m_Indices, CcdConstructionInfo::m_inertiaFactor, CcdConstructionInfo::m_linearDamping, btRigidBody::btRigidBodyConstructionInfo::m_linearDamping, CcdConstructionInfo::m_localInertiaTensor, CcdConstructionInfo::m_mass, HullResult::m_OutputVertices, CcdConstructionInfo::m_physicsEnv, btRigidBody::btRigidBodyConstructionInfo::m_restitution, CcdConstructionInfo::m_restitution, HullDesc::mMaxVertices, HullResult::mNumFaces, HullResult::mNumOutputVertices, p, QF_TRIANGLES, HullLibrary::ReleaseResult(), SCALED_TRIANGLE_MESH_SHAPE_PROXYTYPE, and TRIANGLE_MESH_SHAPE_PROXYTYPE.
Referenced by CreateRigidbody(), and ReplaceControllerShape().
bool CcdPhysicsController::DeleteControllerShape | ( | ) |
Definition at line 490 of file CcdPhysicsController.cpp.
References DeleteBulletShape(), btCollisionShape::isCompound(), and m_collisionShape.
Referenced by ~CcdPhysicsController().
void CcdPhysicsController::forceWorldTransform | ( | const btMatrix3x3 & | mat, |
const btVector3 & | pos | ||
) | [protected] |
Definition at line 968 of file CcdPhysicsController.cpp.
References m_object, btTransform::setBasis(), and btTransform::setOrigin().
void CcdPhysicsController::GetAngularVelocity | ( | float & | angVelX, |
float & | angVelY, | ||
float & | angVelZ | ||
) | [virtual] |
Definition at line 1192 of file CcdPhysicsController.cpp.
References btRigidBody::getAngularVelocity(), and GetRigidBody().
short int CcdPhysicsController::GetCollisionFilterGroup | ( | ) | const [inline] |
There should be no 'SetCollisionFilterGroup' method, as changing this during run-time is will result in errors.
Definition at line 518 of file CcdPhysicsController.h.
References m_cci, and CcdConstructionInfo::m_collisionFilterGroup.
Referenced by CcdPhysicsEnvironment::addCcdPhysicsController(), and CcdPhysicsEnvironment::enableCcdPhysicsController().
short int CcdPhysicsController::GetCollisionFilterMask | ( | ) | const [inline] |
There should be no 'SetCollisionFilterGroup' method, as changing this during run-time is will result in errors.
Definition at line 523 of file CcdPhysicsController.h.
References m_cci, and CcdConstructionInfo::m_collisionFilterMask.
Referenced by CcdPhysicsEnvironment::addCcdPhysicsController(), and CcdPhysicsEnvironment::enableCcdPhysicsController().
btCollisionObject * CcdPhysicsController::GetCollisionObject | ( | ) |
Definition at line 159 of file CcdPhysicsController.cpp.
References m_object.
Referenced by CcdPhysicsEnvironment::addCcdPhysicsController(), CcdPhysicsEnvironment::createConstraint(), CreateRigidbody(), CcdPhysicsEnvironment::disableCcdPhysicsController(), CcdPhysicsEnvironment::enableCcdPhysicsController(), CcdPhysicsEnvironment::rayTest(), CcdPhysicsEnvironment::refreshCcdPhysicsController(), CcdPhysicsEnvironment::removeCcdPhysicsController(), and CcdPhysicsEnvironment::updateCcdPhysicsController().
btCollisionShape* CcdPhysicsController::GetCollisionShape | ( | ) | [inline] |
Definition at line 459 of file CcdPhysicsController.h.
References m_object.
Referenced by SynchronizeMotionStates().
CcdConstructionInfo& CcdPhysicsController::getConstructionInfo | ( | ) | [inline] |
Definition at line 443 of file CcdPhysicsController.h.
References m_cci.
Referenced by CcdPhysicsEnvironment::processFhSprings().
const CcdConstructionInfo& CcdPhysicsController::getConstructionInfo | ( | ) | const [inline] |
Definition at line 447 of file CcdPhysicsController.h.
References m_cci.
void CcdPhysicsController::GetLinearVelocity | ( | float & | linvX, |
float & | linvY, | ||
float & | linvZ | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 1174 of file CcdPhysicsController.cpp.
References btRigidBody::getLinearVelocity(), and GetRigidBody().
virtual float CcdPhysicsController::GetLinVelocityMax | ( | ) | const [inline, virtual] |
Implements PHY_IPhysicsController.
Definition at line 566 of file CcdPhysicsController.h.
References m_cci, and CcdConstructionInfo::m_clamp_vel_max.
virtual float CcdPhysicsController::GetLinVelocityMin | ( | ) | const [inline, virtual] |
Implements PHY_IPhysicsController.
Definition at line 558 of file CcdPhysicsController.h.
References m_cci, and CcdConstructionInfo::m_clamp_vel_min.
virtual float CcdPhysicsController::GetMargin | ( | ) | const [inline, virtual] |
Implements PHY_IPhysicsController.
Definition at line 534 of file CcdPhysicsController.h.
References btCollisionShape::getMargin(), and m_collisionShape.
class PHY_IMotionState* CcdPhysicsController::GetMotionState | ( | ) | [inline, virtual] |
Implements PHY_IPhysicsController.
Definition at line 582 of file CcdPhysicsController.h.
References m_MotionState.
Referenced by CcdPhysicsEnvironment::enableCcdPhysicsController().
class PHY_IMotionState* CcdPhysicsController::GetMotionState | ( | ) | const [inline] |
Definition at line 587 of file CcdPhysicsController.h.
References m_MotionState.
virtual const char* CcdPhysicsController::getName | ( | ) | [inline, virtual] |
Reimplemented in KX_BulletPhysicsController.
Definition at line 612 of file CcdPhysicsController.h.
Referenced by CcdPhysicsEnvironment::exportFile().
void * CcdPhysicsController::getNewClientInfo | ( | ) | [virtual] |
Implements PHY_IController.
Definition at line 1248 of file CcdPhysicsController.cpp.
References m_newClientInfo.
void CcdPhysicsController::getOrientation | ( | float & | quatImag0, |
float & | quatImag1, | ||
float & | quatImag2, | ||
float & | quatReal | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 881 of file CcdPhysicsController.cpp.
References m_object.
const CcdPhysicsController* CcdPhysicsController::getParentCtrl | ( | ) | const [inline] |
Definition at line 607 of file CcdPhysicsController.h.
References m_parentCtrl.
CcdPhysicsController* CcdPhysicsController::getParentCtrl | ( | ) | [inline] |
Definition at line 602 of file CcdPhysicsController.h.
References m_parentCtrl.
Referenced by CcdPhysicsEnvironment::processFhSprings().
class CcdPhysicsEnvironment* CcdPhysicsController::GetPhysicsEnvironment | ( | ) | [inline] |
Definition at line 592 of file CcdPhysicsController.h.
References m_cci, and CcdConstructionInfo::m_physicsEnv.
Referenced by ReplaceControllerShape().
void CcdPhysicsController::getPosition | ( | PHY__Vector3 & | pos | ) | const [virtual] |
Implements PHY_IPhysicsController.
Definition at line 983 of file CcdPhysicsController.cpp.
References btTransform::getOrigin(), and m_object.
virtual float CcdPhysicsController::GetRadius | ( | ) | const [inline, virtual] |
Implements PHY_IPhysicsController.
Definition at line 538 of file CcdPhysicsController.h.
References m_cci, and CcdConstructionInfo::m_radius.
void CcdPhysicsController::getReactionForce | ( | float & | forceX, |
float & | forceY, | ||
float & | forceZ | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 1226 of file CcdPhysicsController.cpp.
PHY_IPhysicsController * CcdPhysicsController::GetReplica | ( | void | ) | [virtual] |
Reimplemented from PHY_IPhysicsController.
Definition at line 1278 of file CcdPhysicsController.cpp.
References CcdPhysicsController(), CONE_SHAPE_PROXYTYPE, CcdShapeConstructionInfo::CreateBulletShape(), btCollisionShape::getShapeType(), CcdConstructionInfo::m_bGimpact, CcdConstructionInfo::m_bSoft, m_cci, CcdConstructionInfo::m_collisionShape, m_collisionShape, CcdConstructionInfo::m_margin, CcdConstructionInfo::m_MotionState, m_shapeInfo, CcdConstructionInfo::m_shapeInfo, and SPHERE_SHAPE_PROXYTYPE.
btRigidBody * CcdPhysicsController::GetRigidBody | ( | ) |
Definition at line 155 of file CcdPhysicsController.cpp.
References m_object, and btRigidBody::upcast().
Referenced by CcdPhysicsEnvironment::addCcdPhysicsController(), ApplyForce(), applyImpulse(), ApplyTorque(), CcdPhysicsEnvironment::createConstraint(), CreateRigidbody(), CcdPhysicsEnvironment::createUniversalD6Constraint(), CcdPhysicsEnvironment::disableCcdPhysicsController(), GetAngularVelocity(), GetLinearVelocity(), GetVelocity(), PostProcessReplica(), CcdPhysicsEnvironment::processFhSprings(), CcdPhysicsEnvironment::removeCcdPhysicsController(), SetAngularVelocity(), SetCenterOfMassTransform(), SetLinearVelocity(), setRigidBody(), setScaling(), SynchronizeMotionStates(), CcdPhysicsEnvironment::updateCcdPhysicsController(), UpdateDeactivation(), and wantsSleeping().
CcdShapeConstructionInfo* CcdPhysicsController::GetShapeInfo | ( | ) | [inline] |
Definition at line 457 of file CcdPhysicsController.h.
References m_shapeInfo.
btSoftBody * CcdPhysicsController::GetSoftBody | ( | ) |
Definition at line 163 of file CcdPhysicsController.cpp.
References m_object, and btSoftBody::upcast().
Referenced by CcdPhysicsEnvironment::addCcdPhysicsController(), ApplyForce(), CcdPhysicsEnvironment::createConstraint(), CcdPhysicsEnvironment::disableCcdPhysicsController(), CcdPhysicsEnvironment::removeCcdPhysicsController(), ReplaceControllerShape(), SetCenterOfMassTransform(), SetLinearVelocity(), setWorldOrientation(), and SynchronizeMotionStates().
btTransform & CcdPhysicsController::GetTransformFromMotionState | ( | PHY_IMotionState * | motionState | ) | [static] |
Definition at line 104 of file CcdPhysicsController.cpp.
References btTransform::getBasis(), PHY_IMotionState::getWorldOrientation(), PHY_IMotionState::getWorldPosition(), btMatrix3x3::setFromOpenGLSubMatrix(), and btTransform::setOrigin().
Referenced by CcdPhysicsEnvironment::enableCcdPhysicsController(), and WriteMotionStateToDynamics().
void CcdPhysicsController::GetVelocity | ( | const float | posX, |
const float | posY, | ||
const float | posZ, | ||
float & | linvX, | ||
float & | linvY, | ||
float & | linvZ | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 1209 of file CcdPhysicsController.cpp.
References GetRigidBody(), and btRigidBody::getVelocityInLocalPoint().
void CcdPhysicsController::GetWorldOrientation | ( | btMatrix3x3 & | mat | ) | [protected] |
Definition at line 874 of file CcdPhysicsController.cpp.
References PHY_IMotionState::getWorldOrientation(), m_MotionState, and btMatrix3x3::setFromOpenGLSubMatrix().
Referenced by RelativeRotate().
void CcdPhysicsController::PostProcessReplica | ( | class PHY_IMotionState * | motionstate, |
class PHY_IPhysicsController * | parentctrl | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 680 of file CcdPhysicsController.cpp.
References CcdPhysicsEnvironment::addCcdPhysicsController(), CcdShapeConstructionInfo::AddRef(), btCollisionShape::calculateLocalInertia(), CcdShapeConstructionInfo::CreateBulletShape(), CreateRigidbody(), DISABLE_DEACTIVATION, btRigidBody::getAngularFactor(), btRigidBody::getLinearFactor(), GetRigidBody(), CcdConstructionInfo::m_bGimpact, CcdConstructionInfo::m_bSensor, CcdConstructionInfo::m_bSoft, m_cci, m_collisionShape, CcdConstructionInfo::m_inertiaFactor, CcdConstructionInfo::m_localInertiaTensor, CcdConstructionInfo::m_margin, CcdConstructionInfo::m_mass, m_MotionState, m_object, CcdConstructionInfo::m_physicsEnv, m_registerCount, CcdConstructionInfo::m_scaling, m_shapeInfo, m_softBodyTransformInitialized, NULL, btRigidBody::setAngularFactor(), btRigidBody::setLinearFactor(), btCollisionShape::setLocalScaling(), and btRigidBody::setMassProps().
bool CcdPhysicsController::Register | ( | ) | [inline, protected] |
Definition at line 421 of file CcdPhysicsController.h.
References m_registerCount.
Referenced by CcdPhysicsEnvironment::requestCollisionCallback().
void CcdPhysicsController::RelativeRotate | ( | const float | drot[9], |
bool | local | ||
) | [virtual] |
Definition at line 843 of file CcdPhysicsController.cpp.
References btTransform::getBasis(), GetWorldOrientation(), btMatrix3x3::inverse(), CcdConstructionInfo::m_bSensor, m_cci, m_object, btTransform::setBasis(), and SetCenterOfMassTransform().
void CcdPhysicsController::RelativeTranslate | ( | float | dlocX, |
float | dlocY, | ||
float | dlocZ, | ||
bool | local | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 814 of file CcdPhysicsController.cpp.
References btTransform::getBasis(), btTransform::getOrigin(), CcdConstructionInfo::m_bSensor, m_cci, m_object, SetCenterOfMassTransform(), and btTransform::setOrigin().
bool CcdPhysicsController::ReplaceControllerShape | ( | btCollisionShape * | newShape | ) |
Definition at line 514 of file CcdPhysicsController.cpp.
References CcdPhysicsEnvironment::addCcdPhysicsController(), assert, btOverlappingPairCache::cleanProxyFromPairs(), CreateSoftbody(), btCollisionWorld::getCollisionObjectArray(), btCollisionWorld::getDispatcher(), CcdPhysicsEnvironment::getDynamicsWorld(), btCollisionWorld::getPairCache(), GetPhysicsEnvironment(), GetSoftBody(), i, m_cci, CcdConstructionInfo::m_collisionShape, m_collisionShape, m_object, CcdConstructionInfo::m_physicsEnv, m_prototypeTransformInitialized, m_softbodyMappingDone, m_softBodyTransformInitialized, NULL, CcdPhysicsEnvironment::removeCcdPhysicsController(), and btAlignedObjectArray< T >::size().
void CcdPhysicsController::resolveCombinedVelocities | ( | float | linvelX, |
float | linvelY, | ||
float | linvelZ, | ||
float | angVelX, | ||
float | angVelY, | ||
float | angVelZ | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Reimplemented in KX_BulletPhysicsController.
Definition at line 979 of file CcdPhysicsController.cpp.
void CcdPhysicsController::setAabb | ( | const btVector3 & | aabbMin, |
const btVector3 & | aabbMax | ||
) |
void CcdPhysicsController::SetActive | ( | bool | active | ) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 1170 of file CcdPhysicsController.cpp.
void CcdPhysicsController::SetAngularVelocity | ( | float | ang_velX, |
float | ang_velY, | ||
float | ang_velZ, | ||
bool | local | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 1090 of file CcdPhysicsController.cpp.
References btTransform::getBasis(), GetRigidBody(), CcdConstructionInfo::m_bSensor, m_cci, m_object, btRigidBody::setAngularVelocity(), and SIMD_EPSILON.
void CcdPhysicsController::SetCenterOfMassTransform | ( | btTransform & | xform | ) |
Definition at line 780 of file CcdPhysicsController.cpp.
References btRigidBody::getAngularVelocity(), btRigidBody::getLinearVelocity(), GetRigidBody(), GetSoftBody(), m_object, btRigidBody::setCenterOfMassTransform(), and btRigidBody::updateInertiaTensor().
Referenced by CcdPhysicsEnvironment::enableCcdPhysicsController(), RelativeRotate(), RelativeTranslate(), setOrientation(), setPosition(), setWorldOrientation(), and WriteMotionStateToDynamics().
void CcdPhysicsController::SetLinearVelocity | ( | float | lin_velX, |
float | lin_velY, | ||
float | lin_velZ, | ||
bool | local | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 1113 of file CcdPhysicsController.cpp.
References btTransform::getBasis(), GetRigidBody(), GetSoftBody(), CcdConstructionInfo::m_bSensor, m_cci, m_object, m_softbodyStartTrans, btRigidBody::setLinearVelocity(), and btSoftBody::setVelocity().
virtual void CcdPhysicsController::SetLinVelocityMax | ( | float | val | ) | [inline, virtual] |
Implements PHY_IPhysicsController.
Reimplemented in KX_BulletPhysicsController.
Definition at line 562 of file CcdPhysicsController.h.
References m_cci, CcdConstructionInfo::m_clamp_vel_max, and simple_enum_gen::val.
virtual void CcdPhysicsController::SetLinVelocityMin | ( | float | val | ) | [inline, virtual] |
Implements PHY_IPhysicsController.
Reimplemented in KX_BulletPhysicsController.
Definition at line 554 of file CcdPhysicsController.h.
References m_cci, CcdConstructionInfo::m_clamp_vel_min, and simple_enum_gen::val.
virtual void CcdPhysicsController::SetMargin | ( | float | margin | ) | [inline, virtual] |
Implements PHY_IPhysicsController.
Definition at line 529 of file CcdPhysicsController.h.
References m_collisionShape, and btCollisionShape::setMargin().
void CcdPhysicsController::setNewClientInfo | ( | void * | clientinfo | ) | [virtual] |
Implements PHY_IController.
Definition at line 1252 of file CcdPhysicsController.cpp.
References m_newClientInfo.
void CcdPhysicsController::setOrientation | ( | float | quatImag0, |
float | quatImag1, | ||
float | quatImag2, | ||
float | quatReal | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 889 of file CcdPhysicsController.cpp.
References CcdConstructionInfo::m_bSensor, m_cci, m_object, SetCenterOfMassTransform(), and btTransform::setRotation().
void CcdPhysicsController::setParentCtrl | ( | CcdPhysicsController * | parentCtrl | ) | [inline] |
Definition at line 597 of file CcdPhysicsController.h.
References m_parentCtrl.
void CcdPhysicsController::SetPhysicsEnvironment | ( | class PHY_IPhysicsEnvironment * | env | ) | [virtual] |
Implements PHY_IController.
Definition at line 762 of file CcdPhysicsController.cpp.
References CcdPhysicsEnvironment::addCcdPhysicsController(), m_cci, CcdConstructionInfo::m_physicsEnv, and CcdPhysicsEnvironment::removeCcdPhysicsController().
Referenced by MergeScene_GameObject().
void CcdPhysicsController::setPosition | ( | float | posX, |
float | posY, | ||
float | posZ | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 944 of file CcdPhysicsController.cpp.
References btTransform::getOrigin(), CcdConstructionInfo::m_bSensor, m_cci, m_object, m_softbodyStartTrans, m_softBodyTransformInitialized, SetCenterOfMassTransform(), and btTransform::setOrigin().
virtual void CcdPhysicsController::SetRadius | ( | float | margin | ) | [inline, virtual] |
Implements PHY_IPhysicsController.
Definition at line 543 of file CcdPhysicsController.h.
References btCollisionShape::getShapeType(), m_cci, m_collisionShape, CcdConstructionInfo::m_radius, and SPHERE_SHAPE_PROXYTYPE.
void CcdPhysicsController::setRigidBody | ( | bool | rigid | ) | [virtual] |
Implements PHY_IPhysicsController.
Reimplemented in KX_BulletPhysicsController.
Definition at line 1231 of file CcdPhysicsController.cpp.
References btRigidBody::getInvInertiaDiagLocal(), GetRigidBody(), btRigidBody::setInvInertiaDiagLocal(), and btRigidBody::updateInertiaTensor().
void CcdPhysicsController::setScaling | ( | float | scaleX, |
float | scaleY, | ||
float | scaleZ | ||
) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 991 of file CcdPhysicsController.cpp.
References btFuzzyZero(), btCollisionShape::calculateLocalInertia(), btRigidBody::getCollisionShape(), GetRigidBody(), m_cci, CcdConstructionInfo::m_inertiaFactor, CcdConstructionInfo::m_localInertiaTensor, CcdConstructionInfo::m_mass, m_object, CcdConstructionInfo::m_scaling, and btRigidBody::setMassProps().
void CcdPhysicsController::setWorldOrientation | ( | const btMatrix3x3 & | mat | ) | [protected] |
Definition at line 915 of file CcdPhysicsController.cpp.
References btTransform::getOrigin(), GetSoftBody(), CcdConstructionInfo::m_bSensor, m_cci, m_object, m_softbodyStartTrans, m_softBodyTransformInitialized, btTransform::setBasis(), SetCenterOfMassTransform(), btTransform::setOrigin(), and btSoftBody::transform().
bool CcdPhysicsController::SynchronizeMotionStates | ( | float | time | ) | [virtual] |
SynchronizeMotionStates ynchronizes dynas, kinematic and deformable entities (and do 'late binding')
Implements PHY_IPhysicsController.
Definition at line 585 of file CcdPhysicsController.cpp.
References btFuzzyZero(), PHY_IMotionState::calculateWorldTransformations(), btSoftBody::getAabb(), btTransform::getBasis(), btRigidBody::getCenterOfMassTransform(), GetCollisionShape(), btRigidBody::getLinearVelocity(), btMatrix3x3::getOpenGLSubMatrix(), btTransform::getOrigin(), GetRigidBody(), btMatrix3x3::getRotation(), GetSoftBody(), PHY_IMotionState::getWorldScaling(), len(), m_cci, CcdConstructionInfo::m_clamp_vel_max, CcdConstructionInfo::m_clamp_vel_min, m_MotionState, btSoftBody::m_pose, btRigidBody::setLinearVelocity(), btCollisionShape::setLocalScaling(), PHY_IMotionState::setWorldOrientation(), and PHY_IMotionState::setWorldPosition().
bool CcdPhysicsController::Unregister | ( | ) | [inline, protected] |
Definition at line 424 of file CcdPhysicsController.h.
References m_registerCount.
Referenced by CcdPhysicsEnvironment::removeCollisionCallback().
void CcdPhysicsController::UpdateDeactivation | ( | float | timeStep | ) |
Definition at line 1258 of file CcdPhysicsController.cpp.
References GetRigidBody(), and btRigidBody::updateDeactivation().
bool CcdPhysicsController::wantsSleeping | ( | ) |
Definition at line 1267 of file CcdPhysicsController.cpp.
References GetRigidBody(), and btRigidBody::wantsSleeping().
void CcdPhysicsController::WriteDynamicsToMotionState | ( | ) | [virtual] |
Implements PHY_IPhysicsController.
Definition at line 676 of file CcdPhysicsController.cpp.
void CcdPhysicsController::WriteMotionStateToDynamics | ( | bool | nondynaonly | ) | [virtual] |
WriteMotionStateToDynamics ynchronizes dynas, kinematic and deformable entities (and do 'late binding')
WriteMotionStateToDynamics synchronizes dynas, kinematic and deformable entities (and do 'late binding')
Implements PHY_IPhysicsController.
Definition at line 670 of file CcdPhysicsController.cpp.
References GetTransformFromMotionState(), m_MotionState, and SetCenterOfMassTransform().
friend class CcdPhysicsEnvironment [friend] |
Definition at line 401 of file CcdPhysicsController.h.
btMotionState* CcdPhysicsController::m_bulletMotionState [protected] |
Definition at line 397 of file CcdPhysicsController.h.
Referenced by CcdPhysicsController(), CreateRigidbody(), CreateSoftbody(), and ~CcdPhysicsController().
CcdConstructionInfo CcdPhysicsController::m_cci [protected] |
Definition at line 412 of file CcdPhysicsController.h.
Referenced by ApplyForce(), applyImpulse(), ApplyTorque(), CcdPhysicsController(), CreateRigidbody(), CreateSoftbody(), GetCollisionFilterGroup(), GetCollisionFilterMask(), getConstructionInfo(), GetLinVelocityMax(), GetLinVelocityMin(), GetPhysicsEnvironment(), GetRadius(), GetReplica(), PostProcessReplica(), RelativeRotate(), RelativeTranslate(), ReplaceControllerShape(), SetAngularVelocity(), SetLinearVelocity(), SetLinVelocityMax(), SetLinVelocityMin(), setOrientation(), SetPhysicsEnvironment(), setPosition(), SetRadius(), setScaling(), setWorldOrientation(), SynchronizeMotionStates(), CcdPhysicsEnvironment::updateCcdPhysicsController(), and ~CcdPhysicsController().
Definition at line 433 of file CcdPhysicsController.h.
Referenced by CcdPhysicsController().
class btCollisionShape* CcdPhysicsController::m_collisionShape [protected] |
Definition at line 398 of file CcdPhysicsController.h.
Referenced by CcdPhysicsController(), CreateRigidbody(), CreateSoftbody(), DeleteControllerShape(), GetMargin(), GetReplica(), PostProcessReplica(), ReplaceControllerShape(), SetMargin(), and SetRadius().
class PHY_IMotionState* CcdPhysicsController::m_MotionState [protected] |
Definition at line 396 of file CcdPhysicsController.h.
Referenced by CcdPhysicsController(), CreateRigidbody(), GetMotionState(), GetWorldOrientation(), PostProcessReplica(), SynchronizeMotionStates(), WriteMotionStateToDynamics(), and ~CcdPhysicsController().
void* CcdPhysicsController::m_newClientInfo [protected] |
Definition at line 410 of file CcdPhysicsController.h.
Referenced by CcdPhysicsController(), getNewClientInfo(), and setNewClientInfo().
btCollisionObject* CcdPhysicsController::m_object [protected] |
Definition at line 393 of file CcdPhysicsController.h.
Referenced by ApplyForce(), applyImpulse(), ApplyTorque(), CreateRigidbody(), forceWorldTransform(), GetCollisionObject(), GetCollisionShape(), getOrientation(), getPosition(), GetRigidBody(), GetSoftBody(), PostProcessReplica(), RelativeRotate(), RelativeTranslate(), ReplaceControllerShape(), SetAngularVelocity(), SetCenterOfMassTransform(), SetLinearVelocity(), setOrientation(), setPosition(), setScaling(), setWorldOrientation(), and ~CcdPhysicsController().
CcdPhysicsController* CcdPhysicsController::m_parentCtrl [protected] |
Definition at line 414 of file CcdPhysicsController.h.
Referenced by CcdPhysicsController(), getParentCtrl(), and setParentCtrl().
bool CcdPhysicsController::m_prototypeTransformInitialized [protected] |
Definition at line 406 of file CcdPhysicsController.h.
Referenced by CcdPhysicsController(), and ReplaceControllerShape().
int CcdPhysicsController::m_registerCount [protected] |
Definition at line 411 of file CcdPhysicsController.h.
Referenced by CcdPhysicsController(), PostProcessReplica(), Register(), CcdPhysicsEnvironment::removeCcdPhysicsController(), and Unregister().
class CcdShapeConstructionInfo* CcdPhysicsController::m_shapeInfo [protected] |
Definition at line 399 of file CcdPhysicsController.h.
Referenced by CcdPhysicsController(), GetReplica(), GetShapeInfo(), PostProcessReplica(), CcdPhysicsEnvironment::rayTest(), and ~CcdPhysicsController().
bool CcdPhysicsController::m_softbodyMappingDone [protected] |
Definition at line 404 of file CcdPhysicsController.h.
Referenced by CcdPhysicsController(), and ReplaceControllerShape().
Definition at line 407 of file CcdPhysicsController.h.
Referenced by SetLinearVelocity(), setPosition(), and setWorldOrientation().
bool CcdPhysicsController::m_softBodyTransformInitialized [protected] |
Definition at line 405 of file CcdPhysicsController.h.
Referenced by CcdPhysicsController(), PostProcessReplica(), ReplaceControllerShape(), setPosition(), and setWorldOrientation().