OV Namespace Reference


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

OVProjectorOVprojector = 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
OVMeshOVactiveMesh
OVShader OVwaterShaderLOW
OVShader OVwaterShaderMEDIUM
OVShader OVwaterShaderHIGH
OVShaderOVactiveShader
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
OVProjectorOVprojector
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
OVMeshOVactiveMesh
OVShader OVwaterShaderLOW
OVShader OVwaterShaderMEDIUM
OVShader OVwaterShaderHIGH
OVShaderOVactiveShader
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


Typedef Documentation

typedef OVvX<16> OV::OVv16

Typedef for OV16f.

typedef OVvX<2> OV::OVv2

Typedef for OV2f.

typedef OVvX<3> OV::OVv3

Typedef for OV3f.

typedef OVvX<4> OV::OVv4

Typedef for OV4f.

typedef OVvX<9> OV::OVv9

Typedef for OV9f.


Function Documentation

std::ostream& OV::operator<< ( std::ostream &  out,
const OVm4 &  m 
)

<< standard C ostream operator.

Parameters:
out Reference to active ostream.
m Reference to matrix.
Returns:
Returns the ostream reference in parameter out.

std::ostream& OV::operator<< ( std::ostream &  out,
const OVm3 &  m 
)

<< standard C ostream operator.

Parameters:
out Reference to active ostream.
m Reference to matrix.
Returns:
Returns the ostream reference in parameter out.

void OV::OVCalcWaveProp ( int  wave,
OVv4 &  waveProp,
float  scaleFactor,
OVv2  waveVec 
)

Calculates the waves amplitude, length, steepness, and speed.

Parameters:
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.
Returns:
void.

void OV::OVCalcWaveProperties (  ) 

Calculates the waves amplitude, length, steepness, and speed.

Returns:
void.

void OV::OVDrawProjectorFrustum (  ) 

Draws the projector frustum.

Returns:
void

void OV::OVDrawWater (  ) 

Draws the water, requires previous call to OVInitWater.

Returns:
void.

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.

Parameters:
x x-coordinate for height lookup.
z z-coordinate for height lookup.
Returns:
Height value.

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.

Parameters:
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
Returns:
void

void OV::OVLoadShader ( OVShader &  shader,
char *  fileName 
)

Loads water shaders.

Returns:
void.

void OV::OVRotate ( float  lengthScale,
OVv2  k,
float  angle,
OVv2 &  newK 
)

Rotates a 2D vector by angle.

Parameters:
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.
Returns:
void.

void OV::OVSetResolutionLOD ( int  lodRes = 3  ) 

Sets resolution level of detail.

Parameters:
lodRes Value of 1, 2 or 3.
Returns:
void

void OV::OVSetSkyTexUnit ( int  texUnitID = 0  ) 

Sets OpenGL texture unit used for the sky.

Parameters:
texUnitID ID of the texture unit.
Returns:
void

void OV::OVSetSunLightUnit ( int  lightUnitID = 0  ) 

Sets OpenGL light unit used for the sun (eg GL_LIGHT0).

Parameters:
lightUnitID ID of the light unit.
Returns:
void

void OV::OVSetVisualizationLOD ( int  lodVis = 3  ) 

Sets visualization level of detail.

Parameters:
lodVis Value of 1, 2 or 3.
Returns:
void

void OV::OVSetWaveAmpFactor ( float  factor = 1.0  ) 

Sets additional amplification of wave amplitude.

Parameters:
factor Factor to multiply wave amplitude.
Returns:
void

bool OV::OVTga2char ( const char *  filename,
int &  width,
int &  height,
int &  bpp,
char **  data 
)


Variable Documentation

OVMesh* OV::OVactiveMesh

A pointer to the currently active mesh

OVMesh* OV::OVactiveMesh

A pointer to the currently active mesh

OVShader* OV::OVactiveShader

A pointer to the currently active shader

