An AbstractTask to draw a flat or spherical ocean. More...
#include <DrawOceanTask.h>
Public Member Functions | |
DrawOceanTask (float radius, float zmin, ptr< Module > brdfShader) | |
Creates a new DrawOceanTask. | |
virtual | ~DrawOceanTask () |
Deletes this DrawOceanTask. | |
Protected Member Functions | |
DrawOceanTask () | |
Creates an uninitialized DrawOceanTask. | |
void | init (float radius, float zmin, ptr< Module > brdfShader) |
Initializes this DrawOceanTask. | |
Private Attributes | |
float | radius |
The radius of the planet for a spherical ocean, or 0 for a flat ocean. | |
float | zmin |
The maximum altitude at which the ocean must be displayed. | |
int | nbWaves |
Number of wave trains used to synthesize the ocean surface. | |
float | lambdaMin |
Minimum wavelength of the waves. | |
float | lambdaMax |
Maximum wavelength of the waves. | |
float | heightMax |
Parameter to color the height of waves. | |
vec3f | seaColor |
Color of the seabed. | |
float | sigmaXsq |
Variance of the x slope over the sea surface. | |
float | sigmaYsq |
Variance of the y slope over the sea surface. | |
float | meanHeight |
Average height of the sea surface. | |
float | heightVariance |
Variance of the sea surface height. | |
float | amplitudeMax |
Maximum amplitude between crests and throughs. | |
int | resolution |
Number of pixels per cell to use for the screen space grid used to display the ocean surface. | |
int | screenWidth |
Current width of the viewport, in pixels. | |
int | screenHeight |
Current height of the viewport, in pixels. | |
ptr< Mesh< vec2f, unsigned int > > | screenGrid |
The mesh used to display the ocean surface. | |
ptr< Module > | brdfShader |
The Shader used to render the ocean surface. |
An AbstractTask to draw a flat or spherical ocean.
proland::DrawOceanTask::DrawOceanTask | ( | float | radius, | |
float | zmin, | |||
ptr< Module > | brdfShader | |||
) |
Creates a new DrawOceanTask.
radius | the radius of the planet for a spherical ocean, or 0 for a flat ocean. | |
zmin | the maximum altitude at which the ocean must be displayed. | |
brdfShader | the Shader used to render the ocean surface. |
virtual proland::DrawOceanTask::~DrawOceanTask | ( | ) | [virtual] |
Deletes this DrawOceanTask.
proland::DrawOceanTask::DrawOceanTask | ( | ) | [protected] |
Creates an uninitialized DrawOceanTask.
void proland::DrawOceanTask::init | ( | float | radius, | |
float | zmin, | |||
ptr< Module > | brdfShader | |||
) | [protected] |
Initializes this DrawOceanTask.
radius | the radius of the planet for a spherical ocean, or 0 for a flat ocean. | |
zmin | the maximum altitude at which the ocean must be displayed. | |
brdfShader | the Shader used to display the ocean surface. |
float proland::DrawOceanTask::amplitudeMax [private] |
Maximum amplitude between crests and throughs.
ptr<Module> proland::DrawOceanTask::brdfShader [private] |
The Shader used to render the ocean surface.
float proland::DrawOceanTask::heightMax [private] |
Parameter to color the height of waves.
float proland::DrawOceanTask::heightVariance [private] |
Variance of the sea surface height.
float proland::DrawOceanTask::lambdaMax [private] |
Maximum wavelength of the waves.
float proland::DrawOceanTask::lambdaMin [private] |
Minimum wavelength of the waves.
float proland::DrawOceanTask::meanHeight [private] |
Average height of the sea surface.
int proland::DrawOceanTask::nbWaves [private] |
Number of wave trains used to synthesize the ocean surface.
float proland::DrawOceanTask::radius [private] |
The radius of the planet for a spherical ocean, or 0 for a flat ocean.
int proland::DrawOceanTask::resolution [private] |
Number of pixels per cell to use for the screen space grid used to display the ocean surface.
ptr< Mesh<vec2f, unsigned int> > proland::DrawOceanTask::screenGrid [private] |
The mesh used to display the ocean surface.
int proland::DrawOceanTask::screenHeight [private] |
Current height of the viewport, in pixels.
int proland::DrawOceanTask::screenWidth [private] |
Current width of the viewport, in pixels.
vec3f proland::DrawOceanTask::seaColor [private] |
Color of the seabed.
float proland::DrawOceanTask::sigmaXsq [private] |
Variance of the x slope over the sea surface.
float proland::DrawOceanTask::sigmaYsq [private] |
Variance of the y slope over the sea surface.
float proland::DrawOceanTask::zmin [private] |
The maximum altitude at which the ocean must be displayed.