irr::newton::World Class Reference

Class to management newton world. More...

#include <world.hpp>

Inheritance diagram for irr::newton::World:

irr::newton::IrrNewt_Base List of all members.

Public Member Functions

irr::newton::BodycreateBody (irr::scene::ISceneNode *node, irr::scene::IMesh *mesh=NULL, E_SHAPE_TYPE shape_type=EST_BOX, irr::core::vector3df box_size_correction=irr::core::vector3df(0, 0, 0))
irr::newton::BodycreateBodyAuto (irr::scene::ISceneNode *node, irr::scene::IMesh *mesh=NULL, irr::core::vector3df box_size_correction=irr::core::vector3df(0, 0, 0))
irr::newton::CharacterControllercreateCharacterController (irr::newton::Body *body, bool erase=true)
irr::newton::JointUpVectorcreateJointUpVector (core::vector3df pin_dir, irr::newton::Body *body)
irr::newton::MaterialcreateMaterial ()
irr::newton::RagDollcreateRagDoll ()
 NOT IMPLEMENTED JET.
irr::newton::TreeBodycreateTerrainTreeBody (irr::scene::ITerrainSceneNode *node, irr::s32 LOD=3)
irr::newton::TreeBodycreateTreeBody (irr::scene::ISceneNode *node, irr::scene::IMesh *iMeshBase)
irr::newton::VehicleSimplecreateVehicleSimple (irr::newton::Body *chassis, irr::core::vector3df up_dir=irr::core::vector3df(0, 1, 0))
irr::newton::TreeBodydeserializeTreeBody (irr::scene::ISceneNode *node, irr::core::stringc file)
void drawAllDebugInfos ()
irr::newton::CollisionManagergetCollisionManager ()
irr::IrrlichtDevice * getIrrlichtDevice () const
 get irrlicht device
const int getNewtonDefaultMaterialGroupID () const
 get newton default group id
const NewtonWorld * getNewtonWorld () const
 get newton world
irr::f32 getTimeElapsed () const
void setBodyLeaveWorldEvent (void(*new_leave_world_event_callback)(irr::newton::Body *body))
void setWorldSize (irr::core::aabbox3d< irr::f32 > size)
void update ()
 World (irr::IrrlichtDevice *Device)
 ~World ()

Friends

void defBodyLeaveWorldEvent (const NewtonBody *n_body)

Detailed Description

Class to management newton world.


Constructor & Destructor Documentation

irr::newton::World::World ( irr::IrrlichtDevice *  Device  ) 

irr::newton::World::~World (  ) 


Member Function Documentation

irr::newton::Body* irr::newton::World::createBody ( irr::scene::ISceneNode *  node,
irr::scene::IMesh *  mesh = NULL,
E_SHAPE_TYPE  shape_type = EST_BOX,
irr::core::vector3df  box_size_correction = irr::core::vector3df(0, 0, 0) 
)

create a rigid body with simple collision

Parameters:
node the graphic node
mesh the mesh (need for tree collision body or for animated body)
shape_type the collision geometry
box_size_correction body bouding box size correction. This vector will be added to bounding box size to calculate collision shape size. See the correspond shape type to a description on how shape size is calculated
Returns:
the rigid body

irr::newton::Body* irr::newton::World::createBodyAuto ( irr::scene::ISceneNode *  node,
irr::scene::IMesh *  mesh = NULL,
irr::core::vector3df  box_size_correction = irr::core::vector3df(0, 0, 0) 
)

create a body automatically

Parameters:
node the graphic node
mesh the mesh (need for tree collision body or for animated body)
box_size_correction body bouding box size correction. This vector will be added to bounding box size to calculate collision shape size
Returns:
the rigid body

irr::newton::CharacterController* irr::newton::World::createCharacterController ( irr::newton::Body body,
bool  erase = true 
)

create a character control from a body

