# b2Sweep Struct Reference

`#include <b2Math.h>`

List of all members.

## Public Member Functions
void | GetTransform (b2Transform *xf, float32 alpha) const
void | Advance (float32 t)
## Public Attributes
b2Vec2 | localCenter
| local center of mass position
b2Vec2 | c0
b2Vec2 | c
| center world positions
float32 | a0
float32 | a
| world angles

## Detailed Description

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.

## Member Function Documentation

void b2Sweep::Advance | ( | float32 | t | ) | `[inline]`

Advance the sweep forward, yielding a new initial state.

Parameters:

  | t | the new initial time.

void b2Sweep::GetTransform | ( | b2Transform * | xf,
|  | float32 | alpha |
| ) |  |  | const`[inline]`

Get the interpolated transform at a specific time.

Parameters:

  | alpha | is a factor in [0,1], where 0 indicates t0.

## Member Data Documentation

float32 b2Sweep::a

world angles

float32 b2Sweep::a0

b2Vec2 b2Sweep::c

center world positions

b2Vec2 b2Sweep::c0

b2Vec2 b2Sweep::localCenter

local center of mass position

The documentation for this struct was generated from the following file:

- Box2D/Box2D/Common/b2Math.h