C# Class LostPolygon.DynamicWaterSystem.DynamicWater

Inheritance: FluidVolume, IDynamicWaterSettings, IDynamicWaterMeshSettings
Datei anzeigen Open project: cortexarts/Feiko-Unity-OLD Class Usage Examples

Public Properties

Property Type Description
UpdateWhenNotVisible bool
UsePlaneCollider bool

Public Methods

Method Description
CreateSplash ( Vector3 start, Vector3 end, float radius, float force ) : void

Creates a circular drop splashes on the fluid surface across the line.

CreateSplash ( Vector3 center, float radius, float force ) : void

Creates a circular drop splash on the fluid surface (if available).

ErodeObstructionField ( int iterations, byte field ) : byte[]
GetObstructionInfoArray ( GameObject gameObjects ) : ObstructionInfo[]

Gets the info required for obstruction mask generation for an array of GameObject.

GetWaterLevel ( Vector3 position ) : float

Returns water level at the given position in world space.

GetWaterLevel ( float x, float z ) : float

Returns water level at the given position in world space.

GetWaterLevel ( float x, float y, float z ) : float

Returns water level at the given position in world space.

MaxResolution ( ) : int

Returns maximum resolution (along largest side) possible for this water plane dimensions.

MaxSpeed ( ) : float

Returns maximum wave propagation speed possible for this quality level.

RecalculateObstructions ( ) : void

Recalculate the static obstructions.

Protected Methods

Method Description
CreatePlaneCollider ( ) : void

Create the child gameObject for interacting with water plane.

GetGameObjectsWithTagInBounds ( string searchTag, Bounds bounds ) : UnityEngine.GameObject[]

Returns GameObjects with tag within Bounds .

Initialize ( ) : void

Initializes the required components and creates initial Mesh.

PropertyChanged ( ) : void

Called when any property connected with the mesh is changed.

UpdateCollider ( ) : void

Update the collider boundaries.

Private Methods

Method Description
ClearMeshes ( ) : void

Removes the meshes from the memory.

CreateSplashLine ( Vector2Int start, Vector2Int end, float radius, float force ) : void
CreateSplashNormalized ( Vector2 center, float radius, float force ) : void

Creates a circular drop splash on the fluid surface (if available).

FixedUpdate ( ) : void
OnDestroy ( ) : void
OnDrawGizmos ( ) : void
SizeToGridResolution ( Vector2 size, int resolution ) : Vector2Int

The size to grid resolution.

Start ( ) : void
StepSimulation ( ) : void
UpdateComponents ( ) : void
UpdateProperties ( ) : void

Called when any property that defines the water simulation, changes.

Method Details

CreatePlaneCollider() protected method

Create the child gameObject for interacting with water plane.
protected CreatePlaneCollider ( ) : void
return void

CreateSplash() public method

Creates a circular drop splashes on the fluid surface across the line.
public CreateSplash ( Vector3 start, Vector3 end, float radius, float force ) : void
start Vector3 /// The start point in world space coordinates. ///
end Vector3 /// The end point in world space coordinates. ///
radius float /// The radius of the splash in world space units. ///
force float /// The amount of force applied to create the splash. ///
return void

CreateSplash() public method

Creates a circular drop splash on the fluid surface (if available).
public CreateSplash ( Vector3 center, float radius, float force ) : void
center Vector3 /// The center of the splash in world space coordinates. ///
radius float /// The radius of the splash in world space units. ///
force float /// The amount of force applied to create the splash. ///
return void

ErodeObstructionField() public method

public ErodeObstructionField ( int iterations, byte field ) : byte[]
iterations int
field byte
return byte[]

GetGameObjectsWithTagInBounds() protected method

Returns GameObjects with tag within Bounds .
protected GetGameObjectsWithTagInBounds ( string searchTag, Bounds bounds ) : UnityEngine.GameObject[]
searchTag string /// The tag to find GameObjects with. ///
bounds UnityEngine.Bounds /// The bounds to search within. ///
return UnityEngine.GameObject[]

GetObstructionInfoArray() public method

Gets the info required for obstruction mask generation for an array of GameObject.
public GetObstructionInfoArray ( GameObject gameObjects ) : ObstructionInfo[]
gameObjects UnityEngine.GameObject /// The array of . ///
return ObstructionInfo[]

GetWaterLevel() public method

Returns water level at the given position in world space.
public GetWaterLevel ( Vector3 position ) : float
position Vector3 /// The position at which to query the water level. ///
return float

GetWaterLevel() public method

Returns water level at the given position in world space.
public GetWaterLevel ( float x, float z ) : float
x float /// The x coordinate. ///
z float /// The z coordinate. ///
return float

GetWaterLevel() public method

Returns water level at the given position in world space.
public GetWaterLevel ( float x, float y, float z ) : float
x float /// The x coordinate. ///
y float /// The y coordinate. ///
z float /// The z coordinate. ///
return float

Initialize() protected method

Initializes the required components and creates initial Mesh.
protected Initialize ( ) : void
return void

MaxResolution() public method

Returns maximum resolution (along largest side) possible for this water plane dimensions.
public MaxResolution ( ) : int
return int

MaxSpeed() public method

Returns maximum wave propagation speed possible for this quality level.
public MaxSpeed ( ) : float
return float

PropertyChanged() protected method

Called when any property connected with the mesh is changed.
protected PropertyChanged ( ) : void
return void

RecalculateObstructions() public method

Recalculate the static obstructions.
public RecalculateObstructions ( ) : void
return void

UpdateCollider() protected method

Update the collider boundaries.
protected UpdateCollider ( ) : void
return void

Property Details

UpdateWhenNotVisible public_oe property

Value indicating whether to update the simulation when the mesh is not visible.
public bool UpdateWhenNotVisible
return bool

UsePlaneCollider public_oe property

Value indicating whether to generate the static plane collider on initialization.
public bool UsePlaneCollider
return bool