C# Class LostPolygon.DynamicWaterSystem.LinearWaveEqueationSolver

Linear wave equation solver. This is the core of interactive simulation.
Datei anzeigen Open project: caffeinatedguy/Limbs Class Usage Examples

Public Methods

Method Description
Solve ( float field, float fieldNew, float fieldSpeed, byte fieldObstruction, Vector2Int gridSize, float timeDelta, float damping, float &maxValue ) : void

Performs the wave simulation step.

Method Details

Solve() public static method

Performs the wave simulation step.
public static Solve ( float field, float fieldNew, float fieldSpeed, byte fieldObstruction, Vector2Int gridSize, float timeDelta, float damping, float &maxValue ) : void
field float /// Represents the current simulation state. ///
fieldNew float /// Represents the updated simulation state. ///
fieldSpeed float /// Represents the simulation state difference. ///
fieldObstruction byte /// Array of bool indicating whether the water is obstructed by an object. \n /// true means the grid node is obstructed by an object, so the simulation is not updated; /// false means the grid node is not obstructed, and the simulation can proceed freely. ///
gridSize Vector2Int /// Actual simulation grid resolution. ///
timeDelta float /// Time delta in seconds. ///
damping float /// Damping value. Must be clamped to the 0-1 range. ///
maxValue float /// Value representing maximal absolute wave height. ///
return void