NTRT Simulator
Version: Master
|
#include <tgWorldBulletPhysicsImpl.h>
Public Member Functions | |
tgWorldBulletPhysicsImpl (const tgWorld::Config &config, tgBulletGround *ground) | |
~tgWorldBulletPhysicsImpl () | |
virtual void | step (double dt) |
btDynamicsWorld & | dynamicsWorld () const |
void | addCollisionShape (btCollisionShape *pShape) |
void | deleteCollisionShape (btCollisionShape *pShape) |
void | addConstraint (btTypedConstraint *pConstaint) |
Concrete class derived from tgWorldImpl for Bullet Physics implementations.
Definition at line 52 of file tgWorldBulletPhysicsImpl.h.
tgWorldBulletPhysicsImpl::tgWorldBulletPhysicsImpl | ( | const tgWorld::Config & | config, |
tgBulletGround * | ground | ||
) |
The only constructor.
[in] | gravity | the gravitational acceleration in m/sec^2 |
[in] | ground | - a container class that holds a rigid body and collsion object for the ground. tgEmptyGround can be used to create a ground free simulation |
Definition at line 114 of file tgWorldBulletPhysicsImpl.cpp.
tgWorldBulletPhysicsImpl::~tgWorldBulletPhysicsImpl | ( | ) |
Clean up Bullet Physics state.
Definition at line 154 of file tgWorldBulletPhysicsImpl.cpp.
void tgWorldBulletPhysicsImpl::addCollisionShape | ( | btCollisionShape * | pShape | ) |
Add a btCollisionShape the a collection for deletion upon destruction.
[in] | pShape | a pointer to a btCollisionShape; do nothing if NULL |
Definition at line 223 of file tgWorldBulletPhysicsImpl.cpp.
void tgWorldBulletPhysicsImpl::addConstraint | ( | btTypedConstraint * | pConstaint | ) |
Add a btTypedConstraint to a collection for deletion upon destruction. Also add to the physics.
[in] | pConstraint | a pointer to a btTypedConstraint; do nothing if NULL |
void tgWorldBulletPhysicsImpl::deleteCollisionShape | ( | btCollisionShape * | pShape | ) |
Immediately delete a collision shape to avoid leaking memory during a rial
[in] | pShape | a pointer to a btCollisionShape; do nothing if NULL |
Definition at line 238 of file tgWorldBulletPhysicsImpl.cpp.
|
inline |
Return a reference to the dynamics world.
Definition at line 80 of file tgWorldBulletPhysicsImpl.h.
|
virtual |
Advance the simulation.
[in] | dt | the number of seconds since the previous call; must be positive |
Implements tgWorldImpl.
Definition at line 209 of file tgWorldBulletPhysicsImpl.cpp.