SO3Engine/SCOLPack/SCOLPhysics.cpp File Reference

#include "SO3SCOL.h"
#include "../SO3PhysicGraph/SO3Body.h"
#include "..\SCOLBasic\SO3Std.h"
#include "SO3Shape.h"
#include "..\SCOLBasic\SO3DataScol.h"
#include "../SO3Renderer/SO3Root.h"
#include "../SO3SceneGraph/SO3Entity.h"
#include "../SO3SceneGraph/SO3Scene.h"

Go to the source code of this file.

Defines

#define NBPHYSICSPKG   83

Functions

int getBodyLeaveWorldCallback (mmachine m, WindowHandle h, unsigned msg, UINT id, LONG param, int *ret)
 C function that prepares the VM for the execution of the callback a body leave the physic world.
int getMaterialContactCallback (mmachine m, int id, MCOLL *result)
 C function that prepares the VM for the execution of the Physic Material Contact callback.
int getMaterialOverlapStartedCallback (mmachine m, int id, MCOLL *result)
 C function that prepares the VM for the execution of the Physic Material Overlap callback.
int getMaterialOverlapEndedCallback (mmachine m, int id, MCOLL *result)
 C function that prepares the VM for the execution of the Physic Material Overlap callback.
int SO3WorldSetFrictionModel (mmachine m)
 SO3WorldSetFrictionModel : This function sets the friction model for the world.
int SO3WorldGetFrictionModel (mmachine m)
 SO3WorldGetFrictionModel : This function gets the friction model for the world.
int SO3WorldSetPlateformArchitecture (mmachine m)
 SO3WorldSetPlateformArchitecture : This function sets the platform architecture for the world.
int SO3WorldGetPlateformArchitecture (mmachine m)
 SO3WorldGetPlateformArchitecture : This function gets the platform architecture for the world.
int SO3WorldSetSolverModel (mmachine m)
 SO3WorldSetSolverModel : This function sets thesolver model for the world.
int SO3WorldGetSolverModel (mmachine m)
 SO3WorldGetSolverModel : This function gets the solver model of the world.
int SO3WorldSetEnabled (mmachine m)
 SO3WorldSetEnabled : Activate or Deactivate the physic world.
int SO3WorldGetEnabled (mmachine m)
 SO3WorldGetEnabled : Return the enable state of the physic world.
int SO3WorldReset (mmachine m)
 SO3WorldReset : Reset the physic world and all bodies states.
int SO3WorldSetBodiesInitialState (mmachine m)
 SO3WorldSetBodiesInitialState : Set the current PRS as initial PRS to all bodies.
int SO3WorldShowLines (mmachine m)
 SO3WorldShowLines : Return true if world shows its debug calculation lines.
int SO3WorldSetGravity (mmachine m)
 SO3WorldSetGravity : defines gravity for the scene.
int SO3WorldGetGravity (mmachine m)
 SO3WorldGetGravity : get the gravity of the scene.
int SO3BodyCreateBox (mmachine m)
 SO3BodyCreateBox : Create a body as a box shape.
int SO3BodyCreateEllipsoid (mmachine m)
 SO3BodyCreateEllipsoid : Create a body as an ellipsoid shape.
int SO3BodyCreateCapsule (mmachine m)
 SO3BodyCreateCapsule : Create a body as a capsule shape.
int SO3BodyCreateChamferCylinder (mmachine m)
 SO3BodyCreateChamferCylinder : Create a body as a chamfer cylinder shape.
int SO3BodyCreateCone (mmachine m)
 SO3BodyCreateCone : Create a body as a cone shape.
int SO3BodyCreateCylinder (mmachine m)
 SO3BodyCreateCylinder : Create a body as a cylinder shape.
int SO3BodyCreatePyramid (mmachine m)
 SO3BodyCreatePyramid : Create a body as a pyramid shape.
int SO3BodyCreateCollisionTree (mmachine m)
 SO3BodyCreateCollisionTree : Create a body as an exact collision tree.
int SO3BodyCreateShape (mmachine m)
 SO3BodyCreateShape : Create a body as a shape (automatic calculation).
int SO3BodySetMass (mmachine m)
 SO3BodySetMass : Set a mass to a body.
