D:/Basile/VisualCppProjects/hydroMEX3/hydroMEX3/oGL_graphics/Sea.h File Reference

#include "graphics_relative.h"

Include dependency graph for Sea.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void wave_init ()
 Initialize and allocate memory for sea data.
void wave_z_compute (datas *d)
 Compute sea-mesh.
void free_wave_variables ()
 Free sea data memory.
void Draw_sea ()
 Draws the sea.
void fillWaveLuts ()
 fill sine and cosine look up tables


Detailed Description

Author:
basile.graf@epfl.ch
Contain declaration for functions defined in wave_z_compute_byHand.cpp
!!!! Wave-evaluation function in wave_z_compute_byHand.cpp is not automaticaly updated by MATLAB code generation !!!!!

Definition in file Sea.h.


Function Documentation

void Draw_sea  ) 
 

Draws the sea.

Once initialization with wave_init() is done, and after each call of wave_z_compute(), this function can be called to actually draw the sea. The code of this function contains OpenGL code.

Definition at line 159 of file wave_z_compute_byHand.cpp.

References f(), seaDatas::L, seaDatas::N, sd, and seaDatas::z.

Referenced by DrawGLScene().

void fillWaveLuts  ) 
 

fill sine and cosine look up tables

Definition at line 40 of file wave_z_compute_byHand.cpp.

References cosLUT, f(), LUTLEN, LUTLENF, pi, and sinLUT.

Referenced by wave_init().

void free_wave_variables  ) 
 

Free sea data memory.

Free memory allocated by wave_init().

Definition at line 144 of file wave_z_compute_byHand.cpp.

References seaDatas::B, seaDatas::G, seaDatas::R, sd, and seaDatas::z.

Referenced by mexFunction().

void wave_init  ) 
 

Initialize and allocate memory for sea data.

Don't forget to call free_wave_variables()

Definition at line 82 of file wave_z_compute_byHand.cpp.

References seaDatas::B, fillWaveLuts(), seaDatas::G, seaDatas::L, seaDatas::N, seaDatas::R, sd, and seaDatas::z.

Referenced by mexFunction().

void wave_z_compute datas d  ) 
 

Compute sea-mesh.

Fill the sea-mesh containig wave heigth on a $ N \times N $ mesh representing a sea square of $ L \times L $ meters using LUT functions (faster)

Parameters:
*d : pointer to the datas data-structure

Definition at line 109 of file wave_z_compute_byHand.cpp.

References f(), seaDatas::L, datas::Lambda0, datas::Lambda1, datas::Lambda2, seaDatas::N, pi, sd, datas::t, datas::V_wave0, datas::V_wave1, datas::V_wave2, datas::Wave_amp0, datas::Wave_amp1, datas::Wave_amp2, datas::Wave_angle0, datas::Wave_angle1, datas::Wave_angle2, Wcos(), Wsin(), datas::x, datas::y, and seaDatas::z.

Referenced by DrawGLScene().


Generated on Fri Jun 9 19:10:35 2006 for hydroMex3 by  doxygen 1.4.6-NO