Logo Search packages:      
Sourcecode: blender version File versions  Download package

KX_SumoPhysicsController Class Reference

#include <KX_SumoPhysicsController.h>

Inheritance diagram for KX_SumoPhysicsController:

KX_IPhysicsController SumoPhysicsController SG_Controller PHY_IPhysicsController

List of all members.


Detailed Description

Id
KX_SumoPhysicsController.h 14444 2008-04-16 22:40:48Z hos

***** BEGIN GPL LICENSE BLOCK *****

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. All rights reserved.

The Original Code is: all of this file.

Contributor(s): none yet.

***** END GPL LICENSE BLOCK ***** 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 44 of file KX_SumoPhysicsController.h.


Public Types

enum  SG_Controller_option {
  SG_CONTR_NODEF = 0, SG_CONTR_IPO_IPO_AS_FORCE, SG_CONTR_IPO_FORCES_ACT_LOCAL, SG_CONTR_CAMIPO_LENS,
  SG_CONTR_CAMIPO_CLIPEND, SG_CONTR_CAMIPO_CLIPSTART, SG_CONTR_MAX
}

Public Member Functions

void ApplyForce (const MT_Vector3 &force, bool local)
void applyImpulse (const MT_Point3 &attach, const MT_Vector3 &impulse)
void ApplyTorque (const MT_Vector3 &torque, bool local)
virtual void calcXform ()
void ClearObject ()
virtual void do_me ()
float getFriction ()
virtual void GetLinearVelocity (float &linvX, float &linvY, float &linvZ)
MT_Vector3 GetLinearVelocity ()
virtual float GetMargin () const
virtual float getMass ()
virtual MT_Scalar GetMass ()
virtual void * getNewClientInfo ()
virtual void getOrientation (MT_Quaternion &orn)
virtual float GetRadius () const
virtual void getReactionForce (float &forceX, float &forceY, float &forceZ)
virtual MT_Vector3 getReactionForce ()
virtual PHY_IPhysicsControllerGetReplica ()
virtual SG_ControllerGetReplica (class SG_Node *destnode)
float getRestitution ()
class SM_ObjectGetSumoObject ()
void * GetUserData ()
virtual void GetVelocity (const float posX, const float posY, const float posZ, float &linvX, float &linvY, float &linvZ)
MT_Vector3 GetVelocity (const MT_Point3 &pos)
void GetWorldOrientation (class MT_Matrix3x3 &mat)
PHY__Vector3 GetWorldPosition (PHY__Vector3 &localpos)
void GetWorldPosition (MT_Point3 &pos)
void GetWorldScaling (MT_Vector3 &scale)
 KX_SumoPhysicsController (class SM_Scene *sumoScene, class SM_Object *sumoObj, class PHY_IMotionState *motionstate, bool dyna)
virtual void PostProcessReplica (class PHY_IMotionState *motionstate, class PHY_IPhysicsController *parentctrl)
void RelativeRotate (const MT_Matrix3x3 &drot, bool local)
void RelativeTranslate (const MT_Vector3 &dloc, bool local)
void resolveCombinedVelocities (float linvelX, float linvelY, float linvelZ, float angVelX, float angVelY, float angVelZ)
void RestoreDynamics ()
void SetAngularVelocity (const MT_Vector3 &ang_vel, bool local)
void SetDyna (bool isDynamic)
void SetLinearVelocity (const MT_Vector3 &lin_vel, bool local)
virtual void SetMargin (float margin)
virtual void setMargin (float collisionMargin)
virtual void setNewClientInfo (void *clientinfo)
virtual void SetObject (SG_IObject *object)
void SetOption (int option, int value)
virtual void setOrientation (const MT_Quaternion &orn)
virtual void setPosition (const MT_Point3 &pos)
virtual void setRigidBody (bool rigid)
virtual void setScaling (const MT_Vector3 &scaling)
virtual void SetSimulatedTime (float time)
virtual void SetSimulatedTime (double time)
void setSumoTransform (bool nondynaonly)
void SetSumoTransform (bool nondynaonly)
void SuspendDynamics ()
virtual bool SynchronizeMotionStates (float time)
virtual bool Update (double time)
virtual void WriteDynamicsToMotionState ()
virtual void WriteMotionStateToDynamics (bool nondynaonly)
Physics Methods
virtual void ApplyForce (float forceX, float forceY, float forceZ, bool local)
virtual void applyImpulse (float attachX, float attachY, float attachZ, float impulseX, float impulseY, float impulseZ)
virtual void ApplyTorque (float torqueX, float torqueY, float torqueZ, bool local)
virtual void SetActive (bool active)
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)
Kinematic Methods.
virtual void getOrientation (float &quatImag0, float &quatImag1, float &quatImag2, float &quatReal)
virtual void getPosition (PHY__Vector3 &pos) const
virtual void RelativeRotate (const float drot[12], bool local)
virtual void RelativeTranslate (float dlocX, float dlocY, float dlocZ, bool local)
virtual void setOrientation (float quatImag0, float quatImag1, float quatImag2, float quatReal)
virtual void setPosition (float posX, float posY, float posZ)
virtual void setScaling (float scaleX, float scaleY, float scaleZ)

Protected Attributes

bool m_bDyna
SG_IObjectm_pObject
bool m_suspendDynamics
void * m_userdata

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

Generated by  Doxygen 1.6.0   Back to index