Class b2Controller

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

Hierarchy

Index

Properties

Methods

Properties

public m_bodyCount: number

Body count.

public m_bodyList: b2ControllerEdge

List of bodies.

Methods

public AddBody(body: b2Body)

Adds a body to the controller.

Parameters

public Clear()

Removes all bodies from the controller.

public Draw(debugDraw: b2DebugDraw)

Debug drawing.

Parameters

public GetBodyList(): b2ControllerEdge

Gets the body list.

Returns

b2ControllerEdge

Body list.

public GetNext(): b2Controller

Gets the next controller.

Returns

b2Controller

Next controller.

public GetWorld(): b2World

Gets the world.

Returns

b2World

World.

public RemoveBody(body: b2Body)

Removes a body from the controller.

Parameters

  • body: b2Body

    Body to remove from this controller.

public Step(step: any)

Step

Parameters

  • step: any

    b2TimeStep -> Private internal class. Not sure why this is exposed.