class nape.dynamics.FluidArbiter extends Arbiter

Available on all platforms

Fluid interaction subtype for Arbiter.

Instance Fields

var overlap:Float

Overlap area of Shapes in fluid interaction. *

* This value is strictly positive, and represents the amount of overlap between the Shapes * used in buoyancy computations. *

* This value can be modified during a related PreListener handler.

var position:Vec2

Centre of buoyancy for fluid interaction. *

* This value can be modified during a related PreListener handler.

function new():Void

@private

function buoyancyImpulse(?body:Body = null):Vec3

Determine impulse on a given body due to buoyancy. *

* If the body is null, then the buoyancy impulse will be returned without consideration to any specific * body involved, and no angular impulses can be derived. * *

body

The body to query impulse for. (default null) *

returns

The buoyancy impulse for given body. *

function dragImpulse(?body:Body = null):Vec3

Determine impulse on a given body due to fluid drag. *

* If the body is null, then the drag impulse will be returned without consideration to any specific * body involved. * *

body

The body to query impulse for. (default null) *

returns

The drag impulse for given body. *

function totalImpulse(?body:Body = null, ?freshOnly:Bool = false):Vec3

Determine total impulse on a given body due to fluid interaction. *

* If the body is null, then the total impulse will be computed without consideration to any specific * body involved, and no angular impulses can be derived for the linear portion of the impulses. * *

body

The body to query impulse for. (default null) *

freshOnly

This parameter is unused for FluidArbiters. (default false) *

returns

The total impulse for given body. *