C# Class LostPolygon.DynamicWaterSystem.DynamicWaterSolver

An abstract class representing the fluid wave function.
Inheritance: UnityEngine.MonoBehaviour, IDynamicWaterSolverFieldState
Afficher le fichier Open project: caffeinatedguy/Limbs Class Usage Examples

Protected Properties

Свойство Type Description
_canInteract bool
_field float[]
_fieldObstruction byte[]
_grid Vector2Int
_isDirty bool
_isInitialized bool

Méthodes publiques

Méthode 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 simulation step. This is the method where the wave simulation has to be written.

Méthodes protégées

Méthode Description
CreateSplashNormalized ( Vector2 center, float radius, float force, float &field ) : void

Creates a circular drop splash on the fluid surface.

Private Methods

Méthode Description
Awake ( ) : void

Ensures that DynamicWaterSolver is attached to the object having a DynamicWater component.

Method Details

CreateSplashNormalized() public abstract méthode

Creates a circular drop splash on the fluid surface.
public abstract 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. ///
Résultat void

CreateSplashNormalized() protected méthode

Creates a circular drop splash on the fluid surface.
protected CreateSplashNormalized ( Vector2 center, float radius, float force, float &field ) : void
center UnityEngine.Vector2 /// The center of the splash in simulation grid space. ///
radius float /// The radius of the splash in simulation grid nodes. ///
force float /// The amount of force applied to create the splash. ///
field float /// The simulation state field to create splash on. ///
Résultat void

GetFieldValue() public abstract méthode

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

Initialize() public méthode

The initialization method. Automatically called by DynamicWater.
public Initialize ( Vector2Int gridSize ) : void
gridSize Vector2Int /// The size in nodes of simulation grid. ///
Résultat void

StepSimulation() public abstract méthode

Executes the simulation step. This is the method where the wave simulation has to be written.
public abstract StepSimulation ( float speed, float damping ) : void
speed float /// The overall simulation speed factor. ///
damping float /// The damping value (range 0-1). ///
Résultat void

Property Details

_canInteract protected_oe property

protected bool _canInteract
Résultat bool

_field protected_oe property

protected float[] _field
Résultat float[]

_fieldObstruction protected_oe property

protected byte[] _fieldObstruction
Résultat byte[]

_grid protected_oe property

protected Vector2Int,LostPolygon.DynamicWaterSystem _grid
Résultat Vector2Int

_isDirty protected_oe property

protected bool _isDirty
Résultat bool

_isInitialized protected_oe property

protected bool _isInitialized
Résultat bool