Options
All
  • Public
  • Public/Protected
  • All
Menu

Calculates buoyancy forces for fluids in the form of a half plane.

Hierarchy

Index

Constructors

constructor

Properties

angularDrag

angularDrag: number

Linear drag co-efficient.

default

= 1

density

density: number

The fluid density.

default

= 0

gravity

gravity: b2Vec2

Gravity vector, if the world's gravity is not used.

default

= null

linearDrag

linearDrag: number

Linear drag co-efficient.

default

= 2

m_bodyCount

m_bodyCount: number

Body count.

m_bodyList

m_bodyList: b2ControllerEdge

List of bodies.

normal

normal: b2Vec2

The outer surface normal.

offset

offset: number

The height of the fluid surface along the normal.

default

= 0

useDensity

useDensity: boolean

If false, bodies are assumed to be uniformly dense, otherwise use the shapes densities.

default

= false.

useWorldGravity

useWorldGravity: boolean

If true, gravity is taken from the world instead of the gravity parameter.

default

= true.

velocity

velocity: b2Vec2

Fluid velocity, for drag calculations.

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

Step

  • Step(step: any): void
  • Step

    Parameters

    • step: any

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

    Returns void

Generated using TypeDoc