FluidArbiter

Arbiternape.dynamics.FluidArbiter (final class)

Fluid interaction subtype for Arbiter.

Instance Members

nape
position: nape.geom.Vec2

Centre of buoyancy for fluid interaction.

This value can be modified during a related PreListener handler.


nape
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.


nape
buoyancyImpulse(?body: nape.phys.Body = null): nape.geom.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.

Name Type Default Description
body nape.phys.Body null The body to query impulse for. (default null)
Returns Description
nape.geom.Vec3 The buoyancy impulse for given body.

nape
dragImpulse(?body: nape.phys.Body = null): nape.geom.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.

Name Type Default Description
body nape.phys.Body null The body to query impulse for. (default null)
Returns Description
nape.geom.Vec3 The drag impulse for given body.

nape
totalImpulse(?body: nape.phys.Body = null, ?freshOnly: Bool = false): nape.geom.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.

Name Type Default Description
body nape.phys.Body null The body to query impulse for. (default null)
freshOnly Bool false This parameter is unused for FluidArbiters. (default false)
Returns Description
nape.geom.Vec3 The total impulse for given body.

nape
new(): Void

@private

Private Members

Metadata

Name Parameters
:final -