Logo Search packages:      
Sourcecode: blender version File versions

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,v 1.9 2004/04/14 05:57:23 kester Exp

***** BEGIN GPL/BL DUAL 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. The Blender Foundation also sells licenses for use in proprietary software under the Blender License. See http://www.blender.org/BL/ for information about this.

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/BL DUAL 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 48 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)
void ClearObject ()
virtual void do_me ()
virtual void * getClientInfo ()
float getFriction ()
virtual void GetLinearVelocity (float &linvX, float &linvY, float &linvZ)
MT_Vector3 GetLinearVelocity ()
virtual float getMass ()
virtual MT_Scalar GetMass ()
virtual void getOrientation (MT_Quaternion &orn)
virtual void getReactionForce (float &forceX, float &forceY, float &forceZ)
virtual MT_Vector3 getReactionForce ()
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)
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 (const MT_Vector3 &lin_vel, const MT_Vector3 &ang_vel)
void RestoreDynamics ()
void SetAngularVelocity (const MT_Vector3 &ang_vel, bool local)
virtual void setClientInfo (void *clientinfo)
void SetDyna (bool isDynamic)
void SetLinearVelocity (const MT_Vector3 &lin_vel, bool local)
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 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