43 lines
753 B
C#
43 lines
753 B
C#
using System;
|
|
using UnityEngine;
|
|
|
|
namespace UltimateWater
|
|
{
|
|
public abstract class WaterWavesSpectrum
|
|
{
|
|
protected float _TileSize;
|
|
|
|
protected float _Gravity;
|
|
|
|
protected float _WindSpeed;
|
|
|
|
protected float _Amplitude;
|
|
|
|
public float TileSize
|
|
{
|
|
get
|
|
{
|
|
return _TileSize * WaterQualitySettings.Instance.TileSizeScale;
|
|
}
|
|
}
|
|
|
|
public float Gravity
|
|
{
|
|
get
|
|
{
|
|
return _Gravity;
|
|
}
|
|
}
|
|
|
|
protected WaterWavesSpectrum(float tileSize, float gravity, float windSpeed, float amplitude)
|
|
{
|
|
_TileSize = tileSize;
|
|
_Gravity = gravity;
|
|
_WindSpeed = windSpeed;
|
|
_Amplitude = amplitude;
|
|
}
|
|
|
|
public abstract void ComputeSpectrum(Vector3[] spectrum, float tileSizeMultiplier, int maxResolution, System.Random random);
|
|
}
|
|
}
|