Ctrl+K

Sweep

Declaration

public struct tainicom.Aether.Physics2D.Common.Sweep

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.

Fields

A

World angles

float A

A0

float A0

Alpha0

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

float Alpha0

C

Center world positions

Vector2 C

C0

Vector2 C0

LocalCenter

Local center of mass position

Vector2 LocalCenter

Methods

GetTransform

Get the interpolated transform at a specific time.

void GetTransform(out Transform xfb, float beta)

Parameters:

Name Type Description
xfb out tainicom.Aether.Physics2D.Common.Transform The transform.
beta System.Single beta is a factor in [0,1], where 0 indicates alpha0.

Advance

Advance the sweep forward, yielding a new initial state.

void Advance(float alpha)

Parameters:

Name Type Description
alpha System.Single new initial time..

Normalize

Normalize the angles.

void Normalize()