\hypertarget{_sea_8h}{
\section{D:/Basile/Visual\-Cpp\-Projects/hydro\-MEX3/hydro\-MEX3/o\-GL\_\-graphics/Sea.h File Reference}
\label{_sea_8h}\index{D:/Basile/VisualCppProjects/hydroMEX3/hydroMEX3/oGL_graphics/Sea.h@{D:/Basile/VisualCppProjects/hydroMEX3/hydroMEX3/oGL\_\-graphics/Sea.h}}
}
{\tt \#include \char`\"{}graphics\_\-relative.h\char`\"{}}\par


Include dependency graph for Sea.h:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=264pt]{_sea_8h__incl}
\end{center}
\end{figure}


This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=420pt]{_sea_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{_sea_8h_39edf53f76846285d78d17753bbb1863}{wave\_\-init} ()
\begin{CompactList}\small\item\em Initialize and allocate memory for sea data. \item\end{CompactList}\item 
void \hyperlink{_sea_8h_84e6ce9f2eb7a8d40438c27f6edafd9c}{wave\_\-z\_\-compute} (\hyperlink{structdatas}{datas} $\ast$d)
\begin{CompactList}\small\item\em Compute sea-mesh. \item\end{CompactList}\item 
void \hyperlink{_sea_8h_db1085a37034bc00d7e193fd7fc35929}{free\_\-wave\_\-variables} ()
\begin{CompactList}\small\item\em Free sea data memory. \item\end{CompactList}\item 
void \hyperlink{_sea_8h_aaf6567b92f73893458331fd5f33b22c}{Draw\_\-sea} ()
\begin{CompactList}\small\item\em Draws the sea. \item\end{CompactList}\item 
void \hyperlink{_sea_8h_c120c74a08494279430f54650fd16386}{fill\-Wave\-Luts} ()
\begin{CompactList}\small\item\em fill sine and cosine look up tables \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
\begin{Desc}
\item[Author:]\href{mailto:basile.graf@epfl.ch}{\tt basile.graf@epfl.ch}\end{Desc}
Contain declaration for functions defined in \hyperlink{wave__z__compute__by_hand_8cpp}{wave\_\-z\_\-compute\_\-by\-Hand.cpp} \par
 !!!! Wave-evaluation function in \hyperlink{wave__z__compute__by_hand_8cpp}{wave\_\-z\_\-compute\_\-by\-Hand.cpp} is not automaticaly updated by MATLAB code generation !!!!! 

Definition in file \hyperlink{_sea_8h-source}{Sea.h}.

\subsection{Function Documentation}
\hypertarget{_sea_8h_aaf6567b92f73893458331fd5f33b22c}{
\index{Sea.h@{Sea.h}!Draw_sea@{Draw\_\-sea}}
\index{Draw_sea@{Draw\_\-sea}!Sea.h@{Sea.h}}
\subsubsection[Draw\_\-sea]{\setlength{\rightskip}{0pt plus 5cm}void Draw\_\-sea ()}}
\label{_sea_8h_aaf6567b92f73893458331fd5f33b22c}


Draws the sea. 

Once initialization with \hyperlink{_sea_8h_39edf53f76846285d78d17753bbb1863}{wave\_\-init()} is done, and after each call of \hyperlink{_sea_8h_84e6ce9f2eb7a8d40438c27f6edafd9c}{wave\_\-z\_\-compute()}, this function can be called to actually draw the sea. The code of this function contains Open\-GL code. 

Definition at line 159 of file wave\_\-z\_\-compute\_\-by\-Hand.cpp.

References f(), sea\-Datas::L, sea\-Datas::N, sd, and sea\-Datas::z.

Referenced by Draw\-GLScene().\hypertarget{_sea_8h_c120c74a08494279430f54650fd16386}{
\index{Sea.h@{Sea.h}!fillWaveLuts@{fillWaveLuts}}
\index{fillWaveLuts@{fillWaveLuts}!Sea.h@{Sea.h}}
\subsubsection[fillWaveLuts]{\setlength{\rightskip}{0pt plus 5cm}void fill\-Wave\-Luts ()}}
\label{_sea_8h_c120c74a08494279430f54650fd16386}


fill sine and cosine look up tables 



Definition at line 40 of file wave\_\-z\_\-compute\_\-by\-Hand.cpp.

References cos\-LUT, f(), LUTLEN, LUTLENF, pi, and sin\-LUT.

Referenced by wave\_\-init().\hypertarget{_sea_8h_db1085a37034bc00d7e193fd7fc35929}{
\index{Sea.h@{Sea.h}!free_wave_variables@{free\_\-wave\_\-variables}}
\index{free_wave_variables@{free\_\-wave\_\-variables}!Sea.h@{Sea.h}}
\subsubsection[free\_\-wave\_\-variables]{\setlength{\rightskip}{0pt plus 5cm}void free\_\-wave\_\-variables ()}}
\label{_sea_8h_db1085a37034bc00d7e193fd7fc35929}


Free sea data memory. 

Free memory allocated by \hyperlink{_sea_8h_39edf53f76846285d78d17753bbb1863}{wave\_\-init()}. 

Definition at line 144 of file wave\_\-z\_\-compute\_\-by\-Hand.cpp.

References sea\-Datas::B, sea\-Datas::G, sea\-Datas::R, sd, and sea\-Datas::z.

Referenced by mex\-Function().\hypertarget{_sea_8h_39edf53f76846285d78d17753bbb1863}{
\index{Sea.h@{Sea.h}!wave_init@{wave\_\-init}}
\index{wave_init@{wave\_\-init}!Sea.h@{Sea.h}}
\subsubsection[wave\_\-init]{\setlength{\rightskip}{0pt plus 5cm}void wave\_\-init ()}}
\label{_sea_8h_39edf53f76846285d78d17753bbb1863}


Initialize and allocate memory for sea data. 

Don't forget to call \hyperlink{_sea_8h_db1085a37034bc00d7e193fd7fc35929}{free\_\-wave\_\-variables()} 

Definition at line 82 of file wave\_\-z\_\-compute\_\-by\-Hand.cpp.

References sea\-Datas::B, fill\-Wave\-Luts(), sea\-Datas::G, sea\-Datas::L, sea\-Datas::N, sea\-Datas::R, sd, and sea\-Datas::z.

Referenced by mex\-Function().\hypertarget{_sea_8h_84e6ce9f2eb7a8d40438c27f6edafd9c}{
\index{Sea.h@{Sea.h}!wave_z_compute@{wave\_\-z\_\-compute}}
\index{wave_z_compute@{wave\_\-z\_\-compute}!Sea.h@{Sea.h}}
\subsubsection[wave\_\-z\_\-compute]{\setlength{\rightskip}{0pt plus 5cm}void wave\_\-z\_\-compute (\hyperlink{structdatas}{datas} $\ast$ {\em d})}}
\label{_sea_8h_84e6ce9f2eb7a8d40438c27f6edafd9c}


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) \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em $\ast$d}]: pointer to the datas data-structure \end{description}
\end{Desc}


Definition at line 109 of file wave\_\-z\_\-compute\_\-by\-Hand.cpp.

References f(), sea\-Datas::L, datas::Lambda0, datas::Lambda1, datas::Lambda2, sea\-Datas::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 sea\-Datas::z.

Referenced by Draw\-GLScene().