Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Hierarchy

  • b2Sweep

Index

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(t: number): void
  • Advance the sweep forward, yielding a new initial state.

    t

    The new initial time.

    Parameters

    • t: number

    Returns void

  • 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

Generated using TypeDoc