Options
All
  • Public
  • Public/Protected
  • All
Menu

Class b2Controller

Base class for controllers. Controllers are a convience for encapsulating common per-step functionality.

Hierarchy

Index

Properties

m_bodyCount

m_bodyCount: number = 0

m_bodyList

m_bodyList: b2ControllerEdge | null = null

m_next

m_next: b2Controller | null = null

m_prev

m_prev: b2Controller | null = null

Methods

AddBody

  • Adds a body to the controller list.

    Parameters

    Returns void

Clear

  • Clear(): void
  • Removes all bodies from the controller list.

    Returns void

Abstract Draw

  • Draw(debugDraw: b2Draw): void
  • Controllers override this to provide debug drawing.

    Parameters

    Returns void

GetBodyList

  • Get the attached body list

    Returns b2ControllerEdge | null

GetNext

  • Get the next controller in the world's body list.

    Returns b2Controller | null

GetPrev

  • Get the previous controller in the world's body list.

    Returns b2Controller | null

RemoveBody

  • RemoveBody(body: b2Body): void
  • Removes a body from the controller list.

    Parameters

    Returns void

Abstract Step

  • Controllers override this to implement per-step functionality.

    Parameters

    Returns void

Generated using TypeDoc