Data Structures | |
| struct | OVvX |
| Template for float vectors. Container for X floats with access operators. More... | |
| class | OVm3 |
| 3x3 floating point matrix class. Container for 3x3 floating point matrices with access operators. More... | |
| class | OVm4 |
| 4x4 floting point matrix class. Container for 4x4 floating point matrices with access operators. More... | |
| class | OVMesh |
| OVMesh class. More... | |
| class | OVProjector |
| The OVProjector class. More... | |
| class | OVShader |
| struct | OVTexture2d |
| class | OVUniVar |
| Class that handles uniform variables. More... | |
| class | OVUniVari |
| Class that handles uniform integer variables. More... | |
| class | OVUniVarf |
| Class that handles uniform float variables. More... | |
| class | OVUniVar2fv |
| Class that handles uniform float vector variables of length 2. More... | |
| class | OVUniVar3fv |
| Class that handles uniform float vector variables of length 3. More... | |
| class | OVUniVar9fm |
| Class that handles uniform float matrix variables of dimension 3x3. More... | |
| class | OVUniVar4fv |
| Class that handles uniform float vector variables of length 4. More... | |
| class | OVUniVar16fm |
| Class that handles uniform float matrix variables of dimension 4x4. More... | |
Typedefs | |
| typedef OVvX< 2 > | OVv2 |
| Typedef for OV2f. | |
| typedef OVvX< 3 > | OVv3 |
| Typedef for OV3f. | |
| typedef OVvX< 4 > | OVv4 |
| Typedef for OV4f. | |
| typedef OVvX< 9 > | OVv9 |
| Typedef for OV9f. | |
| typedef OVvX< 16 > | OVv16 |
| Typedef for OV16f. | |
Functions | |
| void | OVInitWater (float *camPos, float *camDir, float *camUp, float *time, float *dayTime, float *waterHorizon, float *windVelocity, float *waterColor, float *sunColor, int lodRes, int lodVis, GLuint *texCloudID, GLuint *texSkyID, GLuint *texGroundID, float *zoomFactor, float *fovY, float *fovRatio, float *zNear, float *zFar, int *windowWidth, int *windowHeight) |
| Initialization of water module. | |
| void | OVLoadShader (OVShader &shader, char *fileName) |
| Loads water shaders. | |
| void | OVRotate (float lengthScale, OVv2 k, float angle, OVv2 &newK) |
| Rotates a 2D vector by angle. | |
| void | OVCalcWaveProperties () |
| Calculates the waves amplitude, length, steepness, and speed. | |
| void | OVCalcWaveProp (int wave, OVv4 &waveProp, float scaleFactor, OVv2 waveVec) |
| Calculates the waves amplitude, length, steepness, and speed. | |
| void | OVDrawWater () |
| Draws the water, requires previous call to OVInitWater. | |
| float | OVGetHeight (float x, float z) |
| Access the water height. | |
| void | OVSetSunLightUnit (int lightUnitID) |
| Sets OpenGL light unit used for the sun (eg GL_LIGHT0). | |
| void | OVSetSkyTexUnit (int texUnitID) |
| Sets OpenGL texture unit used for the sky. | |
| void | OVSetResolutionLOD (int lodRes) |
| Sets resolution level of detail. | |
| void | OVSetVisualizationLOD (int lodVis) |
| Sets visualization level of detail. | |
| void | OVSetWaveAmpFactor (float factor) |
| Sets additional amplification of wave amplitude. | |
| void | OVDrawProjectorFrustum () |
| Draws the projector frustum. | |
| std::ostream & | operator<< (std::ostream &out, const OVm3 &m) |
| << standard C ostream operator. | |
| std::ostream & | operator<< (std::ostream &out, const OVm4 &m) |
| << standard C ostream operator. | |
| bool | OVTga2char (const char *filename, int &width, int &height, int &bpp, char **data) |
Variables | |
| OVProjector * | OVprojector = new OVProjector |
| OVm4 | OVrangeMatrix |
| OVm4 | OVprojectorModelViewProjectionMatrixInverse |
| GLfloat | OVmaxDisplacement |
| GLint | OVnoiseTexUnit |
| GLint | OVgroundTexUnit |
| GLint | OVskyTexUnit |
| GLint | OVcloudsTexUnit |
| GLint | OVsunLightUnit = 0 |
| OVTexture2d | OVnoiseTexture |
| OVTexture2d | OVskyTexture |
| OVMesh | OVwaterMeshLOW |
| OVMesh | OVwaterMeshMEDIUM |
| OVMesh | OVwaterMeshHIGH |
| OVMesh * | OVactiveMesh |
| OVShader | OVwaterShaderLOW |
| OVShader | OVwaterShaderMEDIUM |
| OVShader | OVwaterShaderHIGH |
| OVShader * | OVactiveShader |
| float * | OVcamPos |
| float * | OVcamDir |
| float * | OVcamUp |
| float * | OVwaterColor |
| float * | OVsunColor |
| float * | OVtime |
| float * | OVdayTime |
| float * | OVwaterHorizon |
| float * | OVwindVelocity |
| float | OVamplitude |
| float | OVscaleAmplitude |
| float | OValtitude |
| GLuint * | OVtexCloudID |
| GLuint * | OVtexSkyID |
| GLuint * | OVtexGroundID |
| int | OVlodRes |
| int | OVlodVis |
| OVv2 | OVwaveVector |
| OVv2 | OVwaveVec1 |
| OVv2 | OVwaveVec2 |
| OVv2 | OVwaveVec3 |
| OVv2 | OVwaveVec4 |
| OVv2 | OVwaveVec5 |
| OVv2 | OVwaveVec6 |
| OVv2 | OVwaveVec7 |
| OVv2 | OVwaveVec8 |
| OVv4 | OVwaveProp1 |
| OVv4 | OVwaveProp2 |
| OVv4 | OVwaveProp3 |
| OVv4 | OVwaveProp4 |
| OVv4 | OVwaveProp5 |
| OVv4 | OVwaveProp6 |
| OVv4 | OVwaveProp7 |
| OVv4 | OVwaveProp8 |
| OVProjector * | OVprojector |
| OVm4 | OVrangeMatrix |
| OVm4 | OVprojectorModelViewProjectionMatrixInverse |
| GLfloat | OVmaxDisplacement |
| GLint | OVnoiseTexUnit |
| GLint | OVgroundTexUnit |
| GLint | OVskyTexUnit |
| GLint | OVcloudsTexUnit |
| GLint | OVsunLightUnit |
| OVTexture2d | OVnoiseTexture |
| OVTexture2d | OVskyTexture |
| OVMesh | OVwaterMeshLOW |
| OVMesh | OVwaterMeshMEDIUM |
| OVMesh | OVwaterMeshHIGH |
| OVMesh * | OVactiveMesh |
| OVShader | OVwaterShaderLOW |
| OVShader | OVwaterShaderMEDIUM |
| OVShader | OVwaterShaderHIGH |
| OVShader * | OVactiveShader |
| float * | OVcamPos |
| float * | OVcamDir |
| float * | OVcamUp |
| float * | OVwaterColor |
| float * | OVsunColor |
| float * | OVtime |
| float * | OVdayTime |
| float * | OVwaterHorizon |
| float * | OVwindVelocity |
| float | OVamplitude |
| float | OVscaleAmplitude |
| float | OValtitude |
| GLuint * | OVtexCloudID |
| GLuint * | OVtexSkyID |
| GLuint * | OVtexGroundID |
| int | OVlodRes |
| int | OVlodVis |
| OVv2 | OVwaveVector |
| OVv2 | OVwaveVec1 |
| OVv2 | OVwaveVec2 |
| OVv2 | OVwaveVec3 |
| OVv2 | OVwaveVec4 |
| OVv2 | OVwaveVec5 |
| OVv2 | OVwaveVec6 |
| OVv2 | OVwaveVec7 |
| OVv2 | OVwaveVec8 |
| OVv4 | OVwaveProp1 |
| OVv4 | OVwaveProp2 |
| OVv4 | OVwaveProp3 |
| OVv4 | OVwaveProp4 |
| OVv4 | OVwaveProp5 |
| OVv4 | OVwaveProp6 |
| OVv4 | OVwaveProp7 |
| OVv4 | OVwaveProp8 |
| std::ostream& OV::operator<< | ( | std::ostream & | out, | |
| const OVm4 & | m | |||
| ) |
<< standard C ostream operator.
| out | Reference to active ostream. | |
| m | Reference to matrix. |
| std::ostream& OV::operator<< | ( | std::ostream & | out, | |
| const OVm3 & | m | |||
| ) |
<< standard C ostream operator.
| out | Reference to active ostream. | |
| m | Reference to matrix. |
| void OV::OVCalcWaveProp | ( | int | wave, | |
| OVv4 & | waveProp, | |||
| float | scaleFactor, | |||
| OVv2 | waveVec | |||
| ) |
Calculates the waves amplitude, length, steepness, and speed.
| wave | The wave index. | |
| waveProp | Vector (4 elements) where the wave properties are stored. | |
| scaleFactor | Constant used for scaling the amplitude. | |
| waveVec | Vector conOVwaveProp6taining direction and size of wave. |
| void OV::OVCalcWaveProperties | ( | ) |
Calculates the waves amplitude, length, steepness, and speed.
| void OV::OVDrawProjectorFrustum | ( | ) |
Draws the projector frustum.
| void OV::OVDrawWater | ( | ) |
Draws the water, requires previous call to OVInitWater.
| float OV::OVGetHeight | ( | float | x, | |
| float | z | |||
| ) |
Access the water height.
Returns the height of the water at specified point. The height will only be an taylor approximation to the first order since it is almost impossible to get an exact height due to the vertex displacement in the xz-plane.
| x | x-coordinate for height lookup. | |
| z | z-coordinate for height lookup. |
| void OV::OVInitWater | ( | float * | camPos, | |
| float * | camDir, | |||
| float * | camUp, | |||
| float * | time, | |||
| float * | dayTime, | |||
| float * | waterHorizon, | |||
| float * | windVelocity, | |||
| float * | waterColor, | |||
| float * | sunColor, | |||
| int | lodRes, | |||
| int | lodVis, | |||
| GLuint * | texCloudID, | |||
| GLuint * | texSkyID, | |||
| GLuint * | texGroundID, | |||
| float * | zoomFactor, | |||
| float * | fovY, | |||
| float * | fovRatio, | |||
| float * | zNear, | |||
| float * | zFar, | |||
| int * | windowWidth, | |||
| int * | windowHeight | |||
| ) |
Initialization of water module.
Stores pointers for all interface variables used between OVWater and Testshell. Grids and VBO's are also created by this routine.
| camPos | Camera position [pointer to string of three floats]. | |
| camDir | Camera direction [pointer to string of three floats]. | |
| camUp | Camera up vector [pointer to string of three floats]. | |
| time | Time variable (seconds). | |
| windVelocity | Length of vector = wind speed. Direction of vector = wind direction. | |
| waterColor | Ambient color for the water. | |
| sunColor | Specular color for the water. | |
| lodRes | Resolution of mesh [1 3] | |
| lodVis | Quality level for visualisation [1 3] | |
| texCloudID | Texture ID for Clouds | |
| texSkyID | Texture ID for Clouds | |
| texGroundID | Texture ID for Clouds | |
| zoomFactor | Increses/Decreses the FOV for zoom effect | |
| fovY | FOV in y direction | |
| fovRation | Used in gluProject | |
| zNear | Near clip plane | |
| zFar | Far clip plane | |
| windowWidth | Window width | |
| windowHeight | Window height |
| void OV::OVLoadShader | ( | OVShader & | shader, | |
| char * | fileName | |||
| ) |
Loads water shaders.
| void OV::OVRotate | ( | float | lengthScale, | |
| OVv2 | k, | |||
| float | angle, | |||
| OVv2 & | newK | |||
| ) |
Rotates a 2D vector by angle.
| lengthScale | scales the length of the vector. | |
| k | The vector which should be rotated. | |
| angle | The desired angle of rotation. | |
| newK | The new vector after rotation. |
| void OV::OVSetResolutionLOD | ( | int | lodRes = 3 |
) |
Sets resolution level of detail.
| lodRes | Value of 1, 2 or 3. |
| void OV::OVSetSkyTexUnit | ( | int | texUnitID = 0 |
) |
Sets OpenGL texture unit used for the sky.
| texUnitID | ID of the texture unit. |
| void OV::OVSetSunLightUnit | ( | int | lightUnitID = 0 |
) |
Sets OpenGL light unit used for the sun (eg GL_LIGHT0).
| lightUnitID | ID of the light unit. |
| void OV::OVSetVisualizationLOD | ( | int | lodVis = 3 |
) |
Sets visualization level of detail.
| lodVis | Value of 1, 2 or 3. |
| void OV::OVSetWaveAmpFactor | ( | float | factor = 1.0 |
) |
Sets additional amplification of wave amplitude.
| factor | Factor to multiply wave amplitude. |
| bool OV::OVTga2char | ( | const char * | filename, | |
| int & | width, | |||
| int & | height, | |||
| int & | bpp, | |||
| char ** | data | |||
| ) |
A pointer to the currently active mesh
A pointer to the currently active mesh
A pointer to the currently active shader
A pointer to the currently active shader
| float OV::OValtitude |
Altitude, used in shader for antialiasing >
| float OV::OValtitude |
Altitude, used in shader for antialiasing >
| float OV::OVamplitude |
Wave amplitude
| float OV::OVamplitude |
Wave amplitude
| float* OV::OVcamDir |
Camera direction vector, points to shell variable
| float* OV::OVcamDir |
Camera direction vector, points to shell variable
| float* OV::OVcamPos |
Camera position coordinate vector, points to shell variable
| float* OV::OVcamPos |
Camera position coordinate vector, points to shell variable
| float* OV::OVcamUp |
Camera up vector, points to shell variable
| float* OV::OVcamUp |
Camera up vector, points to shell variable
| GLint OV::OVcloudsTexUnit |
Texture unit for clouds
| GLint OV::OVcloudsTexUnit |
Texture unit for clouds
| float* OV::OVdayTime |
Time of the day
| float* OV::OVdayTime |
Time of the day
| GLint OV::OVgroundTexUnit |
Texture unit for ground texture
| GLint OV::OVgroundTexUnit |
Texture unit for ground texture
| int OV::OVlodRes |
Holds current LOD
| int OV::OVlodRes |
Holds current LOD
| int OV::OVlodVis |
Holds current LOD shader
| int OV::OVlodVis |
Holds current LOD shader
| GLfloat OV::OVmaxDisplacement |
The maximum wave height
| GLfloat OV::OVmaxDisplacement |
The maximum wave height
Object used for loading a noise texture
Object used for loading a noise texture
| GLint OV::OVnoiseTexUnit |
Texture used for bumpmapping
| GLint OV::OVnoiseTexUnit |
Texture used for bumpmapping
The projector used for rendering
The projector used for rendering
The inverse modelviewprojection matrix of the projector
The inverse modelviewprojection matrix of the projector
The range matrix used for scaling
The range matrix used for scaling
| float OV::OVscaleAmplitude |
Wave amplitude scale factor
| float OV::OVscaleAmplitude |
Wave amplitude scale factor
Object used for loading a sky texture
Object used for loading a sky texture
| GLint OV::OVskyTexUnit |
Texture unit used on the sky gradient
| GLint OV::OVskyTexUnit |
Texture unit used on the sky gradient
| float* OV::OVsunColor |
Sun color vector, points to shell variable
| float* OV::OVsunColor |
Sun color vector, points to shell variable
| GLint OV::OVsunLightUnit |
Light unit for sun
| GLint OV::OVsunLightUnit = 0 |
Light unit for sun
| GLuint* OV::OVtexCloudID |
Cloud texture ID, points to shell variable
| GLuint* OV::OVtexCloudID |
Cloud texture ID, points to shell variable
| GLuint* OV::OVtexGroundID |
Ground texture ID, points to shell variable
| GLuint* OV::OVtexGroundID |
Ground texture ID, points to shell variable
| GLuint* OV::OVtexSkyID |
Sky texture ID, points to in shell variable
| GLuint* OV::OVtexSkyID |
Sky texture ID, points to in shell variable
| float* OV::OVtime |
Time variable, points to shell variable
| float* OV::OVtime |
Time variable, points to shell variable
| float* OV::OVwaterColor |
Water color vector, points to shell variable
| float* OV::OVwaterColor |
Water color vector, points to shell variable
| float* OV::OVwaterHorizon |
Distance to the horizon
| float* OV::OVwaterHorizon |
Distance to the horizon
The water surface mesh, high resolution
The water surface mesh, high resolution
The water surface mesh, low resolution
The water surface mesh, low resolution
The water surface mesh, medium resolution
The water surface mesh, medium resolution
The highest level of detail shader
The highest level of detail shader
The lowest level of detail shader
The lowest level of detail shader
The medium level of detail shader
The medium level of detail shader
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave amplitude, freq, steepness, and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
Wave direction and speed
| float* OV::OVwindVelocity |
Wind velocity vector, points to shell variable
| float* OV::OVwindVelocity |
Wind velocity vector, points to shell variable
1.5.2