#include <IPhysic.h>
Public Member Functions | |
virtual | ~IPhysic (void) |
Destructor. | |
virtual bool | init (void)=0 |
virtual void | uninit (void)=0 |
virtual pIBody | createDummy (float3 position, float3 rotation)=0 |
Create a sphere body. | |
virtual pIBody | createSphere (float3 position, float3 rotation, float radius, float density=1.f, ushort colGroup=0, int material=0, bool dynamic=false)=0 |
Create a sphere body. | |
virtual pIBody | createBox (float3 position, float3 rotation, float width, float height, float depth, float density=1.f, ushort colGroup=0, int material=0, bool dynamic=false)=0 |
Create a box body. | |
virtual pIBody | createMesh (float3 position, float3 rotation, float *vertices, int vertexSize, int numVertices, ushort *indices, int numIndices, float density=1.f, ushort colGroup=0, int material=0, bool dynamic=false)=0 |
Create a mesh body. | |
virtual void | createExplosion (float3 position)=0 |
Create an explosion at the specified position. | |
virtual void | freeBody (pIBody &)=0 |
Free a body. | |
virtual void | update (float dt)=0 |
Physic interface. This interface is used to create physic bodies-
Definition at line 5 of file IPhysic.h.
virtual IPhysic::~IPhysic | ( | void | ) | [inline, virtual] |
virtual pIBody IPhysic::createBox | ( | float3 | position, | |
float3 | rotation, | |||
float | width, | |||
float | height, | |||
float | depth, | |||
float | density = 1.f , |
|||
ushort | colGroup = 0 , |
|||
int | material = 0 , |
|||
bool | dynamic = false | |||
) | [pure virtual] |
Create a box body.
Implemented in Physic.
Create a sphere body.
Implemented in Physic.
virtual void IPhysic::createExplosion | ( | float3 | position | ) | [pure virtual] |
Create an explosion at the specified position.
Implemented in Physic.
virtual pIBody IPhysic::createMesh | ( | float3 | position, | |
float3 | rotation, | |||
float * | vertices, | |||
int | vertexSize, | |||
int | numVertices, | |||
ushort * | indices, | |||
int | numIndices, | |||
float | density = 1.f , |
|||
ushort | colGroup = 0 , |
|||
int | material = 0 , |
|||
bool | dynamic = false | |||
) | [pure virtual] |
Create a mesh body.
Implemented in Physic.
virtual pIBody IPhysic::createSphere | ( | float3 | position, | |
float3 | rotation, | |||
float | radius, | |||
float | density = 1.f , |
|||
ushort | colGroup = 0 , |
|||
int | material = 0 , |
|||
bool | dynamic = false | |||
) | [pure virtual] |
Create a sphere body.
Implemented in Physic.
virtual bool IPhysic::init | ( | void | ) | [pure virtual] |
Initialize the physic module. This method musst be called in order to use this module.
Implemented in Physic.
virtual void IPhysic::uninit | ( | void | ) | [pure virtual] |
Uninitialize the module. After calling this method the physic module cannot be used.
Implemented in Physic.
virtual void IPhysic::update | ( | float | dt | ) | [pure virtual] |
Simulate the scene for the given time interval and update the dynamic bodies.
Implemented in Physic.