Public Member Functions

Physic Class Reference

#include <Physic.h>

Inheritance diagram for Physic:
IPhysic

List of all members.

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)

Detailed Description

The PhysX implementation of the IPhysic interface.

Definition at line 14 of file Physic.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

pIBody Physic::createBox ( float3  position,
float3  rotation,
float  width,
float  height,
float  depth,
float  density,
ushort  colGroup = 0,
int  material = 0,
bool  dynamic = false 
) [virtual]

Create a box body.

Implements IPhysic.

Definition at line 189 of file Physic.cpp.

pIBody Physic::createDummy ( float3  position,
float3  rotation 
) [virtual]

Create a sphere body.

Implements IPhysic.

Definition at line 152 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.

pIBody Physic::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 
) [virtual]

Create a mesh body.

Implements IPhysic.

Definition at line 219 of file Physic.cpp.

pIBody Physic::createSphere ( float3  position,
float3  rotation,
float  radius,
float  density,
ushort  colGroup = 0,
int  material = 0,
bool  dynamic = false 
) [virtual]

Create a sphere body.

Implements IPhysic.

Definition at line 159 of file Physic.cpp.

void Physic::freeBody ( pIBody  )  [virtual]

Free a body.

Implements IPhysic.

Definition at line 294 of file Physic.cpp.

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.


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