int SO3BodyCreateBasicJointUpVector (mmachine m)
 SO3BodyCreateBasicJointUpVector : Create an up joint vector.
int SO3BodyDestroyBasicJointUpVector (mmachine m)
 SO3BodyDestroyBasicJointUpVector : Destroying an up joint vector.
int SO3BodySetForce (mmachine m)
 SO3BodySetForce : Set a force to a body.
int SO3BodyAddForce (mmachine m)
 SO3BodyAddForce : Add a force to a body.
int SO3BodyGetForce (mmachine m)
 SO3BodyGetForce : Get the current force of a body.
int SO3BodySetConstantForce (mmachine m)
 SO3BodySetConstantForce : Set a force to a body that will be constant each frame.
int SO3BodyAddConstantForce (mmachine m)
 SO3BodyAddConstantForce : Add a force to a body that will be constant each frame.
int SO3BodyGetConstantForce (mmachine m)
 SO3BodyGetConstantForce : Get the current constant force of a body.
int SO3BodySetConstantTorque (mmachine m)
 SO3BodySetConstantTorque : Set a constant torque force to a body that will be constant each frame.
int SO3BodyAddConstantTorque (mmachine m)
 SO3BodyAddConstantTorque : Add a torque force to a body that will be constant each frame.
int SO3BodyGetConstantTorque (mmachine m)
 SO3BodyGetConstantTorque : Get the current constant torque of a body.
int SO3BodyAddGlobalForce (mmachine m)
 SO3BodyAddGlobalForce : Add a global force to a body.
int SO3BodyAddLocalForce (mmachine m)
 SO3BodyAddLocalForce : Add a local force to a body.
int SO3BodyAddTorque (mmachine m)
 SO3BodyAddTorque : Add torque vector to a body.
int SO3BodySetTorque (mmachine m)
 SO3BodySetTorque : Set a torque to a body.
int SO3BodySetOmega (mmachine m)
 SO3BodySetOmega : Set an omega to a body.
int SO3BodySetVelocity (mmachine m)
 SO3BodySetVelocity : Set a velocity to a body.
int SO3BodyAddImpulse (mmachine m)
 SO3BodyAddImpulse : Add an impulsion to a body.
int SO3BodySetPositionOrientation (mmachine m)
 SO3BodySetPositionOrientation : Set Position/Orientation of a body DO NOT USE.
int SO3BodySetAngularDamping (mmachine m)
 SO3BodySetAngularDamping : defines angular Damping of a body.
int SO3BodySetCenterOfMass (mmachine m)
 SO3BodySetCenterOfMass : defines center of mass for a body.
int SO3BodySetMassMatrix (mmachine m)
 SO3BodySetMassMatrix : defines mass matrix of a body.
int SO3BodyGetAngularDamping (mmachine m)
 SO3BodyGetAngularDamping : Get the angular damping of a body.
int SO3BodyGetOmega (mmachine m)
 SO3BodyGetOmega : Get the omega of a body.
int SO3BodySetLinearDamping (mmachine m)
 SO3BodySetLinearDamping : defines linear damping of a body.
int SO3BodySetAutoSleep (mmachine m)
 SO3BodySetAutoSleep : defines Auto sleep state of a body.
int SO3BodySetType (mmachine m)
 SO3BodySetType : Defines a user type of body.
int SO3BodySetContiniousCollisionMode (mmachine m)
 SO3BodySetContiniousCollisionMode : defines continuous collision mode of a body.
int SO3BodyGetLinearDamping (mmachine m)
 SO3BodyGetLinearDamping : Get the linear damping of a body.
int SO3BodyGetInvMass (mmachine m)
 SO3BodyGetInvMass : Get the inverse mass matrix of a body.
int SO3BodyGetMassMatrix (mmachine m)
 SO3BodyGetMassMatrix : Get the mass matrix of a body.
int SO3BodyGetAutoSleep (mmachine m)
 SO3BodyGetAutoSleep : Get the auto sleep state of a body.
int SO3BodyGetSleepingState (mmachine m)
 SO3BodyGetSleepingState : Get the sleep state of a body.
int SO3BodyGetType (mmachine m)
 SO3BodyGetType : Returns the user type of body.
