PPL API Reference
Overview Core Algorithm Abstractions Utilities Parallel Methods
Modules Class Hierarchy Classes Functions
Todo List Bug List Dead Code
List of all members
BulletEngine Class Referencefinal

Encapsulates the details of creating a bullet simulation. More...

Public Member Functions

Construction
 BulletEngine (MPProblem *const _problem)
 
 ~BulletEngine ()
 
Simulation Interface
void Step (const btScalar _timestep)
 
Transform Access
glutils::transform GetObjectTransform (MultiBody *const _m, const size_t _j=0) const
 
Modifiers
BulletModelAddRobot (Robot *const _robot)
 
BulletModelAddMultiBody (MultiBody *const _m)
 
void SetGravity (const btVector3 &_gravityVec)
 
void RebuildObject (MultiBody *const _m)
 

Detailed Description

Encapsulates the details of creating a bullet simulation.

Member Function Documentation

◆ Step()

void BulletEngine::Step ( const btScalar  _timestep)

Step the simulation forward.

Parameters
_timestepThe total length of time to advance the simulation.

◆ GetObjectTransform()

glutils::transform BulletEngine::GetObjectTransform ( MultiBody *const  _m,
const size_t  _j = 0 
) const

Get the current transform for a given object.

Parameters
_mThe object pointer.
_jThe component index (0 for base by default).
Returns
An OpenGL transform matrix describing object _i's current position and orientation.

◆ AddRobot()

BulletModel * BulletEngine::AddRobot ( Robot *const  _robot)

Add a robot to the simulation.

Parameters
_robotThe robot to add.
Returns
The bullet representation of _robot.
Todo:
We need a way to set initial velocities for the robot.

◆ AddMultiBody()

BulletModel * BulletEngine::AddMultiBody ( MultiBody *const  _m)

Add a non-robot multibody to the simulation.

Parameters
_mThe multibody to add.
Returns
The bullet representation of _m.

◆ SetGravity()

void BulletEngine::SetGravity ( const btVector3 &  _gravityVec)

Set the gravity in the world (this will also set it for all bodies)

Parameters
_gravityVecIs simply the 3-vector representing (x,y,z) gravity

◆ RebuildObject()

void BulletEngine::RebuildObject ( MultiBody *const  _m)

Request that the physics model of an object be rebuilt. The rebuild will occur on the next call to Step.

Parameters
_mThe object to rebuild.

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