Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

KX_PhysicsController Class Reference

Physics Controller, a special kind of Scene Graph Transformation Controller. More...

#include <KX_PhysicsController.h>

Inheritance diagram for KX_PhysicsController:

SG_Controller SM_Callback SG_IObject List of all members.

Public Methods

 KX_PhysicsController (class SM_Scene* sumoScene,class SM_Object* sumoObj,bool dyna)
virtual ~KX_PhysicsController ()
virtual void SetObject (SG_IObject* object)
void SetSumoObject (class SM_Object* sumoObj)
void SetSumoScene (class SM_Scene* sumoScene)
SM_Object* GetSumoObject ()
void RelativeTranslate (const MT_Vector3& dloc,bool local)
void RelativeRotate (const MT_Matrix3x3& drot,bool local)
void ApplyTorque (const MT_Vector3& torque,bool local)
void ApplyForce (const MT_Vector3& force,bool local)
MT_Vector3 GetLinearVelocity ()
MT_Vector3 GetVelocity (const MT_Point3& pos)
void SetAngularVelocity (const MT_Vector3& ang_vel,bool local)
void SetLinearVelocity (const MT_Vector3& lin_vel,bool local)
void SuspendDynamics ()
void RestoreDynamics ()
virtual SG_ControllerGetReplica ()
void SetDyna (bool isDynamic)
void SetSumoTransform ()
virtual void SetSimulatedTime (double time)
virtual bool Update (double time)
virtual void do_me ()

Detailed Description

Physics Controller, a special kind of Scene Graph Transformation Controller.

It get's callbacks from Sumo in case a transformation change took place. Each time the scene graph get's updated, the controller get's a chance in the 'Update' method to reflect changed.

Definition at line 15 of file KX_PhysicsController.h.


Constructor & Destructor Documentation

KX_PhysicsController::KX_PhysicsController ( class SM_Scene * sumoScene,
class SM_Object * sumoObj,
bool dyna ) [inline]
 

Definition at line 25 of file KX_PhysicsController.h.

Referenced by GetReplica().

KX_PhysicsController::~KX_PhysicsController ( ) [inline, virtual]
 

Definition at line 29 of file KX_PhysicsController.h.


Member Function Documentation

void KX_PhysicsController::ApplyForce ( const MT_Vector3 & force,
bool local )
 

Definition at line 101 of file KX_PhysicsController.cpp.

Referenced by KX_GameObject::ApplyForce().

void KX_PhysicsController::ApplyTorque ( const MT_Vector3 & torque,
bool local )
 

Definition at line 89 of file KX_PhysicsController.cpp.

Referenced by KX_GameObject::ApplyTorque().

MT_Vector3 KX_PhysicsController::GetLinearVelocity ( )
 

Definition at line 78 of file KX_PhysicsController.cpp.

SG_Controller * KX_PhysicsController::GetReplica ( ) [virtual]
 

Reimplemented from SG_Controller.

Definition at line 166 of file KX_PhysicsController.cpp.

SM_Object * KX_PhysicsController::GetSumoObject ( ) [inline]
 

Definition at line 41 of file KX_PhysicsController.h.

Referenced by KX_GameObject::GetSumoObject().

MT_Vector3 KX_PhysicsController::GetVelocity ( const MT_Point3 & pos )
 

Definition at line 67 of file KX_PhysicsController.cpp.

void KX_PhysicsController::RelativeRotate ( const MT_Matrix3x3 & drot,
bool local )
 

Definition at line 32 of file KX_PhysicsController.cpp.

Referenced by KX_GameObject::ApplyRotation().

void KX_PhysicsController::RelativeTranslate ( const MT_Vector3 & dloc,
bool local )
 

Definition at line 22 of file KX_PhysicsController.cpp.

Referenced by KX_GameObject::ApplyMovement().

void KX_PhysicsController::RestoreDynamics ( )
 

Definition at line 156 of file KX_PhysicsController.cpp.

void KX_PhysicsController::SetAngularVelocity ( const MT_Vector3 & ang_vel,
bool local )
 

Definition at line 55 of file KX_PhysicsController.cpp.

Referenced by KX_GameObject::setAngularVelocity().

void KX_PhysicsController::SetDyna ( bool isDynamic ) [inline]
 

Definition at line 59 of file KX_PhysicsController.h.

void KX_PhysicsController::SetLinearVelocity ( const MT_Vector3 & lin_vel,
bool local )
 

Definition at line 44 of file KX_PhysicsController.cpp.

Referenced by KX_GameObject::setLinearVelocity().

void KX_PhysicsController::SetObject ( SG_IObject * object ) [virtual]
 

Reimplemented from SG_Controller.

Definition at line 193 of file KX_PhysicsController.cpp.

Referenced by KX_GameObject::RegisterSumoObject().

void KX_PhysicsController::SetSimulatedTime ( double time ) [virtual]
 

Reimplemented from SG_Controller.

Definition at line 120 of file KX_PhysicsController.cpp.

void KX_PhysicsController::SetSumoObject ( class SM_Object * sumoObj ) [inline]
 

Definition at line 35 of file KX_PhysicsController.h.

void KX_PhysicsController::SetSumoScene ( class SM_Scene * sumoScene ) [inline]
 

Definition at line 38 of file KX_PhysicsController.h.

void KX_PhysicsController::SetSumoTransform ( )
 

Definition at line 125 of file KX_PhysicsController.cpp.

void KX_PhysicsController::SuspendDynamics ( )
 

Definition at line 143 of file KX_PhysicsController.cpp.

bool KX_PhysicsController::Update ( double time ) [virtual]
 

Reimplemented from SG_Controller.

Definition at line 113 of file KX_PhysicsController.cpp.

void KX_PhysicsController::do_me ( ) [virtual]
 

Definition at line 7 of file KX_PhysicsController.cpp.


The documentation for this class was generated from the following files:
Generated at Thu Feb 1 13:03:43 2001 for Ketsji Game Engine by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000