int SO3BodyGetContiniousCollisionMode (mmachine m)
 SO3BodyGetContiniousCollisionMode : Get the continuous collision mode of a body.
int SO3BodyGetCenterOfMass (mmachine m)
 SO3BodyGetCenterOfMass : Get the center of masse of a body.
int SO3BodyGetVelocity (mmachine m)
 SO3BodyGetVelocity : Get the velocity of a body.
int SO3BodyGetTorque (mmachine m)
 SO3BodyGetTorque : Get the torque of a body.
int SO3BodyGetPositionOrientation (mmachine m)
 SO3BodyGetPositionOrientation : Get the position/orientation of a body.
int SO3BodySetFreeze (mmachine m)
 SO3BodySetFreeze : Set a body to freeze state.
int SO3BodyGetFreeze (mmachine m)
 SO3BodyGetFreeze : Get freeze state of a body.
int SO3BodyGetSceneNode (mmachine m)
 SO3BodyGetSceneNode : Get the scene Node asssociated to a body.
int SO3BodyDestroy (mmachine m)
 SO3BodyDestroy : Destroy a body.
int SO3SceneNodeGetBody (mmachine m)
 SO3SceneNodeGetBody : Get the body attached to a node.
int SO3PhysicsRayCast (mmachine m)
 SO3PhysicsRayCast : send a raycast and return the distance.
bool MaterialIDExists (SScene *scene, string testName, SMaterialID **result)
 function to check if a material ID exists
SMaterialPairgetMaterialPairByWorld (SPhysicWorld *world, int ID1, int ID2)
 function to check if a material ID exists
int SO3BodySetMaterial (mmachine m)
 SO3BodySetMaterial : Set a material for a body.
int SO3BodyGetMaterial (mmachine m)
 SO3BodyGetMaterial : Get a material of a body.
int SO3PhysicsMaterialCreate (mmachine m)
 SO3PhysicsMaterialCreate : Create a new Physic Material ID.
int SO3PhysicsMaterialDestroy (mmachine m)
 SO3PhysicsMaterialDestroy : Destroy a Physic Material ID.
int SO3PhysicsGetMaterial (mmachine m)
 SO3PhysicsGetMaterial : return a material Physics by its name.
int SO3PhysicsMaterialSetSurfaceThickness (mmachine m)
 SO3PhysicsMaterialSetSurfaceThickness : defines Surface thickness between two physics material.
int SO3PhysicsMaterialSetDefaultElasticity (mmachine m)
 SO3PhysicsMaterialSetDefaultElasticity : defines Default elasticity between two physics material.
int SO3PhysicsMaterialSetDefaultFriction (mmachine m)
 SO3PhysicsMaterialSetDefaultFriction : defines Default friction between two physics material.
int SO3PhysicsMaterialSetDefaultSoftness (mmachine m)
 SO3PhysicsMaterialSetDefaultSoftness : defines Default softness between two physics material.
int SO3PhysicsMaterialSetDefaultCollidable (mmachine m)
 SO3PhysicsMaterialSetDefaultCollidable : defines Default Collidable state between two physics material.
int SO3PhysicsMaterialSetContiniousCollisionMode (mmachine m)
 SO3PhysicsMaterialSetContiniousCollisionMode : defines Default continuous collision state between two physics material.
int SO3CbMaterialCollision (mmachine m)
 SO3CbMaterialCollision : Define the callback scol had to be called when two material ID collide.
int SO3CbMaterialOverlapStarted (mmachine m)
 SO3CbMaterialOverlapStarted : Define the callback scol had to be called when two material ID start to overlap.
int SO3CbMaterialOverlapEnded (mmachine m)
 SO3CbMaterialOverlapEnded : Define the callback scol had to be called when two material ID does not overlap together anymore.
int SO3CbBodyLeaveWorld (mmachine m)
 SO3CbBodyLeaveWorld : Define the scol callback had to be called when a body leave the physic world.
int SCOLloadPhysics (mmachine m, cbmachine w)
 Load the SO3Engine Viewport function.
int SCOLfreePhysics ()
 free the SO3Engine Viewport function

Variables

int SO3_MATERIALPAIR_OVERLAP_STARTED_MSG
 main include
