Loading...
Searching...
No Matches
Ogre::Bullet::DynamicsWorld Class Reference
Optional Components » Bullet

simplified wrapper with automatic memory management More...

`#include <OgreBullet.h>`

Inheritance diagram for Ogre::Bullet::DynamicsWorld:
[legend]

## Public Member Functions

| DynamicsWorld (btDynamicsWorld *btWorld)
| DynamicsWorld (const Vector3 &gravity)
btRigidBody * | addKinematicRigidBody (Entity *ent, ColliderType ct, int group=1, int mask=-1)
btRigidBody * | addRigidBody (float mass, Entity *ent, ColliderType ct, CollisionListener *listener=nullptr, int group=1, int mask=-1)
| Add an Entity as a rigid body to the DynamicsWorld.
btRigidBody * | addTerrainRigidBody (Terrain *terrain, int group=1, int mask=-1, bool debugDraw=false)
| Add static body for Ogre terrain.
btRigidBody * | addTerrainRigidBody (TerrainGroup *terrainGroup, long x, long y, int group=1, int mask=-1, bool debugDraw=false)
| Add static body for Ogre terrain.
void | attachRigidBody (btRigidBody *rigidBody, Entity *ent, CollisionListener *listener=nullptr, int group=1, int mask=-1)
btDynamicsWorld * | getBtWorld () const
Public Member Functions inherited from Ogre::Bullet::CollisionWorld
| CollisionWorld (btCollisionWorld *btWorld)
virtual | ~CollisionWorld ()
btCollisionObject * | addCollisionObject (Entity *ent, ColliderType ct, int group=1, int mask=-1)
void | attachCollisionObject (btCollisionObject *collisionObject, Entity *ent, int group=1, int mask=-1)
void | rayTest (const Ray &ray, RayResultCallback *callback, float maxDist=1000)

## Detailed Description

simplified wrapper with automatic memory management

## Constructor & Destructor Documentation

## DynamicsWorld() [1/2]

Ogre::Bullet::DynamicsWorld::DynamicsWorld | ( | const Vector3 & | gravity | ) |

explicit

## DynamicsWorld() [2/2]

Ogre::Bullet::DynamicsWorld::DynamicsWorld | ( | btDynamicsWorld * | btWorld | ) |

inline

References Ogre::Bullet::CollisionWorld::CollisionWorld().

## Member Function Documentation

## addRigidBody()

btRigidBody * Ogre::Bullet::DynamicsWorld::addRigidBody | ( | float | mass,
|  | Entity * | ent,
|  | ColliderType | ct,
|  | CollisionListener * | listener = nullptr,
|  | int | group = 1,
|  | int | mask = -1 )

Add an Entity as a rigid body to the DynamicsWorld.

Parameters

  mass | the mass of the object
  ent | the entity to control
  ct | the collider type
  listener | a listener to call on collision with other objects
  group | the collision group
  mask | the collision mask

## addKinematicRigidBody()

btRigidBody * Ogre::Bullet::DynamicsWorld::addKinematicRigidBody | ( | Entity * | ent,
|  | ColliderType | ct,
|  | int | group = 1,
|  | int | mask = -1 )

## addTerrainRigidBody() [1/2]

btRigidBody * Ogre::Bullet::DynamicsWorld::addTerrainRigidBody | ( | TerrainGroup * | terrainGroup,
|  | long | x,
|  | long | y,
|  | int | group = 1,
|  | int | mask = -1,
|  | bool | debugDraw = false )

Add static body for Ogre terrain.

Parameters

  terrainGroup | the TerrainGroup of the terrain
  x | x coordinate of the terrain slot
  y | y coordinate of the terrain slot
  group | the collision group
  mask | the collision mask
  debugDraw | allow debug drawing

## addTerrainRigidBody() [2/2]

btRigidBody * Ogre::Bullet::DynamicsWorld::addTerrainRigidBody | ( | Terrain * | terrain,
|  | int | group = 1,
|  | int | mask = -1,
|  | bool | debugDraw = false )

Add static body for Ogre terrain.

Parameters

  terrain | the terrain
  group | the collision group
  mask | the collision mask
  debugDraw | allow debug drawing

## attachRigidBody()

void Ogre::Bullet::DynamicsWorld::attachRigidBody | ( | btRigidBody * | rigidBody,
|  | Entity * | ent,
|  | CollisionListener * | listener = nullptr,
|  | int | group = 1,
|  | int | mask = -1 )

## getBtWorld()

btDynamicsWorld * Ogre::Bullet::DynamicsWorld::getBtWorld | ( |  | ) | const

inline

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

- OgreBullet.h