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

#include <b2_math.h>

Public Member Functions

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

Public Attributes

float a
 world angles More...
 
float a0
 
float 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 368 of file b2_math.h.

Member Function Documentation

◆ Advance()

void b2Sweep::Advance ( float  alpha)
inline

Advance the sweep forward, yielding a new initial state.

Parameters
alphathe new initial time.

Definition at line 697 of file b2_math.h.

◆ GetTransform()

void b2Sweep::GetTransform ( b2Transform transform,
float  beta 
) const
inline

Get the interpolated transform at a specific time.

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

Definition at line 687 of file b2_math.h.

◆ Normalize()

void b2Sweep::Normalize ( )
inline

Normalize the angles.

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

Definition at line 707 of file b2_math.h.

Member Data Documentation

◆ a

float b2Sweep::a

world angles

Definition at line 384 of file b2_math.h.

◆ a0

float b2Sweep::a0

Definition at line 384 of file b2_math.h.

◆ alpha0

float b2Sweep::alpha0

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

Definition at line 388 of file b2_math.h.

◆ c

b2Vec2 b2Sweep::c

center world positions

Definition at line 383 of file b2_math.h.

◆ c0

b2Vec2 b2Sweep::c0

Definition at line 383 of file b2_math.h.

◆ localCenter

b2Vec2 b2Sweep::localCenter

local center of mass position

Definition at line 382 of file b2_math.h.


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


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:22