Water Wavelets Simulator¶
-
class WaterWaveletsSimulator¶
Class for simulating the surface of water objects.
Public Functions
-
void RestoreDeviceObjects(platform::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(platform::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(platform::crossplatform::DeviceContext &deviceContext)¶
Clear the wave amplitude grid of the target wave grid.
-
void UpdateAmplitudeGrid(platform::crossplatform::DeviceContext &deviceContext, float real_time_seconds, vec4 *waterProbePositions, vec4 *waterProbeVelocities, vec3 centre, vec2 camPos)¶
Update the wave amplitude grid of the target wave grid.
-
void PrecomputeProfileBuffers(platform::crossplatform::GraphicsDeviceContext &deviceContext, WaveGrid *targetWaveGrid, float real_time_seconds, localWaterValues *waterValues)¶
Precompute the profile buffers of a given wave grid.
-
void PrecomputeWaveSpeeds(platform::crossplatform::DeviceContext &deviceContext)¶
Precompute the wave speeds of the target wave grid.
-
platform::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(platform::crossplatform::GraphicsDeviceContext &deviceContext, simul::terrain::shoreTexture *shoreDepth, float oceanHeight)¶
Generate a contour map that stores the normal of the shore surface.
-
void RestoreDeviceObjects(platform::crossplatform::RenderPlatform *renderPlatform)¶
-
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.