Options
All
  • Public
  • Public/Protected
  • All
Menu

The class manages contact between two shapes. A contact exists for each overlapping AABB in the broad-phase (except if filtered). Therefore a contact object may exist that has no contact points.

Hierarchy

  • b2Contact

Index

Constructors

constructor

  • Constructor

    Returns b2Contact

Methods

FlagForFiltering

  • FlagForFiltering(): void
  • Flag this contact for filtering. Filtering will occur the next time step.

    Returns void

GetFixtureA

  • Get the first fixture in this contact.

    Returns b2Fixture

    First fixture in this contact.

GetFixtureB

  • Get the second fixture in this contact.

    Returns b2Fixture

    Second fixture in this contact.

GetManifold

  • Get the contact manifold. Do not modify the manifold unless you understand the internals of Box2D.

    Returns b2Manifold

    Contact manifold.

GetNext

  • Get the next contact in the world's contact list.

    Returns b2Contact

    Next contact in the world's contact list.

GetWorldManifold

  • Get the world manifold.

    Parameters

    Returns void

    World manifold.

IsContinuous

  • IsContinuous(): boolean
  • Does this contact generate TOI events for continuous simulation.

    Returns boolean

    True for continous, otherwise false.

IsEnabled

  • IsEnabled(): boolean
  • Has this contact been disabled?

    Returns boolean

    True if disabled, otherwise false.

IsSensor

  • IsSensor(): boolean
  • Is this contact a sensor?

    Returns boolean

    True if sensor, otherwise false.

IsTouching

  • IsTouching(): boolean
  • Is this contact touching.

    Returns boolean

    True if contact is touching, otherwise false.

SetEnabled

  • SetEnabled(flag: boolean): void
  • Enable/disable this contact. This can be used inside the pre-solve contact listener. The contact is only disabled for the current time step (or sub-step in continuous collision).

    Parameters

    • flag: boolean

      True to enable, false to disable.

    Returns void

SetSensor

  • SetSensor(sensor: boolean): void
  • Change this to be a sensor or-non-sensor contact.

    Parameters

    • sensor: boolean

      True to be sensor, false to not be a sensor.

    Returns void

Generated using TypeDoc