Encapsulates the details of creating a bullet simulation.
More...
Encapsulates the details of creating a bullet simulation.
◆ Step()
void BulletEngine::Step |
( |
const btScalar |
_timestep | ) |
|
Step the simulation forward.
- Parameters
-
_timestep | The 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
-
_m | The object pointer. |
_j | The component index (0 for base by default). |
- Returns
- An OpenGL transform matrix describing object _i's current position and orientation.
◆ AddRobot()
Add a robot to the simulation.
- Parameters
-
- Returns
- The bullet representation of _robot.
- Todo:
- We need a way to set initial velocities for the robot.
◆ AddMultiBody()
Add a non-robot multibody to the simulation.
- Parameters
-
- 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
-
_gravityVec | Is 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
-
The documentation for this class was generated from the following files:
- BulletEngine.h
- BulletEngine.cpp