NTRT Simulator  v1.1
 All Classes Namespaces Files Functions Variables Typedefs Friends Pages
tgWorldBulletPhysicsImpl Class Reference

#include <tgWorldBulletPhysicsImpl.h>

Inheritance diagram for tgWorldBulletPhysicsImpl:
Collaboration diagram for tgWorldBulletPhysicsImpl:

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)
 

Detailed Description

Concrete class derived from tgWorldImpl for Bullet Physics implementations.

Definition at line 52 of file tgWorldBulletPhysicsImpl.h.

Constructor & Destructor Documentation

tgWorldBulletPhysicsImpl::tgWorldBulletPhysicsImpl ( const tgWorld::Config config,
tgBulletGround ground 
)

The only constructor.

Parameters
[in]gravitythe 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.

Here is the call graph for this function:

tgWorldBulletPhysicsImpl::~tgWorldBulletPhysicsImpl ( )

Clean up Bullet Physics state.

Definition at line 148 of file tgWorldBulletPhysicsImpl.cpp.

Member Function Documentation

void tgWorldBulletPhysicsImpl::addCollisionShape ( btCollisionShape *  pShape)

Add a btCollisionShape the a collection for deletion upon destruction.

Parameters
[in]pShapea pointer to a btCollisionShape; do nothing if NULL

Definition at line 216 of file tgWorldBulletPhysicsImpl.cpp.

void tgWorldBulletPhysicsImpl::addConstraint ( btTypedConstraint *  pConstaint)

Add a btTypedConstraint to a collection for deletion upon destruction. Also add to the physics.

Parameters
[in]pConstrainta pointer to a btTypedConstraint; do nothing if NULL

Here is the caller graph for this function:

void tgWorldBulletPhysicsImpl::deleteCollisionShape ( btCollisionShape *  pShape)

Immediately delete a collision shape to avoid leaking memory during a rial

Parameters
[in]pShapea pointer to a btCollisionShape; do nothing if NULL

Definition at line 231 of file tgWorldBulletPhysicsImpl.cpp.

btDynamicsWorld& tgWorldBulletPhysicsImpl::dynamicsWorld ( ) const
inline

Return a reference to the dynamics world.

Returns
a reference to the dynamics world

Definition at line 80 of file tgWorldBulletPhysicsImpl.h.

Here is the caller graph for this function:

void tgWorldBulletPhysicsImpl::step ( double  dt)
virtual

Advance the simulation.

Parameters
[in]dtthe number of seconds since the previous call; must be positive

Implements tgWorldImpl.

Definition at line 202 of file tgWorldBulletPhysicsImpl.cpp.


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