Remembers the local coordinate system of a MassObject. Used during collision checking to compare previous and current locations of objects.

Properties

cm_body_: Vector = Vector.ORIGIN

center of mass in body coordinates

cosAngle_: number = 1.0

cosine of angle.

loc_world_: Vector = Vector.ORIGIN
sinAngle_: number = 0.0

sine of angle

Methods

  • Returns the world coordinates of the given body coordinates point, based on current position of the object.

    Parameters

    Returns Vector

    the point in world coordinates

  • Sets the values that define the local coordinate system.

    Parameters

    • cm_body: Vector

      center of mass of the object in body coordinates

    • loc_world: Vector

      location of center of mass in world coordinates

    • sinAngle: number

      sine of angle of rotation about center of mass

    • cosAngle: number

      cosine of angle of rotation about center of mass

    Returns void

  • Returns the body coordinates of the given world coordinates point, based on current position of the object.

    Parameters

    Returns Vector

    the point in body coordinates

Generated using TypeDoc