Options
All
  • Public
  • Public/Protected
  • All
Menu

Applies top down linear damping to the controlled bodies The damping is calculated by multiplying velocity by a matrix in local co-ordinates.

Hierarchy

Index

Constructors

constructor

Properties

T

Tensor to use in damping model.

m_bodyCount

m_bodyCount: number

Body count.

m_bodyList

m_bodyList: b2ControllerEdge

List of bodies.

maxTimeStep

maxTimeStep: number

Set this to a positive number to clamp the maximum amount of damping done.

default

= 0

Methods

AddBody

  • Adds a body to the controller.

    Parameters

    Returns void

Clear

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

    Returns void

Draw

  • Debug drawing.

    Parameters

    Returns void

GetBodyList

GetNext

  • Gets the next controller.

    Returns b2Controller

    Next controller.

GetWorld

  • Gets the world.

    Returns b2World

    World.

RemoveBody

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

    Parameters

    • body: b2Body

      Body to remove from this controller.

    Returns void

SetAxisAligned

  • SetAxisAligned(xDamping: number, yDamping: number): void
  • Helper function to set T in a common case.

    Parameters

    • xDamping: number

      x

    • yDamping: number

      y

    Returns void

Step

  • Step(step: any): void
  • see

    b2Controller.Step

    Parameters

    • step: any

    Returns void

Generated using TypeDoc