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.

Constructors

Properties

Methods

Constructors

Properties

a: number

World angle.

a0: number

World angle.

Center world position.

c0: b2Vec2

Center world position.

localCenter: b2Vec2

Local center of mass position.

t0: b2Vec2

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

Methods

  • Advance the sweep forward, yielding a new initial state.

    Parameters

    • t: number

    Returns void

    The new initial time.

  • Get the interpolated transform at a specific time.

    Parameters

    • xf: b2Transform

      Transform at specified time, this is an out parameter.

    • alpha: number

      Is a factor in [0,1], where 0 indicates t0.

    Returns void