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