OVShader* OV::OVactiveShader

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

OVTexture2d OV::OVnoiseTexture

Object used for loading a noise texture

OVTexture2d OV::OVnoiseTexture

Object used for loading a noise texture

GLint OV::OVnoiseTexUnit

Texture used for bumpmapping

GLint OV::OVnoiseTexUnit

Texture used for bumpmapping

OVProjector* OV::OVprojector

The projector used for rendering

OVProjector* OV::OVprojector = new OVProjector

The projector used for rendering

OVm4 OV::OVprojectorModelViewProjectionMatrixInverse

The inverse modelviewprojection matrix of the projector

OVm4 OV::OVprojectorModelViewProjectionMatrixInverse

The inverse modelviewprojection matrix of the projector

OVm4 OV::OVrangeMatrix

The range matrix used for scaling

OVm4 OV::OVrangeMatrix

The range matrix used for scaling

float OV::OVscaleAmplitude

Wave amplitude scale factor

float OV::OVscaleAmplitude

Wave amplitude scale factor

OVTexture2d OV::OVskyTexture

Object used for loading a sky texture

OVTexture2d OV::OVskyTexture

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

OVMesh OV::OVwaterMeshHIGH

The water surface mesh, high resolution

OVMesh OV::OVwaterMeshHIGH

The water surface mesh, high resolution

OVMesh OV::OVwaterMeshLOW

The water surface mesh, low resolution

OVMesh OV::OVwaterMeshLOW

The water surface mesh, low resolution

OVMesh OV::OVwaterMeshMEDIUM

The water surface mesh, medium resolution

OVMesh OV::OVwaterMeshMEDIUM

The water surface mesh, medium resolution

OVShader OV::OVwaterShaderHIGH

The highest level of detail shader

OVShader OV::OVwaterShaderHIGH

The highest level of detail shader

OVShader OV::OVwaterShaderLOW

The lowest level of detail shader

OVShader OV::OVwaterShaderLOW

The lowest level of detail shader

OVShader OV::OVwaterShaderMEDIUM

The medium level of detail shader

OVShader OV::OVwaterShaderMEDIUM

The medium level of detail shader

OVv4 OV::OVwaveProp1

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp1

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp2

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp2

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp3

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp3

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp4

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp4

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp5

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp5

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp6

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp6

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp7

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp7

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp8

Wave amplitude, freq, steepness, and speed

OVv4 OV::OVwaveProp8

Wave amplitude, freq, steepness, and speed

OVv2 OV::OVwaveVec1

Wave direction and speed

OVv2 OV::OVwaveVec1

Wave direction and speed

OVv2 OV::OVwaveVec2

Wave direction and speed

OVv2 OV::OVwaveVec2

Wave direction and speed

OVv2 OV::OVwaveVec3

Wave direction and speed

OVv2 OV::OVwaveVec3

Wave direction and speed

OVv2 OV::OVwaveVec4

Wave direction and speed

OVv2 OV::OVwaveVec4

Wave direction and speed

OVv2 OV::OVwaveVec5

Wave direction and speed

OVv2 OV::OVwaveVec5

Wave direction and speed

OVv2 OV::OVwaveVec6

Wave direction and speed

OVv2 OV::OVwaveVec6

Wave direction and speed

OVv2 OV::OVwaveVec7

Wave direction and speed

OVv2 OV::OVwaveVec7

Wave direction and speed

OVv2 OV::OVwaveVec8

Wave direction and speed

OVv2 OV::OVwaveVec8

Wave direction and speed

OVv2 OV::OVwaveVector

Wave direction and speed

OVv2 OV::OVwaveVector

Wave direction and speed

float* OV::OVwindVelocity

Wind velocity vector, points to shell variable

float* OV::OVwindVelocity

Wind velocity vector, points to shell variable


Generated on Thu May 17 20:28:04 2007 for Ocean View by  doxygen 1.5.2