Cogs.Core
|
Public Member Functions | |
void | initialize (IGraphicsDevice *device) |
void | setSize (const int Nlog2) |
float | setConditions (const float tileExtent, const float waveNumberMute, const float waveNumberPass, const float significantWavePeriod, const float windSpeed, const float windDirection, const float scale=0.f, const unsigned int seed=42) |
bool | update (RenderContext &renderContext, const float dt) |
TextureHandle | positionTex () |
TextureHandle | derivativesTex () |
float | getTileExtent () const |
float | getTileExtentAdjust () const |
float | getAdjustedTileExtent () const |
Static Protected Member Functions | |
static float | createDirectionalWaveSpectrum (std::vector< float > &E, int N, float L, float freqPassZero, float freqPassOne, float windSpeed, float windDirection, float dominantWavePeriod, float scale=0.f) |
static void | createRandomizedWaveSpectrumInstance (std::vector< glm::vec2 > &H, const std::vector< float > &E, const unsigned int seed, const size_t N) |
Protected Attributes | |
GPGPUQuadRenderer | gpgpuQuadRenderer |
FourierTransform2D | fourierTransform |
IGraphicsDevice * | device |
float | tileExtent |
float | tileExtentAdjust |
int | NLog2 |
int | N |
int | frame |
TextureHandle | phaseTex [2] |
RenderTargetHandle | dispersionTarget [2] |
struct { | |
EffectHandle effect | |
InputLayoutHandle il | |
BufferHandle constantBuffer | |
} | texturePack |
struct { | |
EffectHandle effect | |
InputLayoutHandle il | |
BufferHandle constantBuffer | |
} | disperse |
struct { | |
std::vector< float > E | |
std::vector< glm::vec2 > a | |
Frequency representation of sea state at t=0. More... | |
TextureHandle aTex | |
TextureHandle xyTex | |
TextureHandle zTex | |
TextureHandle dzdu_dzdv_Tex | |
} | frequencyDomain |
struct { | |
TextureHandle xyzTex | |
TextureHandle dxdu_dydv_dzdu_dzdvTex | |
RenderTargetHandle packTarget | |
} | packed |
struct { | |
TextureHandle xyTex | |
TextureHandle zTex | |
TextureHandle dzdu_dzdv_Tex | |
RenderTargetHandle xyTarget | |
RenderTargetHandle zTarget | |
RenderTargetHandle dzduTarget | |
} | spatialDomain |
Definition at line 14 of file WaveSpectrum.h.
|
staticprotected |
E | Resulting wave spectrum. |
N | Samples along one side. |
L | Extent of one side, in meters. |
windSpeed | Wind speed at 10 meters altitude, in m/s. |
windDirection | Wind direction relative to x-axis, in radians. |
dominantWavePeriod | Dominant wave period in seconds. |
Definition at line 115 of file WaveSpectrum.cpp.
|
staticprotected |
Definition at line 195 of file WaveSpectrum.cpp.
|
inline |
Definition at line 35 of file WaveSpectrum.h.
|
inline |
Definition at line 42 of file WaveSpectrum.h.
|
inline |
Definition at line 38 of file WaveSpectrum.h.
|
inline |
Definition at line 40 of file WaveSpectrum.h.
void Cogs::WaveSpectrum::initialize | ( | IGraphicsDevice * | device | ) |
Definition at line 253 of file WaveSpectrum.cpp.
|
inline |
Definition at line 33 of file WaveSpectrum.h.
float Cogs::WaveSpectrum::setConditions | ( | const float | tileExtent, |
const float | waveNumberMute, | ||
const float | waveNumberPass, | ||
const float | significantWavePeriod, | ||
const float | windSpeed, | ||
const float | windDirection, | ||
const float | scale = 0.f , |
||
const unsigned int | seed = 42 |
||
) |
Definition at line 218 of file WaveSpectrum.cpp.
void Cogs::WaveSpectrum::setSize | ( | const int | Nlog2 | ) |
Definition at line 287 of file WaveSpectrum.cpp.
bool Cogs::WaveSpectrum::update | ( | RenderContext & | renderContext, |
const float | dt | ||
) |
Definition at line 339 of file WaveSpectrum.cpp.
std::vector<glm::vec2> Cogs::WaveSpectrum::a |
Frequency representation of sea state at t=0.
Definition at line 73 of file WaveSpectrum.h.
TextureHandle Cogs::WaveSpectrum::aTex |
Definition at line 74 of file WaveSpectrum.h.
BufferHandle Cogs::WaveSpectrum::constantBuffer |
Definition at line 61 of file WaveSpectrum.h.
|
protected |
Definition at line 47 of file WaveSpectrum.h.
|
protected |
Definition at line 56 of file WaveSpectrum.h.
TextureHandle Cogs::WaveSpectrum::dxdu_dydv_dzdu_dzdvTex |
Definition at line 82 of file WaveSpectrum.h.
TextureHandle Cogs::WaveSpectrum::dzdu_dzdv_Tex |
Definition at line 77 of file WaveSpectrum.h.
RenderTargetHandle Cogs::WaveSpectrum::dzduTarget |
Definition at line 92 of file WaveSpectrum.h.
std::vector<float> Cogs::WaveSpectrum::E |
Definition at line 72 of file WaveSpectrum.h.
EffectHandle Cogs::WaveSpectrum::effect |
Definition at line 59 of file WaveSpectrum.h.
|
protected |
Definition at line 46 of file WaveSpectrum.h.
|
protected |
Definition at line 53 of file WaveSpectrum.h.
|
protected |
Definition at line 45 of file WaveSpectrum.h.
InputLayoutHandle Cogs::WaveSpectrum::il |
Definition at line 60 of file WaveSpectrum.h.
|
protected |
Definition at line 51 of file WaveSpectrum.h.
|
protected |
Definition at line 50 of file WaveSpectrum.h.
RenderTargetHandle Cogs::WaveSpectrum::packTarget |
Definition at line 83 of file WaveSpectrum.h.
|
protected |
Definition at line 55 of file WaveSpectrum.h.
|
protected |
Definition at line 48 of file WaveSpectrum.h.
|
protected |
Definition at line 49 of file WaveSpectrum.h.
RenderTargetHandle Cogs::WaveSpectrum::xyTarget |
Definition at line 90 of file WaveSpectrum.h.
TextureHandle Cogs::WaveSpectrum::xyTex |
Definition at line 75 of file WaveSpectrum.h.
TextureHandle Cogs::WaveSpectrum::xyzTex |
Definition at line 81 of file WaveSpectrum.h.
RenderTargetHandle Cogs::WaveSpectrum::zTarget |
Definition at line 91 of file WaveSpectrum.h.
TextureHandle Cogs::WaveSpectrum::zTex |
Definition at line 76 of file WaveSpectrum.h.