Parameters:
body the body
erase delete the body and mantain only the CharacterController? If true you will not be able more to use the body pointer passed the function

irr::newton::JointUpVector* irr::newton::World::createJointUpVector ( core::vector3df  pin_dir,
irr::newton::Body body 
)

create a rotation contraint This function creates an up vector joint. An up vector joint is a constraint that allows a body to translate freely in 3d space, but it only allows the body to rotate around the pin direction vector. This could be use by the application to control a character with physics and collision.

Parameters:
pin_dir the aligning vector (for example (0,1,0) will contraint the rotation on X and Z axis)
body the body wich the joint is attached on

irr::newton::Material* irr::newton::World::createMaterial (  ) 

create a new material

Returns:
the material

irr::newton::RagDoll* irr::newton::World::createRagDoll (  ) 

NOT IMPLEMENTED JET.

irr::newton::TreeBody* irr::newton::World::createTerrainTreeBody ( irr::scene::ITerrainSceneNode *  node,
irr::s32  LOD = 3 
)

create a rigid body with tree collision from a terrain node created using addTerrainSceneNode

Parameters:
node the graphic node
LOD the level of detail. 0 for max level of detail (preciser) and 5 for minumum level of detail (faster). This influence only collision and not graphic
Returns:
the rigid body

irr::newton::TreeBody* irr::newton::World::createTreeBody ( irr::scene::ISceneNode *  node,
irr::scene::IMesh *  iMeshBase 
)

create a rigid body with tree collision

Parameters:
node the graphic node
iMeshBase the mesh (can't be NULL)
Returns:
the rigid body

irr::newton::VehicleSimple* irr::newton::World::createVehicleSimple ( irr::newton::Body chassis,
irr::core::vector3df  up_dir = irr::core::vector3df(0, 1, 0) 
)

creates a simple vehicle

Parameters:
chassis the body wich rappresent the chassis
up_dir the vector opposite to the gravity. Generally (0,1,0). Used to simulate suspension
Returns:
the vehicle

irr::newton::TreeBody* irr::newton::World::deserializeTreeBody ( irr::scene::ISceneNode *  node,
irr::core::stringc  file 
)

load a tree body from a file

Parameters:
node the graphic node related to the tree body
file path and name of the file wich contain the tree body
Returns:
the body

void irr::newton::World::drawAllDebugInfos (  ) 

draw all debug infos. call this between smgr->drawAll() and driver->endScene()

Returns:
none

irr::newton::CollisionManager* irr::newton::World::getCollisionManager (  ) 

Get the collision manager to collision check and ray casting

Returns:
the collision manager

irr::IrrlichtDevice* irr::newton::World::getIrrlichtDevice (  )  const [inline]

get irrlicht device

const int irr::newton::World::getNewtonDefaultMaterialGroupID (  )  const [inline]

get newton default group id

const NewtonWorld* irr::newton::World::getNewtonWorld (  )  const [inline]

get newton world

irr::f32 irr::newton::World::getTimeElapsed (  )  const [inline]

Get the time elapsed from the last World::update() call

Returns:
the elapsed time

void irr::newton::World::setBodyLeaveWorldEvent ( void(*)(irr::newton::Body *body)  new_leave_world_event_callback  ) 

call a user defined function when a body leave world

Parameters:
new_leave_world_event_callback pointer to a function that takes a irr::newton::Body pointer (contatin the body eich leave the world) and return void
Returns:
none

void irr::newton::World::setWorldSize ( irr::core::aabbox3d< irr::f32 >  size  ) 

Set the size of the world

Parameters:
size new world size
Returns:
none

void irr::newton::World::update (  ) 

update the world. Call this every loop

Returns:
none


Friends And Related Function Documentation

void defBodyLeaveWorldEvent ( const NewtonBody *  n_body  )  [friend]


The documentation for this class was generated from the following file:
Generated on Fri Dec 15 16:58:34 2006 for IrrNewt by  doxygen 1.5.1-p1