Options
All
  • Public
  • Public/Protected
  • All
Menu

A manifold for two touching convex shapes. Box2D supports multiple types of contact: - clip point versus plane with radius - point versus point with radius (circles) The local point usage depends on the manifold type: -e_circles: the local center of circleA -e_faceA: the center of faceA -e_faceB: the center of faceB Similarly the local normal usage: -e_circles: not used -e_faceA: the normal on polygonA -e_faceB: the normal on polygonB We store contacts in this way so that position correction can account for movement, which is critical for continuous physics. All contact scenarios must be expressed in one of these types. This structure is stored across time steps, so we keep it small.

Hierarchy

  • b2Manifold

Index

Constructors

constructor

  • Creates a new manifold.

    Returns b2Manifold

Properties

m_localPlaneNormal

m_localPlaneNormal: b2Vec2

Not used for Type e_points

m_localPoint

m_localPoint: b2Vec2

Usage depends on manifold type

m_pointCount

m_pointCount: number

The number of manifold points

m_points

m_points: b2ManifoldPoint[]

The points of contact

m_type

m_type: number

Manifold type.

Static e_circles

e_circles: number

Circles

Static e_faceA

e_faceA: number

Face A

Static e_faceB

e_faceB: number

Face B

Methods

Copy

  • Copies the manifold.

    Returns b2Manifold

    Copy of this manifold.

Reset

  • Reset(): void
  • Resets this manifold.

    Returns void

Set

  • Sets this manifold from another manifold.

    Parameters

    Returns void

Generated using TypeDoc