A Wrapper class for a btDiscreteDynamicsWorld.
More...
#include <bulletworld.h>
|
| void | btTickCallback (btDynamicsWorld *world, btScalar timeStep) |
| | A Callback that is called on every simulation tick. More...
|
| |
A Wrapper class for a btDiscreteDynamicsWorld.
Additionally contains helper functions and a map from btCollisionObject to AbstractPhysicsObject
| terminus::BulletWorld::BulletWorld |
( |
| ) |
|
| terminus::BulletWorld::~BulletWorld |
( |
| ) |
|
| terminus::BulletWorld::BulletWorld |
( |
const BulletWorld & |
other | ) |
|
|
delete |
| void terminus::BulletWorld::addCollisionMapping |
( |
const btCollisionObject * |
collisionObject, |
|
|
AbstractPhysicsObject * |
graphicsObject |
|
) |
| |
| void terminus::BulletWorld::addRigidBody |
( |
btRigidBody * |
rigidBody | ) |
|
Wraps btDiscreteDynamicsWorld::addRigidBody()
Note that rigid bodies added via this method will collide with any other object in the scene.
| void terminus::BulletWorld::addRigidBody |
( |
btRigidBody * |
rigidBody, |
|
|
short |
group, |
|
|
short |
mask |
|
) |
| |
| void terminus::BulletWorld::btStaticTickCallback |
( |
btDynamicsWorld * |
world, |
|
|
btScalar |
timeStep |
|
) |
| |
|
staticprotected |
Static wrapper for BulletWorld::btTickCallback()
Since bullet can only store plain C function pointers, this static method will be called on every tick (substep). A bullet dynamics world has a user-definable void* storage that we can use to determine the BulletWorld instance which should receive the call.
- See also
- btTickCallback()
| void terminus::BulletWorld::btTickCallback |
( |
btDynamicsWorld * |
world, |
|
|
btScalar |
timeStep |
|
) |
| |
|
protected |
A Callback that is called on every simulation tick.
This method gets called on every simulation tick (substep). At this point, we can check for colliding objects and dispatch collision events.
| AbstractPhysicsObject * terminus::BulletWorld::getPhysicsObjectForCollisionObject |
( |
const btCollisionObject * |
collisionObject | ) |
const |
| void terminus::BulletWorld::removeCollisionMapping |
( |
const btCollisionObject * |
collisionObject | ) |
|
Remove mapping from m_collisionMap.
- Parameters
-
| collisionObject | A pointer to a btCollisionObject |
| void terminus::BulletWorld::removeRigidBody |
( |
btRigidBody * |
rigidBody | ) |
|
Wraps btDiscreteDynamicsWorld::removeRigidBody()
| int terminus::BulletWorld::stepSimulation |
( |
btScalar |
timeStep, |
|
|
int |
maxSubSteps = 1, |
|
|
btScalar |
fixedTimeStep = btScalar(1.)/btScalar(60.) |
|
) |
| |
Wraps btDiscreteDynamicsWorld::stepSimulation()
| btBroadphaseInterface* terminus::BulletWorld::m_bulletBroadphase |
|
protected |
| btDefaultCollisionConfiguration* terminus::BulletWorld::m_bulletCollisionConfig |
|
protected |
| btCollisionDispatcher* terminus::BulletWorld::m_bulletDispatcher |
|
protected |
| btSequentialImpulseConstraintSolver* terminus::BulletWorld::m_bulletSolver |
|
protected |
| btDiscreteDynamicsWorld* terminus::BulletWorld::m_bulletWorld |
|
protected |
| std::unordered_map<const btCollisionObject*, AbstractPhysicsObject*> terminus::BulletWorld::m_collisionMap |
|
protected |
The documentation for this class was generated from the following files: