Options
All
  • Public
  • Public/Protected
  • All
Menu

Class b2GravityController

Applies simplified gravity between every pair of bodies

Hierarchy

Index

Properties

G

G: number = 1

Specifies the strength of the gravitiation force

invSqr

invSqr: boolean = true

If true, gravity is proportional to r^-2, otherwise r^-1

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

Static Private Step_s_f

Step_s_f: b2Vec2 = new b2Vec2()

Methods

AddBody

  • Adds a body to the controller list.

    Parameters

    Returns void

Clear

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

    Returns void

Draw

  • Parameters

    Returns void

GetBodyList

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

Step

  • see

    b2Controller::Step

    Parameters

    Returns void

Generated using TypeDoc