#include <world.hpp>
Inheritance diagram for irr::newton::World:
Public Member Functions | |
irr::newton::Body * | 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)) |
irr::newton::Body * | createBodyAuto (irr::scene::ISceneNode *node, irr::scene::IMesh *mesh=NULL, irr::core::vector3df box_size_correction=irr::core::vector3df(0, 0, 0)) |
irr::newton::CharacterController * | createCharacterController (irr::newton::Body *body, bool erase=true) |
irr::newton::JointUpVector * | createJointUpVector (core::vector3df pin_dir, irr::newton::Body *body) |
irr::newton::Material * | createMaterial () |
irr::newton::RagDoll * | createRagDoll () |
NOT IMPLEMENTED JET. | |
irr::newton::TreeBody * | createTerrainTreeBody (irr::scene::ITerrainSceneNode *node, irr::s32 LOD=3) |
irr::newton::TreeBody * | createTreeBody (irr::scene::ISceneNode *node, irr::scene::IMesh *iMeshBase) |
irr::newton::VehicleSimple * | createVehicleSimple (irr::newton::Body *chassis, irr::core::vector3df up_dir=irr::core::vector3df(0, 1, 0)) |
irr::newton::TreeBody * | deserializeTreeBody (irr::scene::ISceneNode *node, irr::core::stringc file) |
void | drawAllDebugInfos () |
irr::newton::CollisionManager * | getCollisionManager () |
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) |
irr::newton::World::World | ( | irr::IrrlichtDevice * | Device | ) |
irr::newton::World::~World | ( | ) |
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
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 |
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
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 |
irr::newton::CharacterController* irr::newton::World::createCharacterController | ( | irr::newton::Body * | body, | |
bool | erase = true | |||
) |
create a character control from a body
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.
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
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
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 |
irr::newton::TreeBody* irr::newton::World::createTreeBody | ( | irr::scene::ISceneNode * | node, | |
irr::scene::IMesh * | iMeshBase | |||
) |
create a rigid body with tree collision
node | the graphic node | |
iMeshBase | the mesh (can't be NULL) |
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
chassis | the body wich rappresent the chassis | |
up_dir | the vector opposite to the gravity. Generally (0,1,0). Used to simulate suspension |
irr::newton::TreeBody* irr::newton::World::deserializeTreeBody | ( | irr::scene::ISceneNode * | node, | |
irr::core::stringc | file | |||
) |
load a tree body from a file
node | the graphic node related to the tree body | |
file | path and name of the file wich contain the tree body |
void irr::newton::World::drawAllDebugInfos | ( | ) |
draw all debug infos. call this between smgr->drawAll() and driver->endScene()
irr::newton::CollisionManager* irr::newton::World::getCollisionManager | ( | ) |
Get the collision manager to collision check and ray casting
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
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
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 |
void irr::newton::World::setWorldSize | ( | irr::core::aabbox3d< irr::f32 > | size | ) |
Set the size of the world
size | new world size |
void irr::newton::World::update | ( | ) |
update the world. Call this every loop
void defBodyLeaveWorldEvent | ( | const NewtonBody * | n_body | ) | [friend] |