Blender V2.61 - r43446
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Friends

CcdPhysicsController Class Reference

CcdPhysicsController is a physics object that supports continuous collision detection and time of impact based physics resolution. More...

#include <CcdPhysicsController.h>

Inheritance diagram for CcdPhysicsController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 CcdPhysicsController (const CcdConstructionInfo &ci)
bool DeleteControllerShape ()
bool ReplaceControllerShape (btCollisionShape *newShape)
virtual ~CcdPhysicsController ()
CcdConstructionInfogetConstructionInfo ()
const CcdConstructionInfogetConstructionInfo () const
btRigidBodyGetRigidBody ()
btCollisionObject * GetCollisionObject ()
btSoftBodyGetSoftBody ()
CcdShapeConstructionInfoGetShapeInfo ()
btCollisionShapeGetCollisionShape ()
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_IPhysicsControllerGetReplica ()
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_IMotionStateGetMotionState ()
class PHY_IMotionStateGetMotionState () const
class CcdPhysicsEnvironmentGetPhysicsEnvironment ()
void setParentCtrl (CcdPhysicsController *parentCtrl)
CcdPhysicsControllergetParentCtrl ()
const CcdPhysicsControllergetParentCtrl () const
virtual const char * getName ()

Static Public Member Functions

static btTransformGetTransformFromMotionState (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_IMotionStatem_MotionState
btMotionStatem_bulletMotionState
class btCollisionShapem_collisionShape
class CcdShapeConstructionInfom_shapeInfo
bool m_softbodyMappingDone
bool m_softBodyTransformInitialized
bool m_prototypeTransformInitialized
btTransform m_softbodyStartTrans
void * m_newClientInfo
int m_registerCount
CcdConstructionInfo m_cci
CcdPhysicsControllerm_parentCtrl

Friends

class CcdPhysicsEnvironment

Detailed Description

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.


Constructor & Destructor Documentation

CcdPhysicsController::CcdPhysicsController ( const CcdConstructionInfo ci)
CcdPhysicsController::~CcdPhysicsController ( ) [virtual]

Member Function Documentation

void CcdPhysicsController::ApplyForce ( float  forceX,
float  forceY,
float  forceZ,
bool  local 
) [virtual]
void CcdPhysicsController::applyImpulse ( float  attachX,
float  attachY,
float  attachZ,
float  impulseX,
float  impulseY,
float  impulseZ 
) [virtual]
void CcdPhysicsController::ApplyTorque ( float  torqueX,
float  torqueY,
float  torqueZ,
bool  local 
) [virtual]
virtual void CcdPhysicsController::calcXform ( ) [inline, virtual]

Implements PHY_IPhysicsController.

Definition at line 528 of file CcdPhysicsController.h.

void CcdPhysicsController::CreateRigidbody ( ) [protected]
bool CcdPhysicsController::CreateSoftbody ( ) [protected]
bool CcdPhysicsController::DeleteControllerShape ( )
void CcdPhysicsController::forceWorldTransform ( const btMatrix3x3 mat,
const btVector3 &  pos 
) [protected]
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 ( )
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]
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]
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]
btRigidBody * CcdPhysicsController::GetRigidBody ( )
CcdShapeConstructionInfo* CcdPhysicsController::GetShapeInfo ( ) [inline]

Definition at line 457 of file CcdPhysicsController.h.

References m_shapeInfo.

btSoftBody * CcdPhysicsController::GetSoftBody ( )
btTransform & CcdPhysicsController::GetTransformFromMotionState ( PHY_IMotionState motionState) [static]
void CcdPhysicsController::GetVelocity ( const float  posX,
const float  posY,
const float  posZ,
float &  linvX,
float &  linvY,
float &  linvZ 
) [virtual]
void CcdPhysicsController::GetWorldOrientation ( btMatrix3x3 mat) [protected]
void CcdPhysicsController::PostProcessReplica ( class PHY_IMotionState motionstate,
class PHY_IPhysicsController parentctrl 
) [virtual]
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]
void CcdPhysicsController::RelativeTranslate ( float  dlocX,
float  dlocY,
float  dlocZ,
bool  local 
) [virtual]
bool CcdPhysicsController::ReplaceControllerShape ( btCollisionShape newShape)
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]
void CcdPhysicsController::SetCenterOfMassTransform ( btTransform xform)
void CcdPhysicsController::SetLinearVelocity ( float  lin_velX,
float  lin_velY,
float  lin_velZ,
bool  local 
) [virtual]
virtual void CcdPhysicsController::SetLinVelocityMax ( float  val) [inline, virtual]
virtual void CcdPhysicsController::SetLinVelocityMin ( float  val) [inline, virtual]
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]
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]
void CcdPhysicsController::setPosition ( float  posX,
float  posY,
float  posZ 
) [virtual]
virtual void CcdPhysicsController::SetRadius ( float  margin) [inline, virtual]
void CcdPhysicsController::setRigidBody ( bool  rigid) [virtual]
void CcdPhysicsController::setScaling ( float  scaleX,
float  scaleY,
float  scaleZ 
) [virtual]
void CcdPhysicsController::setWorldOrientation ( const btMatrix3x3 mat) [protected]
bool CcdPhysicsController::SynchronizeMotionStates ( float  time) [virtual]
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().


Friends And Related Function Documentation

friend class CcdPhysicsEnvironment [friend]

Definition at line 401 of file CcdPhysicsController.h.


Member Data Documentation

Definition at line 433 of file CcdPhysicsController.h.

Referenced by CcdPhysicsController().

btCollisionObject* CcdPhysicsController::m_object [protected]

Definition at line 414 of file CcdPhysicsController.h.

Referenced by CcdPhysicsController(), getParentCtrl(), and setParentCtrl().

Definition at line 406 of file CcdPhysicsController.h.

Referenced by CcdPhysicsController(), and ReplaceControllerShape().

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().


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