Water Wavelets Simulator

class WaterWaveletsSimulator

Public Functions

void RestoreDeviceObjects(crossplatform::RenderPlatform *renderPlatform)

Platform-dependent function called when initializing the wavelets simulator.

void InvalidateDeviceObjects()

Platform-dependent function called when uninitializing the wavelets simulator.

void SetShader(crossplatform::Effect *e)

Set the precompiled shader used by the wavelets simulator - debug only.

void InitialiseWaveGrid(WaveGrid *newWaveGrid, uint2 dimension, int theta, int k)

Initialise a given wave grid.

void SetTargetWaveGrid(WaveGrid *targetWaveGrid, localWaterValues *waterValues)

Set the target wave grid the simulator will be working on.

void ResetAmplitudeGrid(crossplatform::DeviceContext &deviceContext)

Clear the wave amplitude grid of the target wave grid.

void UpdateAmplitudeGrid(crossplatform::DeviceContext &deviceContext, float real_time_seconds, vec4 *waterProbePositions, vec4 *waterProbeVelocities, vec3 center, vec2 camPos)

Update the wave amplitude grid of the target wave grid.

void PrecomputeProfileBuffers(crossplatform::GraphicsDeviceContext &deviceContext, WaveGrid *targetWaveGrid, float real_time_seconds, localWaterValues *waterValues)

Precompute the profile buffers of a given wave grid.

void PrecomputeWaveSpeeds(crossplatform::DeviceContext &deviceContext)

Precompute the wave speeds of the target wave grid.

simul::crossplatform::Texture *getContourMap()

Get a pointer to the contour map.

surfaceFlowRayBuffer *getBaseFlowRayBuffer()

Get a pointer to the base flow ray buffer.

surfaceFlowRayBuffer *getSubFlowRayBuffer()

Get a pointer to the sub flow ray buffer.

void GenerateContourMap(crossplatform::GraphicsDeviceContext &deviceContext, simul::terrain::shoreTexture *shoreDepth, float oceanHeight)

Generate a contour map that stores the normal of the shore surface.

void GenerateSurfaceFlow(crossplatform::DeviceContext &deviceContext, WaveGrid *surfaceFlowGrid)

Calculate the path of the flow rays.

struct globalWaterValues

Struct for holding Global water values that affect all water objects and the boundless ocean.

struct localWaterValues

Struct for holding values for individual water objects and the boundless ocean.

struct WaveGrid

Struct for defining a wavegrid.

struct boundlessOceanProperties

Struct for holding the Boundless Ocean properties.