Public Member Functions | Public Attributes | List of all members
b2Sweep Struct Reference

#include <b2Math.h>

Public Member Functions

void Advance (float32 alpha)
 
void GetTransform (b2Transform *xfb, float32 beta) const
 
void Normalize ()
 Normalize the angles. More...
 

Public Attributes

float32 a
 world angles More...
 
float32 a0
 
float32 alpha0
 
b2Vec2 c
 center world positions More...
 
b2Vec2 c0
 
b2Vec2 localCenter
 local center of mass position More...
 

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.

Definition at line 379 of file b2Math.h.

Member Function Documentation

void b2Sweep::Advance ( float32  alpha)
inline

Advance the sweep forward, yielding a new initial state.

Parameters
alphathe new initial time.

Definition at line 701 of file b2Math.h.

void b2Sweep::GetTransform ( b2Transform xfb,
float32  beta 
) const
inline

Get the interpolated transform at a specific time.

Parameters
betais a factor in [0,1], where 0 indicates alpha0.

Definition at line 691 of file b2Math.h.

void b2Sweep::Normalize ( )
inline

Normalize the angles.

Normalize an angle in radians to be between -pi and pi.

Definition at line 711 of file b2Math.h.

Member Data Documentation

float32 b2Sweep::a

world angles

Definition at line 394 of file b2Math.h.

float32 b2Sweep::a0

Definition at line 394 of file b2Math.h.

float32 b2Sweep::alpha0

Fraction of the current time step in the range [0,1] c0 and a0 are the positions at alpha0.

Definition at line 398 of file b2Math.h.

b2Vec2 b2Sweep::c

center world positions

Definition at line 393 of file b2Math.h.

b2Vec2 b2Sweep::c0

Definition at line 393 of file b2Math.h.

b2Vec2 b2Sweep::localCenter

local center of mass position

Definition at line 392 of file b2Math.h.


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


mvsim
Author(s):
autogenerated on Fri May 7 2021 03:05:52