C# Класс LostPolygon.DynamicWaterSystem.DynamicWaterSolver

An abstract class representing the fluid wave function.
Наследование: UnityEngine.MonoBehaviour, IDynamicWaterSolverFieldState
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_canInteract bool
_field float[]
_fieldObstruction byte[]
_grid Vector2Int
_isDirty bool
_isInitialized bool

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
CreateSplashNormalized ( Vector2 center, float radius, float force, float &field ) : void

Creates a circular drop splash on the fluid surface.

Приватные методы

Метод Описание
Awake ( ) : void

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

Описание методов

CreateSplashNormalized() публичный абстрактный Метод

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. ///
Результат void

CreateSplashNormalized() защищенный Метод

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. ///
Результат void

GetFieldValue() публичный абстрактный Метод

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. ///
Результат float

Initialize() публичный Метод

The initialization method. Automatically called by DynamicWater.
public Initialize ( Vector2Int gridSize ) : void
gridSize Vector2Int /// The size in nodes of simulation grid. ///
Результат void

StepSimulation() публичный абстрактный Метод

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). ///
Результат void

Описание свойств

_canInteract защищенное свойство

protected bool _canInteract
Результат bool

_field защищенное свойство

protected float[] _field
Результат float[]

_fieldObstruction защищенное свойство

protected byte[] _fieldObstruction
Результат byte[]

_grid защищенное свойство

protected Vector2Int,LostPolygon.DynamicWaterSystem _grid
Результат Vector2Int

_isDirty защищенное свойство

protected bool _isDirty
Результат bool

_isInitialized защищенное свойство

protected bool _isInitialized
Результат bool