Box2D
2.2.1
Box2D API Reference for Kobold2D developers
|
#include <b2Math.h>
Public Member Functions | |
void | GetTransform (b2Transform *xfb, float32 beta) const |
void | Advance (float32 alpha) |
void | Normalize () |
Normalize the angles. | |
Public Attributes | |
b2Vec2 | localCenter |
local center of mass position | |
b2Vec2 | c0 |
b2Vec2 | c |
center world positions | |
float32 | a0 |
float32 | a |
world angles | |
float32 | alpha0 |
This describes the motion of a body/shape for TOI computation. Shapes are defined with respect to the body origin, which may no coincide with the center of mass. However, to support dynamics we must interpolate the center of mass position.
void b2Sweep::Advance | ( | float32 | alpha | ) | [inline] |
Advance the sweep forward, yielding a new initial state.
alpha | the new initial time. |
void b2Sweep::GetTransform | ( | b2Transform * | xfb, |
float32 | beta | ||
) | const [inline] |
Get the interpolated transform at a specific time.
beta | is a factor in [0,1], where 0 indicates alpha0. |
void b2Sweep::Normalize | ( | ) | [inline] |
Normalize the angles.
Normalize an angle in radians to be between -pi and pi.
float32 b2Sweep::a |
world angles
float32 b2Sweep::alpha0 |
Fraction of the current time step in the range [0,1] c0 and a0 are the positions at alpha0.
center world positions
local center of mass position