PackageBox2D.Common.Math
Classpublic class b2Sweep
Sourceb2Sweep.as

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.



Public Properties
 PropertyDefined by
  a : Number
World angle
b2Sweep
  a0 : Number
World angle
b2Sweep
  c : b2Vec2
Center world position
b2Sweep
  c0 : b2Vec2
Center world position
b2Sweep
  localCenter : b2Vec2
Local center of mass position
b2Sweep
  t0 : Number
Time interval = [t0,1], where t0 is in [0,1]
b2Sweep
Public Methods
 MethodDefined by
  
Advance(t:Number):void
Advance the sweep forward, yielding a new initial state.
b2Sweep
  
GetXForm(xf:b2XForm, t:Number):void
Get the interpolated transform at a specific time.
b2Sweep
Property detail
aproperty
public var a:Number

World angle

a0property 
public var a0:Number

World angle

cproperty 
public var c:b2Vec2

Center world position

c0property 
public var c0:b2Vec2

Center world position

localCenterproperty 
public var localCenter:b2Vec2

Local center of mass position

t0property 
public var t0:Number

Time interval = [t0,1], where t0 is in [0,1]

Method detail
Advance()method
public function Advance(t:Number):void

Advance the sweep forward, yielding a new initial state.

Parameters
t:Number — the new initial time.
GetXForm()method 
public function GetXForm(xf:b2XForm, t:Number):void

Get the interpolated transform at a specific time.

Parameters
xf:b2XForm — the normalized time in [0,1].
 
t:Number