int SO3_MATERIALPAIR_OVERLAP_ENDED_MSG
int SO3_MATERIALPAIR_COLLISION_MSG
int SO3_BODY_LEAVE_WORLD_MSG
char * PHYSICSname [NBPHYSICSPKG]
int(* PHYSICSFunc [NBPHYSICSPKG])(mmachine m)
int PHYSICSnarg [NBPHYSICSPKG]
char * PHYSICSType [NBPHYSICSPKG]

Define Documentation

#define NBPHYSICSPKG   83

Nb of Scol functions or types

Definition at line 4634 of file SCOLPhysics.cpp.


Function Documentation

int getBodyLeaveWorldCallback ( mmachine  m,
WindowHandle  h,
unsigned  msg,
UINT  id,
LONG  param,
int *  ret 
)

C function that prepares the VM for the execution of the callback a body leave the physic world.

Parameters:
m : current machine
h : main scol window
msg : message
id : pointer of the obj
param : data pointer
ret : user parameter
Returns:
res : 0 if success

Definition at line 66 of file SCOLPhysics.cpp.

int getMaterialContactCallback ( mmachine  m,
int  id,
MCOLL result 
)

C function that prepares the VM for the execution of the Physic Material Contact callback.

Parameters:
m : current machine
h : main scol window
msg : message
id : pointer of the obj
param : data pointer
ret : user parameter
Returns:
res : 0 if success

Definition at line 91 of file SCOLPhysics.cpp.

int getMaterialOverlapEndedCallback ( mmachine  m,
int  id,
MCOLL result 
)

C function that prepares the VM for the execution of the Physic Material Overlap callback.

Parameters:
m : current machine
h : main scol window
msg : message
id : pointer of the obj
param : data pointer
ret : user parameter
Returns:
res : 0 if success

Definition at line 272 of file SCOLPhysics.cpp.

int getMaterialOverlapStartedCallback ( mmachine  m,
int  id,
MCOLL result 
)

C function that prepares the VM for the execution of the Physic Material Overlap callback.

Parameters:
m : current machine
h : main scol window
msg : message
id : pointer of the obj
param : data pointer
ret : user parameter
Returns:
res : 0 if success

Definition at line 200 of file SCOLPhysics.cpp.

SMaterialPair* getMaterialPairByWorld ( SPhysicWorld world,
int  ID1,
int  ID2 
)

function to check if a material ID exists

Parameters:
world : current physic world
ID1 : Material ID1
ID2 : Material ID2
Returns:
SMaterialPair : The material Pair finded, NULL otherwise

Definition at line 3654 of file SCOLPhysics.cpp.

bool MaterialIDExists ( SScene scene,
string  testName,
SMaterialID **  result 
)

function to check if a material ID exists

Parameters:
scene : current scene
testName : given name
result : current material ID pointer
Returns:
finded : true or false

Definition at line 3634 of file SCOLPhysics.cpp.

int SCOLfreePhysics (  ) 

free the SO3Engine Viewport function

Parameters:
m : The VM

Definition at line 5026 of file SCOLPhysics.cpp.

int SCOLloadPhysics ( mmachine  m,
cbmachine  w 
)

Load the SO3Engine Viewport function.

Parameters:
m : The VM
w : The Callback VM

Definition at line 5006 of file SCOLPhysics.cpp.


Variable Documentation

int(* PHYSICSFunc[NBPHYSICSPKG])(mmachine m)

Nb of arguments of each scol function

Definition at line 4731 of file SCOLPhysics.cpp.

char* PHYSICSname[NBPHYSICSPKG]

Pointers to C functions that manipulate the VM for each scol function previously defined

Definition at line 4640 of file SCOLPhysics.cpp.

int PHYSICSnarg[NBPHYSICSPKG]

Nb of arguments of each scol function

Definition at line 4822 of file SCOLPhysics.cpp.

char* PHYSICSType[NBPHYSICSPKG]

Prototypes of the scol functions

Definition at line 4913 of file SCOLPhysics.cpp.

Definition at line 53 of file SCOLPhysics.cpp.

Definition at line 52 of file SCOLPhysics.cpp.

Definition at line 51 of file SCOLPhysics.cpp.

main include

Definition at line 50 of file SCOLPhysics.cpp.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Mon Oct 31 14:42:32 2011 for SO3Engine by  doxygen 1.6.3