Options
All
  • Public
  • Public/Protected
  • All
Menu

Class b2World

Hierarchy

  • b2World

Index

Constructors

Properties

Methods

Constructors

constructor

  • Parameters

    • gravity: XY

    Returns b2World

Properties

m_allowSleep

m_allowSleep: boolean = true

m_bodyCount

m_bodyCount: number = 0

m_bodyList

m_bodyList: b2Body | null = null

m_clearForces

m_clearForces: boolean = true

Readonly m_contactManager

m_contactManager: b2ContactManager = new b2ContactManager()

m_continuousPhysics

m_continuousPhysics: boolean = true

m_controllerCount

m_controllerCount: number = 0

m_controllerList

m_controllerList: b2Controller | null = null

m_debugDraw

m_debugDraw: b2Draw | null = null

m_destructionListener

m_destructionListener: b2DestructionListener | null = null

Readonly m_gravity

m_gravity: b2Vec2 = new b2Vec2()

m_inv_dt0

m_inv_dt0: number = 0

Readonly m_island

m_island: b2Island = new b2Island()

m_jointCount

m_jointCount: number = 0

m_jointList

m_jointList: b2Joint | null = null

m_locked

m_locked: boolean = false

m_newFixture

m_newFixture: boolean = false

m_particleSystemList

m_particleSystemList: b2ParticleSystem | null = null

Readonly m_profile

m_profile: b2Profile = new b2Profile()

m_stepComplete

m_stepComplete: boolean = true

m_subStepping

m_subStepping: boolean = false

m_warmStarting

m_warmStarting: boolean = true

Readonly s_stack

s_stack: Array<b2Body | null> = []

Static Private DrawDebugData_s_color

DrawDebugData_s_color: b2Color = new b2Color(0, 0, 0)

Static Private DrawDebugData_s_vs

DrawDebugData_s_vs: b2Vec2[] = b2Vec2.MakeArray(4)

Static Private DrawDebugData_s_xf

DrawDebugData_s_xf: b2Transform = new b2Transform()

Static Private DrawJoint_s_c

DrawJoint_s_c: b2Color = new b2Color()

Static Private DrawJoint_s_color

DrawJoint_s_color: b2Color = new b2Color(0.5, 0.8, 0.8)

Static Private DrawJoint_s_p1

DrawJoint_s_p1: b2Vec2 = new b2Vec2()

Static Private DrawJoint_s_p2

DrawJoint_s_p2: b2Vec2 = new b2Vec2()

Static Private DrawShape_s_ghostColor

DrawShape_s_ghostColor: b2Color = new b2Color()

Static Private QueryFixtureShape_s_aabb

QueryFixtureShape_s_aabb: b2AABB = new b2AABB()

Static Private RayCast_s_input

RayCast_s_input: b2RayCastInput = new b2RayCastInput()

Static Private RayCast_s_output

RayCast_s_output: b2RayCastOutput = new b2RayCastOutput()

Static Private RayCast_s_point

RayCast_s_point: b2Vec2 = new b2Vec2()

Static Private SolveTOI_s_backup

SolveTOI_s_backup: b2Sweep = new b2Sweep()

Static Private SolveTOI_s_backup1

SolveTOI_s_backup1: b2Sweep = new b2Sweep()

Static Private SolveTOI_s_backup2

SolveTOI_s_backup2: b2Sweep = new b2Sweep()

Static Private SolveTOI_s_subStep

SolveTOI_s_subStep: b2TimeStep = new b2TimeStep()

Static Private SolveTOI_s_toi_input

SolveTOI_s_toi_input: b2TOIInput = new b2TOIInput()

Static Private SolveTOI_s_toi_output

SolveTOI_s_toi_output: b2TOIOutput = new b2TOIOutput()

Static Private Step_s_step

Step_s_step: b2TimeStep = new b2TimeStep()

Static Private Step_s_stepTimer

Step_s_stepTimer: b2Timer = new b2Timer()

Static Private Step_s_timer

Step_s_timer: b2Timer = new b2Timer()

Methods

AddController

  • Parameters

    Returns b2Controller

CalculateReasonableParticleIterations

  • CalculateReasonableParticleIterations(timeStep: number): number
  • Parameters

    • timeStep: number

    Returns number

ClearForces

  • ClearForces(): void
  • Returns void

CreateBody

  • Parameters

    Returns b2Body

CreateJoint

CreateParticleSystem

DestroyBody

  • DestroyBody(b: b2Body): void
  • Parameters

    Returns void

DestroyJoint

  • Parameters

    Returns void

DestroyParticleSystem

  • Parameters

    Returns void

DrawDebugData

  • DrawDebugData(): void
  • Returns void

DrawJoint

  • Parameters

    Returns void

