FluidProperties providing shared parameters for fluid interaction.

Constructor

@:value({ viscosity : 1, density : 1 })new(density:Float = 1, viscosity:Float = 1)

Construct a new FluidProperties objects.

Parameters:

density

The density of the fluid in g/px/px. (default 1)

viscosity

The viscosity of the fluid for drag computations in kg/px/s (default 1)

Returns:

The constructed FluidProperties object.

Variables

@:value(null)zpp_inner:ZPP_FluidProperties = null

@private

read onlyuserData:Dynamic<Dynamic>

Dynamic object for user to store additional data.

This object cannot be set, only its dynamically created properties may be set. In AS3 the type of this property is &#42

This object will be lazily constructed so that until accessed for the first time, will be null internally.

read onlyshapes:ShapeList

Set of all active shapes using this object.

Activeness of a shape in the sense that the Shape's Body is inside of a Space.

This list is immutable.

density:Float

Density of fluid.

This value, like Material density is of g/pixel/pixel.

viscosity:Float

Viscosity of fluid.

This value is used in drag comutations, the higher the viscosity the more quickly objects will come to rest in the fluid.

gravity:Null<Vec2>

Local gravity for buoyancy computations.

When this value is not null, it will be used in place of the Space gravity when performing buoyancy computations.

Methods

copy():FluidProperties

Produce a copy of this FluidProperties object.

The copied object will be identical in all properties with the the copied userData being assigned the same fields as 'this' Shape with the same values copied over by reference for object types.

Returns:

The copied FluidProperties.

@:keeptoString():String

@private