C# Class LostPolygon.DynamicWaterSystem.DynamicWaterSolverSimulation

Inheritance: DynamicWaterSolver
Datei anzeigen Open project: caffeinatedguy/Limbs

Protected Properties

Property Type Description
FieldSim float[]
FieldSimNew float[]
FieldSimSpeed float[]
_simulationSpeedNormalizationFactor float

Public Methods

Method Description
CreateSplashNormalized ( Vector2 center, float radius, float force ) : void

Creates a circular drop splash on the fluid surface.

GetFieldValue ( float x, float z ) : float

Returns water level at the given position in simulation grid space.

Initialize ( Vector2Int gridSize ) : void

The initialization method. Automatically called by DynamicWater.

StepSimulation ( float speed, float damping ) : void

Executes the wave simulation step.

Method Details

CreateSplashNormalized() public method

Creates a circular drop splash on the fluid surface.
public CreateSplashNormalized ( Vector2 center, float radius, float force ) : void
center UnityEngine.Vector2 /// The center of the splash in simulation grid space. ///
radius float /// The radius of the splash. ///
force float /// The amount of force applied to create the splash. ///
return void

GetFieldValue() public method

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

Initialize() public method

The initialization method. Automatically called by DynamicWater.
public Initialize ( Vector2Int gridSize ) : void
gridSize Vector2Int /// Simulation grid resolution. ///
return void

StepSimulation() public method

Executes the wave simulation step.
public StepSimulation ( float speed, float damping ) : void
speed float /// Overall simulation speed factor. ///
damping float /// The damping value (range 0-1). ///
return void

Property Details

FieldSim protected_oe property

protected float[] FieldSim
return float[]

FieldSimNew protected_oe property

protected float[] FieldSimNew
return float[]

FieldSimSpeed protected_oe property

protected float[] FieldSimSpeed
return float[]

_simulationSpeedNormalizationFactor protected_oe property

protected float _simulationSpeedNormalizationFactor
return float