DrawParticleSystem

  • Parameters

    Returns void

DrawShape

  • Parameters

    Returns void

Dump

  • Dump(log: (format: string, ...args: any[]) => void): void
  • Parameters

    • log: (format: string, ...args: any[]) => void
        • (format: string, ...args: any[]): void
        • Parameters

          • format: string
          • Rest ...args: any[]

          Returns void

    Returns void

GetAllowSleeping

  • GetAllowSleeping(): boolean
  • Returns boolean

GetAutoClearForces

  • GetAutoClearForces(): boolean
  • Returns boolean

GetBodyCount

  • GetBodyCount(): number
  • Returns number

GetBodyList

  • GetBodyList(): b2Body | null
  • Returns b2Body | null

GetContactCount

  • GetContactCount(): number
  • Returns number

GetContactList

  • Returns b2Contact | null

GetContactManager

  • Returns b2ContactManager

GetContinuousPhysics

  • GetContinuousPhysics(): boolean
  • Returns boolean

GetGravity

  • GetGravity(): Readonly<b2Vec2>
  • Returns Readonly<b2Vec2>

GetJointCount

  • GetJointCount(): number
  • Returns number

GetJointList

  • Returns b2Joint | null

GetParticleSystemList

  • Returns b2ParticleSystem | null

GetProfile

  • Returns b2Profile

GetProxyCount

  • GetProxyCount(): number
  • Returns number

GetSubStepping

  • GetSubStepping(): boolean
  • Returns boolean

GetTreeBalance

  • GetTreeBalance(): number
  • Returns number

GetTreeHeight

  • GetTreeHeight(): number
  • Returns number

GetTreeQuality

  • GetTreeQuality(): number
  • Returns number

GetWarmStarting

  • GetWarmStarting(): boolean
  • Returns boolean

IsLocked

  • IsLocked(): boolean
  • Returns boolean

QueryAABB

  • Parameters

    Returns void

  • Parameters

    Returns void

QueryAllAABB

  • Parameters

    Returns b2Fixture[]

QueryAllFixturePoint

  • Parameters

    Returns b2Fixture[]

QueryAllFixtureShape

  • Parameters

    Returns b2Fixture[]

QueryAllPointAABB

  • Parameters

    Returns b2Fixture[]

QueryFixturePoint

  • Parameters

    Returns void

  • Parameters

    Returns void

QueryFixtureShape

QueryPointAABB

  • Parameters

    Returns void

  • Parameters

    Returns void

RayCast

  • Parameters

    Returns void

  • Parameters

    Returns void

RayCastAll

  • Parameters

    Returns b2Fixture[]

RayCastOne

  • Parameters

    • point1: XY
    • point2: XY

    Returns b2Fixture | null

RemoveController

  • Parameters

    Returns b2Controller

SetAllowSleeping

  • SetAllowSleeping(flag: boolean): void
  • Parameters

    • flag: boolean

    Returns void

SetAutoClearForces

  • SetAutoClearForces(flag: boolean): void
  • Parameters

    • flag: boolean

    Returns void

SetContactFilter

  • Parameters

    Returns void

SetContactListener

  • Parameters

    Returns void

SetContinuousPhysics

  • SetContinuousPhysics(flag: boolean): void
  • Parameters

    • flag: boolean

    Returns void

SetDebugDraw

  • SetDebugDraw(debugDraw: b2Draw | null): void
  • Parameters

    Returns void

SetDestructionListener

  • Parameters

    Returns void

SetGravity

  • SetGravity(gravity: XY, wake?: boolean): void
  • Parameters

    • gravity: XY
    • Default value wake: boolean = true

    Returns void

SetSubStepping

  • SetSubStepping(flag: boolean): void
  • Parameters

    • flag: boolean

    Returns void

SetWarmStarting

  • SetWarmStarting(flag: boolean): void
  • Parameters

    • flag: boolean

    Returns void

ShiftOrigin

  • ShiftOrigin(newOrigin: XY): void
  • Parameters

    • newOrigin: XY

    Returns void

Solve

  • Parameters

    Returns void

SolveTOI

  • Parameters

    Returns void

Step

  • Step(dt: number, velocityIterations: number, positionIterations: number, particleIterations?: number): void
  • Parameters

    • dt: number
    • velocityIterations: number
    • positionIterations: number
    • Default value particleIterations: number = this.CalculateReasonableParticleIterations(dt)

    Returns void

Private QueryAABB

Private QueryFixturePoint

Private QueryFixtureShape

Private QueryPointAABB

Private RayCast

Static Private JointCreate

  • Parameters

    Returns b2Joint

Static Private JointDestroy

  • JointDestroy(joint: b2Joint): void
  • Parameters

    Returns void

Generated using TypeDoc