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


Include dependency graph for solid\_\-objects.cpp:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=280pt]{solid__objects_8cpp__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void \hyperlink{solid__objects_8cpp_59653144565208f986cd017ce8accacc}{Solid\-Object\_\-create} (\hyperlink{struct_solid_object}{Solid\-Object} $\ast$so, int N, int M)
\begin{CompactList}\small\item\em Creates a solid object. \item\end{CompactList}\item 
void \hyperlink{solid__objects_8cpp_067f2dfb7094da8f0eac9561b42ba047}{Solid\-Object\_\-delete} (\hyperlink{struct_solid_object}{Solid\-Object} $\ast$so)
\begin{CompactList}\small\item\em Deletes a solid object. \item\end{CompactList}\item 
void \hyperlink{solid__objects_8cpp_a5ab64f26bf1f5b1bf9a57f0ada97833}{cross\_\-product} (float $\ast$va, float $\ast$vb, float $\ast$vc)
\begin{CompactList}\small\item\em Computes the cross-product. \item\end{CompactList}\item 
void \hyperlink{solid__objects_8cpp_11a8f8b0c5b4ecabbcab9390e5992e2d}{one\_\-normal} (float $\ast$v1, float $\ast$v2, float $\ast$v3, float $\ast$v4, float $\ast$vn)
\begin{CompactList}\small\item\em Computes normal vector for one vertex. \item\end{CompactList}\item 
void \hyperlink{solid__objects_8cpp_81dceb9cb9518f78a99ee6c78dc84cc2}{Solid\-Object\_\-compute\_\-normals} (\hyperlink{struct_solid_object}{Solid\-Object} $\ast$so)
\begin{CompactList}\small\item\em Computes the normals for a \hyperlink{struct_solid_object}{Solid\-Object}. \item\end{CompactList}\item 
void \hyperlink{solid__objects_8cpp_a9cbac01dcbf6ed6d3cf042a8a349aa6}{Solid\-Object\_\-draw} (\hyperlink{struct_solid_object}{Solid\-Object} $\ast$so)
\item 
void \hyperlink{solid__objects_8cpp_2f28d819d61ca4d60ca0c78ba39c8c32}{Sail\_\-create\_\-and\_\-draw} (\hyperlink{structdatas}{datas} $\ast$d)
\begin{CompactList}\small\item\em Create and draw the sail. \item\end{CompactList}\item 
void \hyperlink{solid__objects_8cpp_785f76ac562afbb4e1665009963b228e}{Relative\-Wind\_\-draw} (\hyperlink{structdatas}{datas} $\ast$d)
\begin{CompactList}\small\item\em Draws relative wind vector. \item\end{CompactList}\item 
void \hyperlink{solid__objects_8cpp_e92c036a4a9e1eab55015957740f36e6}{Target\_\-draw} (float x, float y)
\begin{CompactList}\small\item\em Draws a \char`\"{}target instrument\char`\"{} on the screen. \item\end{CompactList}\item 
void \hyperlink{solid__objects_8cpp_6a9f1c38f7da2f7e560c3e29e2fceaeb}{VSlider\_\-draw} (float x)
\begin{CompactList}\small\item\em Draws a \char`\"{}vertical slider instrument\char`\"{} on the screen. \item\end{CompactList}\item 
void \hyperlink{solid__objects_8cpp_32d59b6583b22556df056cda02a3c808}{HSlider\_\-draw} (float x)
\begin{CompactList}\small\item\em Draws a \char`\"{}horizontal slider instrument\char`\"{} on the screen. \item\end{CompactList}\item 
void \hyperlink{solid__objects_8cpp_53f39f9e1e74394d7a9714a5e5e8313a}{Girouette\_\-draw} (\hyperlink{structdatas}{datas} $\ast$d)
\begin{CompactList}\small\item\em Draws a girouette on the screen. \item\end{CompactList}\item 
void \hyperlink{solid__objects_8cpp_6ea315967f0750817445fa9d4a279dd8}{Boat\_\-draw} ()
\begin{CompactList}\small\item\em Draws the boat. \item\end{CompactList}\item 
void \hyperlink{solid__objects_8cpp_db325cc23dfae772457e4b4fd48ffe90}{Boat\_\-delete} ()
\begin{CompactList}\small\item\em Deletes the boat. \item\end{CompactList}\item 
void \hyperlink{solid__objects_8cpp_6b4c2c288966bb2692c0509017656ea0}{Boat\_\-create} (\hyperlink{structdatas}{datas} $\ast$d)
\begin{CompactList}\small\item\em Creates and defines all boat related \hyperlink{struct_solid_object}{Solid\-Object} objects. \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_1a998cecb5d07458ca595b56b89042db}{hull\-Struct}
\begin{CompactList}\small\item\em central hydroptere hull \item\end{CompactList}\item 
\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ \hyperlink{solid__objects_8cpp_5c6d9f8b732fae12e2ebe422750176a8}{hull} = \&\hyperlink{solid__objects_8cpp_1a998cecb5d07458ca595b56b89042db}{hull\-Struct}
\item 
\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_e9c184df8ee8c2bf65108e017ebb05d7}{r\-Swimm\-Struct}
\begin{CompactList}\small\item\em right swimmer \item\end{CompactList}\item 
\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ \hyperlink{solid__objects_8cpp_be35e40eeed8d7e8da6c44353b487d19}{r\-Swimm} = \&\hyperlink{solid__objects_8cpp_e9c184df8ee8c2bf65108e017ebb05d7}{r\-Swimm\-Struct}
\item 
\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_3b5c4112cc1e219e7e1a15b1f392bd6b}{l\-Swimm\-Struct}
\begin{CompactList}\small\item\em left swimmer \item\end{CompactList}\item 
\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ \hyperlink{solid__objects_8cpp_786f47f28d6929467c63780dccc9afa4}{l\-Swimm} = \&\hyperlink{solid__objects_8cpp_3b5c4112cc1e219e7e1a15b1f392bd6b}{l\-Swimm\-Struct}
\item 
\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_9807ddaa814777f811c6b11eee956784}{bridge\-Main\-Struct}
\begin{CompactList}\small\item\em front bridge \item\end{CompactList}\item 
\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ \hyperlink{solid__objects_8cpp_2381ddaa3ad4a7da9e1863d68d6b75f6}{bridge\-Main} = \&\hyperlink{solid__objects_8cpp_9807ddaa814777f811c6b11eee956784}{bridge\-Main\-Struct}
\item 
\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_7108a62857bd820cbf14fba640c38ebd}{bridge2Struct}
\begin{CompactList}\small\item\em bridge 2 \item\end{CompactList}\item 
\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ \hyperlink{solid__objects_8cpp_6d0505c51c3762fc0850fc0b25079e59}{bridge2} = \&\hyperlink{solid__objects_8cpp_7108a62857bd820cbf14fba640c38ebd}{bridge2Struct}
\item 
\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_109ef400588c70a123f49b3783d51f66}{mast\-Struct}
\begin{CompactList}\small\item\em mast \item\end{CompactList}\item 
\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ \hyperlink{solid__objects_8cpp_1b75f7809216491663e2349e833cd676}{mast} = \&\hyperlink{solid__objects_8cpp_109ef400588c70a123f49b3783d51f66}{mast\-Struct}
\item 
\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_fa641350ff14eb55060d6f5bc71a1fbe}{foil\-Right\-Struct}
\begin{CompactList}\small\item\em right foil \item\end{CompactList}\item 
\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ \hyperlink{solid__objects_8cpp_33d6c55c6697013d5025b257e4b4038e}{foilr} = \&\hyperlink{solid__objects_8cpp_fa641350ff14eb55060d6f5bc71a1fbe}{foil\-Right\-Struct}
\item 
\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_5e584d5b0a859df8b2f65542c5f1ad23}{foil\-Left\-Struct}
\begin{CompactList}\small\item\em left foil \item\end{CompactList}\item 
\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ \hyperlink{solid__objects_8cpp_8a312281f8e55449cd664f88d1f657bc}{foill} = \&\hyperlink{solid__objects_8cpp_5e584d5b0a859df8b2f65542c5f1ad23}{foil\-Left\-Struct}
\item 
\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_38c0e51f1e7052afa86ef9ef3e63dc1c}{yaw\-Struct}
\begin{CompactList}\small\item\em yaw \item\end{CompactList}\item 
\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ \hyperlink{solid__objects_8cpp_6b6a69df54662c3d183010761a65cf66}{yaw} = \&\hyperlink{solid__objects_8cpp_38c0e51f1e7052afa86ef9ef3e63dc1c}{yaw\-Struct}
\item 
\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_cdb524f78247b7d162c78a2ab01a574f}{pitch\-Struct}
\begin{CompactList}\small\item\em pitch \item\end{CompactList}\item 
\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ \hyperlink{solid__objects_8cpp_b922ce248913c8185d6d7d648c182cd3}{pitch} = \&\hyperlink{solid__objects_8cpp_cdb524f78247b7d162c78a2ab01a574f}{pitch\-Struct}
\end{CompactItemize}


\subsection{Detailed Description}
\begin{Desc}
\item[Author:]\href{mailto:basile.graf@epfl.ch}{\tt basile.graf@epfl.ch}\end{Desc}
This file relates to all graphical objects. \hyperlink{struct_solid_object}{Solid\-Object} is the 3D desription of an object like a boat hull. This file contains also functions to draw navigation instruments on the screen. 

Definition in file \hyperlink{solid__objects_8cpp-source}{solid\_\-objects.cpp}.

\subsection{Function Documentation}
\hypertarget{solid__objects_8cpp_6b4c2c288966bb2692c0509017656ea0}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!Boat_create@{Boat\_\-create}}
\index{Boat_create@{Boat\_\-create}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[Boat\_\-create]{\setlength{\rightskip}{0pt plus 5cm}void Boat\_\-create (\hyperlink{structdatas}{datas} $\ast$ {\em d})}}
\label{solid__objects_8cpp_6b4c2c288966bb2692c0509017656ea0}


Creates and defines all boat related \hyperlink{struct_solid_object}{Solid\-Object} objects. 

Create and fill all boat informations (coordinates,...) \par
 All hull coordinates are computed/defined herein. Have a look to the code! \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em $\ast$d}]: pointer to the datas data-structure \end{description}
\end{Desc}


Definition at line 538 of file solid\_\-objects.cpp.

References Solid\-Object::B, bridge2, bridge\-Main, foill, foilr, Solid\-Object::G, hull, datas::Long, l\-Swimm, mast, pitch, Solid\-Object::R, r\-Swimm, Solid\-Object\_\-create(), Solid\-Object::X, datas::x\_\-yaw, Solid\-Object::Y, datas::y\_\-yaw, yaw, Solid\-Object::Z, and datas::z\_\-foils.

Referenced by mex\-Function().\hypertarget{solid__objects_8cpp_db325cc23dfae772457e4b4fd48ffe90}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!Boat_delete@{Boat\_\-delete}}
\index{Boat_delete@{Boat\_\-delete}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[Boat\_\-delete]{\setlength{\rightskip}{0pt plus 5cm}void Boat\_\-delete ()}}
\label{solid__objects_8cpp_db325cc23dfae772457e4b4fd48ffe90}


Deletes the boat. 

Deletes all \hyperlink{struct_solid_object}{Solid\-Object} objects used in drawing the boat using \hyperlink{solid__objects_8cpp_067f2dfb7094da8f0eac9561b42ba047}{Solid\-Object\_\-delete()} 

Definition at line 514 of file solid\_\-objects.cpp.

References bridge2, bridge\-Main, foill, foilr, hull, l\-Swimm, mast, pitch, r\-Swimm, Solid\-Object\_\-delete(), and yaw.

Referenced by mex\-Function().\hypertarget{solid__objects_8cpp_6ea315967f0750817445fa9d4a279dd8}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!Boat_draw@{Boat\_\-draw}}
\index{Boat_draw@{Boat\_\-draw}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[Boat\_\-draw]{\setlength{\rightskip}{0pt plus 5cm}void Boat\_\-draw ()}}
\label{solid__objects_8cpp_6ea315967f0750817445fa9d4a279dd8}


Draws the boat. 

Draws the boat once it has been created and defined by \hyperlink{solid__objects_8cpp_6b4c2c288966bb2692c0509017656ea0}{Boat\_\-create()}. This function uses calls to \hyperlink{solid__objects_8cpp_a9cbac01dcbf6ed6d3cf042a8a349aa6}{Solid\-Object\_\-draw()}. The code of this function contains Open\-GL code. 

Definition at line 494 of file solid\_\-objects.cpp.

References bridge2, bridge\-Main, foill, foilr, hull, l\-Swimm, mast, pitch, r\-Swimm, Solid\-Object\_\-draw(), and yaw.

Referenced by Draw\-GLScene().\hypertarget{solid__objects_8cpp_a5ab64f26bf1f5b1bf9a57f0ada97833}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!cross_product@{cross\_\-product}}
\index{cross_product@{cross\_\-product}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[cross\_\-product]{\setlength{\rightskip}{0pt plus 5cm}void cross\_\-product (float $\ast$ {\em va}, float $\ast$ {\em vb}, float $\ast$ {\em vc})}}
\label{solid__objects_8cpp_a5ab64f26bf1f5b1bf9a57f0ada97833}


Computes the cross-product. 

$ v_c = v_a \times v_b $ \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em $\ast$va}]: pointer to float array of 3 elements ($ v_a $) \item[{\em $\ast$vb}]: pointer to float array of 3 elements ($ v_b $) \item[{\em $\ast$vc}]: pointer to float array of 3 elements ($ v_c $) \end{description}
\end{Desc}


Definition at line 118 of file solid\_\-objects.cpp.

Referenced by Girouette\_\-draw(), one\_\-normal(), and Sail\_\-create\_\-and\_\-draw().\hypertarget{solid__objects_8cpp_53f39f9e1e74394d7a9714a5e5e8313a}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!Girouette_draw@{Girouette\_\-draw}}
\index{Girouette_draw@{Girouette\_\-draw}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[Girouette\_\-draw]{\setlength{\rightskip}{0pt plus 5cm}void Girouette\_\-draw (\hyperlink{structdatas}{datas} $\ast$ {\em d})}}
\label{solid__objects_8cpp_53f39f9e1e74394d7a9714a5e5e8313a}


Draws a girouette on the screen. 

Draws a girouette instrument indicating relative wind direction as an on screen instrument. The code of this function contains Open\-GL code. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em $\ast$d}]: pointer to the datas data-structure \end{description}
\end{Desc}


Definition at line 402 of file solid\_\-objects.cpp.

References datas::angle\_\-girouette, cross\_\-product(), datas::dx, datas::dy, f(), datas::tan\-Angle\_\-sail, datas::Wind\_\-x, and datas::Wind\_\-y.

Referenced by Draw\-GLScene().\hypertarget{solid__objects_8cpp_32d59b6583b22556df056cda02a3c808}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!HSlider_draw@{HSlider\_\-draw}}
\index{HSlider_draw@{HSlider\_\-draw}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[HSlider\_\-draw]{\setlength{\rightskip}{0pt plus 5cm}void HSlider\_\-draw (float {\em x})}}
\label{solid__objects_8cpp_32d59b6583b22556df056cda02a3c808}


Draws a \char`\"{}horizontal slider instrument\char`\"{} on the screen. 

Draws a horizontal slider. The code of this function contains Open\-GL code. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em x,:}]slider position, $ -1.0 \leq x \leq 1.0$, clipped outside this range \end{description}
\end{Desc}


Definition at line 372 of file solid\_\-objects.cpp.

References f().

Referenced by Draw\-GLScene().\hypertarget{solid__objects_8cpp_11a8f8b0c5b4ecabbcab9390e5992e2d}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!one_normal@{one\_\-normal}}
\index{one_normal@{one\_\-normal}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[one\_\-normal]{\setlength{\rightskip}{0pt plus 5cm}void one\_\-normal (float $\ast$ {\em v1}, float $\ast$ {\em v2}, float $\ast$ {\em v3}, float $\ast$ {\em v4}, float $\ast$ {\em vn})}}
\label{solid__objects_8cpp_11a8f8b0c5b4ecabbcab9390e5992e2d}


Computes normal vector for one vertex. 

$ v_n = \frac{c}{|c|}$ \par
 $ c = v_1 \times v_2 + v_2 \times v_3 + v_3 \times v_4 + v_4 \times v_1$ \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em $\ast$v1}]: pointer to float array of 3 elements ($ v_1 $) \item[{\em $\ast$v2}]: pointer to float array of 3 elements ($ v_2 $) \item[{\em $\ast$v3}]: pointer to float array of 3 elements ($ v_3 $) \item[{\em $\ast$v4}]: pointer to float array of 3 elements ($ v_4 $) \item[{\em $\ast$vn}]: pointer to float array of 3 elements ($ v_n $) \end{description}
\end{Desc}


Definition at line 125 of file solid\_\-objects.cpp.

References cross\_\-product(), and f().

Referenced by Solid\-Object\_\-compute\_\-normals().\hypertarget{solid__objects_8cpp_785f76ac562afbb4e1665009963b228e}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!RelativeWind_draw@{RelativeWind\_\-draw}}
\index{RelativeWind_draw@{RelativeWind\_\-draw}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[RelativeWind\_\-draw]{\setlength{\rightskip}{0pt plus 5cm}void Relative\-Wind\_\-draw (\hyperlink{structdatas}{datas} $\ast$ {\em d})}}
\label{solid__objects_8cpp_785f76ac562afbb4e1665009963b228e}


Draws relative wind vector. 

Draws a relative wind vector at the top of the mast. The code of this function contains Open\-GL code. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em $\ast$d}]: pointer to the datas data-structure \end{description}
\end{Desc}


Definition at line 292 of file solid\_\-objects.cpp.

References datas::dx, datas::dy, f(), datas::L\_\-mast, datas::phi, datas::psi, datas::theta, datas::Wind\_\-x, datas::Wind\_\-y, datas::x\_\-sail, datas::y\_\-sail, and datas::z\_\-foils.

Referenced by Draw\-GLScene().\hypertarget{solid__objects_8cpp_2f28d819d61ca4d60ca0c78ba39c8c32}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!Sail_create_and_draw@{Sail\_\-create\_\-and\_\-draw}}
\index{Sail_create_and_draw@{Sail\_\-create\_\-and\_\-draw}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[Sail\_\-create\_\-and\_\-draw]{\setlength{\rightskip}{0pt plus 5cm}void Sail\_\-create\_\-and\_\-draw (\hyperlink{structdatas}{datas} $\ast$ {\em d})}}
\label{solid__objects_8cpp_2f28d819d61ca4d60ca0c78ba39c8c32}


Create and draw the sail. 

The sail is not a \hyperlink{struct_solid_object}{Solid\-Object}. It is redefined each time it is drawn (its position relative to the boat can change). The code of this function contains Open\-GL code. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em $\ast$d}]: pointer to the datas data-structure \end{description}
\end{Desc}


Definition at line 261 of file solid\_\-objects.cpp.

References datas::Baume, cross\_\-product(), f(), datas::L\_\-mast, datas::tan\-Angle\_\-sail, datas::x\_\-sail, datas::y\_\-sail, and datas::z\_\-foils.

Referenced by Draw\-GLScene().\hypertarget{solid__objects_8cpp_81dceb9cb9518f78a99ee6c78dc84cc2}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!SolidObject_compute_normals@{SolidObject\_\-compute\_\-normals}}
\index{SolidObject_compute_normals@{SolidObject\_\-compute\_\-normals}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[SolidObject\_\-compute\_\-normals]{\setlength{\rightskip}{0pt plus 5cm}void Solid\-Object\_\-compute\_\-normals (\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ {\em so})}}
\label{solid__objects_8cpp_81dceb9cb9518f78a99ee6c78dc84cc2}


Computes the normals for a \hyperlink{struct_solid_object}{Solid\-Object}. 

Once all X-, Y- Z- coordinates of a Solid\-Objects have been defined, the vertex-normal vectors in the \hyperlink{struct_solid_object}{Solid\-Object} can be automatically filled by calling this function. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em $\ast$so,:}]pointer to the \hyperlink{struct_solid_object}{Solid\-Object} \end{description}
\end{Desc}


Definition at line 155 of file solid\_\-objects.cpp.

References Solid\-Object::M, Solid\-Object::N, Solid\-Object::n\-X, Solid\-Object::n\-Y, Solid\-Object::n\-Z, one\_\-normal(), Solid\-Object::X, Solid\-Object::Y, and Solid\-Object::Z.\hypertarget{solid__objects_8cpp_59653144565208f986cd017ce8accacc}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!SolidObject_create@{SolidObject\_\-create}}
\index{SolidObject_create@{SolidObject\_\-create}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[SolidObject\_\-create]{\setlength{\rightskip}{0pt plus 5cm}void Solid\-Object\_\-create (\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ {\em so}, int {\em N}, int {\em M})}}
\label{solid__objects_8cpp_59653144565208f986cd017ce8accacc}


Creates a solid object. 

Initializes memory for a 3D object \par
 Do not forget to call \hyperlink{solid__objects_8cpp_067f2dfb7094da8f0eac9561b42ba047}{Solid\-Object\_\-delete()} for each object created once finished!! \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em $\ast$so}]pointer to a \hyperlink{struct_solid_object}{Solid\-Object} to be initialized \item[{\em N}]length of mesh 2D arrays (coordinates, normals, color) \item[{\em M}]height of mesh 2D arrays (coordinates, normals, color) \end{description}
\end{Desc}


Definition at line 46 of file solid\_\-objects.cpp.

References Solid\-Object::B, Solid\-Object::G, Solid\-Object::M, Solid\-Object::N, Solid\-Object::n\-X, Solid\-Object::n\-Y, Solid\-Object::n\-Z, Solid\-Object::R, Solid\-Object::X, Solid\-Object::Y, and Solid\-Object::Z.

Referenced by Boat\_\-create().\hypertarget{solid__objects_8cpp_067f2dfb7094da8f0eac9561b42ba047}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!SolidObject_delete@{SolidObject\_\-delete}}
\index{SolidObject_delete@{SolidObject\_\-delete}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[SolidObject\_\-delete]{\setlength{\rightskip}{0pt plus 5cm}void Solid\-Object\_\-delete (\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ {\em so})}}
\label{solid__objects_8cpp_067f2dfb7094da8f0eac9561b42ba047}


Deletes a solid object. 

Free memory used by a 3D object \par
 To be used after every creation with \hyperlink{solid__objects_8cpp_59653144565208f986cd017ce8accacc}{Solid\-Object\_\-create()} 

Definition at line 82 of file solid\_\-objects.cpp.

References Solid\-Object::B, Solid\-Object::G, Solid\-Object::N, Solid\-Object::n\-X, Solid\-Object::n\-Y, Solid\-Object::n\-Z, Solid\-Object::R, Solid\-Object::X, Solid\-Object::Y, and Solid\-Object::Z.

Referenced by Boat\_\-delete().\hypertarget{solid__objects_8cpp_a9cbac01dcbf6ed6d3cf042a8a349aa6}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!SolidObject_draw@{SolidObject\_\-draw}}
\index{SolidObject_draw@{SolidObject\_\-draw}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[SolidObject\_\-draw]{\setlength{\rightskip}{0pt plus 5cm}void Solid\-Object\_\-draw (\hyperlink{struct_solid_object}{Solid\-Object} $\ast$ {\em so})}}
\label{solid__objects_8cpp_a9cbac01dcbf6ed6d3cf042a8a349aa6}




Definition at line 228 of file solid\_\-objects.cpp.

References Solid\-Object::B, Solid\-Object::G, Solid\-Object::M, Solid\-Object::N, Solid\-Object::n\-X, Solid\-Object::n\-Y, Solid\-Object::n\-Z, Solid\-Object::R, Solid\-Object::X, Solid\-Object::Y, and Solid\-Object::Z.

Referenced by Boat\_\-draw().\hypertarget{solid__objects_8cpp_e92c036a4a9e1eab55015957740f36e6}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!Target_draw@{Target\_\-draw}}
\index{Target_draw@{Target\_\-draw}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[Target\_\-draw]{\setlength{\rightskip}{0pt plus 5cm}void Target\_\-draw (float {\em x}, float {\em y})}}
\label{solid__objects_8cpp_e92c036a4a9e1eab55015957740f36e6}


Draws a \char`\"{}target instrument\char`\"{} on the screen. 

Draws a circular target with a cross inside. The code of this function contains Open\-GL code. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em x,:}]cross position, $ -1.0 \leq x \leq 1.0$, clipped outside this range \item[{\em y,:}]cross position, $ -1.0 \leq y \leq 1.0$, clipped outside this range \end{description}
\end{Desc}


Definition at line 309 of file solid\_\-objects.cpp.

References f().

Referenced by Draw\-GLScene().\hypertarget{solid__objects_8cpp_6a9f1c38f7da2f7e560c3e29e2fceaeb}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!VSlider_draw@{VSlider\_\-draw}}
\index{VSlider_draw@{VSlider\_\-draw}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[VSlider\_\-draw]{\setlength{\rightskip}{0pt plus 5cm}void VSlider\_\-draw (float {\em x})}}
\label{solid__objects_8cpp_6a9f1c38f7da2f7e560c3e29e2fceaeb}


Draws a \char`\"{}vertical slider instrument\char`\"{} on the screen. 

Draws a vertical slider. The code of this function contains Open\-GL code. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em x,:}]slider position, $ -1.0 \leq x \leq 1.0$, clipped outside this range \end{description}
\end{Desc}


Definition at line 343 of file solid\_\-objects.cpp.

References f().

Referenced by Draw\-GLScene().

\subsection{Variable Documentation}
\hypertarget{solid__objects_8cpp_6d0505c51c3762fc0850fc0b25079e59}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!bridge2@{bridge2}}
\index{bridge2@{bridge2}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[bridge2]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object}$\ast$ \hyperlink{solid__objects_8cpp_6d0505c51c3762fc0850fc0b25079e59}{bridge2} = \&\hyperlink{solid__objects_8cpp_7108a62857bd820cbf14fba640c38ebd}{bridge2Struct}}}
\label{solid__objects_8cpp_6d0505c51c3762fc0850fc0b25079e59}




Definition at line 27 of file solid\_\-objects.cpp.

Referenced by Boat\_\-create(), Boat\_\-delete(), and Boat\_\-draw().\hypertarget{solid__objects_8cpp_7108a62857bd820cbf14fba640c38ebd}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!bridge2Struct@{bridge2Struct}}
\index{bridge2Struct@{bridge2Struct}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[bridge2Struct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_7108a62857bd820cbf14fba640c38ebd}{bridge2Struct}}}
\label{solid__objects_8cpp_7108a62857bd820cbf14fba640c38ebd}


bridge 2 



Definition at line 26 of file solid\_\-objects.cpp.\hypertarget{solid__objects_8cpp_2381ddaa3ad4a7da9e1863d68d6b75f6}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!bridgeMain@{bridgeMain}}
\index{bridgeMain@{bridgeMain}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[bridgeMain]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object}$\ast$ \hyperlink{solid__objects_8cpp_2381ddaa3ad4a7da9e1863d68d6b75f6}{bridge\-Main} = \&\hyperlink{solid__objects_8cpp_9807ddaa814777f811c6b11eee956784}{bridge\-Main\-Struct}}}
\label{solid__objects_8cpp_2381ddaa3ad4a7da9e1863d68d6b75f6}




Definition at line 24 of file solid\_\-objects.cpp.

Referenced by Boat\_\-create(), Boat\_\-delete(), and Boat\_\-draw().\hypertarget{solid__objects_8cpp_9807ddaa814777f811c6b11eee956784}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!bridgeMainStruct@{bridgeMainStruct}}
\index{bridgeMainStruct@{bridgeMainStruct}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[bridgeMainStruct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_9807ddaa814777f811c6b11eee956784}{bridge\-Main\-Struct}}}
\label{solid__objects_8cpp_9807ddaa814777f811c6b11eee956784}


front bridge 



Definition at line 23 of file solid\_\-objects.cpp.\hypertarget{solid__objects_8cpp_8a312281f8e55449cd664f88d1f657bc}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!foill@{foill}}
\index{foill@{foill}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[foill]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object}$\ast$ \hyperlink{solid__objects_8cpp_8a312281f8e55449cd664f88d1f657bc}{foill} = \&\hyperlink{solid__objects_8cpp_5e584d5b0a859df8b2f65542c5f1ad23}{foil\-Left\-Struct}}}
\label{solid__objects_8cpp_8a312281f8e55449cd664f88d1f657bc}




Definition at line 36 of file solid\_\-objects.cpp.

Referenced by Boat\_\-create(), Boat\_\-delete(), and Boat\_\-draw().\hypertarget{solid__objects_8cpp_5e584d5b0a859df8b2f65542c5f1ad23}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!foilLeftStruct@{foilLeftStruct}}
\index{foilLeftStruct@{foilLeftStruct}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[foilLeftStruct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_5e584d5b0a859df8b2f65542c5f1ad23}{foil\-Left\-Struct}}}
\label{solid__objects_8cpp_5e584d5b0a859df8b2f65542c5f1ad23}


left foil 



Definition at line 35 of file solid\_\-objects.cpp.\hypertarget{solid__objects_8cpp_33d6c55c6697013d5025b257e4b4038e}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!foilr@{foilr}}
\index{foilr@{foilr}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[foilr]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object}$\ast$ \hyperlink{solid__objects_8cpp_33d6c55c6697013d5025b257e4b4038e}{foilr} = \&\hyperlink{solid__objects_8cpp_fa641350ff14eb55060d6f5bc71a1fbe}{foil\-Right\-Struct}}}
\label{solid__objects_8cpp_33d6c55c6697013d5025b257e4b4038e}




Definition at line 33 of file solid\_\-objects.cpp.

Referenced by Boat\_\-create(), Boat\_\-delete(), and Boat\_\-draw().\hypertarget{solid__objects_8cpp_fa641350ff14eb55060d6f5bc71a1fbe}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!foilRightStruct@{foilRightStruct}}
\index{foilRightStruct@{foilRightStruct}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[foilRightStruct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_fa641350ff14eb55060d6f5bc71a1fbe}{foil\-Right\-Struct}}}
\label{solid__objects_8cpp_fa641350ff14eb55060d6f5bc71a1fbe}


right foil 



Definition at line 32 of file solid\_\-objects.cpp.\hypertarget{solid__objects_8cpp_5c6d9f8b732fae12e2ebe422750176a8}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!hull@{hull}}
\index{hull@{hull}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[hull]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object}$\ast$ \hyperlink{solid__objects_8cpp_5c6d9f8b732fae12e2ebe422750176a8}{hull} = \&\hyperlink{solid__objects_8cpp_1a998cecb5d07458ca595b56b89042db}{hull\-Struct}}}
\label{solid__objects_8cpp_5c6d9f8b732fae12e2ebe422750176a8}




Definition at line 15 of file solid\_\-objects.cpp.

Referenced by Boat\_\-create(), Boat\_\-delete(), and Boat\_\-draw().\hypertarget{solid__objects_8cpp_1a998cecb5d07458ca595b56b89042db}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!hullStruct@{hullStruct}}
\index{hullStruct@{hullStruct}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[hullStruct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_1a998cecb5d07458ca595b56b89042db}{hull\-Struct}}}
\label{solid__objects_8cpp_1a998cecb5d07458ca595b56b89042db}


central hydroptere hull 



Definition at line 14 of file solid\_\-objects.cpp.\hypertarget{solid__objects_8cpp_786f47f28d6929467c63780dccc9afa4}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!lSwimm@{lSwimm}}
\index{lSwimm@{lSwimm}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[lSwimm]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object}$\ast$ \hyperlink{solid__objects_8cpp_786f47f28d6929467c63780dccc9afa4}{l\-Swimm} = \&\hyperlink{solid__objects_8cpp_3b5c4112cc1e219e7e1a15b1f392bd6b}{l\-Swimm\-Struct}}}
\label{solid__objects_8cpp_786f47f28d6929467c63780dccc9afa4}




Definition at line 21 of file solid\_\-objects.cpp.

Referenced by Boat\_\-create(), Boat\_\-delete(), and Boat\_\-draw().\hypertarget{solid__objects_8cpp_3b5c4112cc1e219e7e1a15b1f392bd6b}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!lSwimmStruct@{lSwimmStruct}}
\index{lSwimmStruct@{lSwimmStruct}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[lSwimmStruct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_3b5c4112cc1e219e7e1a15b1f392bd6b}{l\-Swimm\-Struct}}}
\label{solid__objects_8cpp_3b5c4112cc1e219e7e1a15b1f392bd6b}


left swimmer 



Definition at line 20 of file solid\_\-objects.cpp.\hypertarget{solid__objects_8cpp_1b75f7809216491663e2349e833cd676}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!mast@{mast}}
\index{mast@{mast}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[mast]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object}$\ast$ \hyperlink{solid__objects_8cpp_1b75f7809216491663e2349e833cd676}{mast} = \&\hyperlink{solid__objects_8cpp_109ef400588c70a123f49b3783d51f66}{mast\-Struct}}}
\label{solid__objects_8cpp_1b75f7809216491663e2349e833cd676}




Definition at line 30 of file solid\_\-objects.cpp.

Referenced by Boat\_\-create(), Boat\_\-delete(), and Boat\_\-draw().\hypertarget{solid__objects_8cpp_109ef400588c70a123f49b3783d51f66}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!mastStruct@{mastStruct}}
\index{mastStruct@{mastStruct}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[mastStruct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_109ef400588c70a123f49b3783d51f66}{mast\-Struct}}}
\label{solid__objects_8cpp_109ef400588c70a123f49b3783d51f66}


mast 



Definition at line 29 of file solid\_\-objects.cpp.\hypertarget{solid__objects_8cpp_b922ce248913c8185d6d7d648c182cd3}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!pitch@{pitch}}
\index{pitch@{pitch}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[pitch]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object}$\ast$ \hyperlink{solid__objects_8cpp_b922ce248913c8185d6d7d648c182cd3}{pitch} = \&\hyperlink{solid__objects_8cpp_cdb524f78247b7d162c78a2ab01a574f}{pitch\-Struct}}}
\label{solid__objects_8cpp_b922ce248913c8185d6d7d648c182cd3}




Definition at line 42 of file solid\_\-objects.cpp.

Referenced by Boat\_\-create(), Boat\_\-delete(), and Boat\_\-draw().\hypertarget{solid__objects_8cpp_cdb524f78247b7d162c78a2ab01a574f}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!pitchStruct@{pitchStruct}}
\index{pitchStruct@{pitchStruct}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[pitchStruct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_cdb524f78247b7d162c78a2ab01a574f}{pitch\-Struct}}}
\label{solid__objects_8cpp_cdb524f78247b7d162c78a2ab01a574f}


pitch 



Definition at line 41 of file solid\_\-objects.cpp.\hypertarget{solid__objects_8cpp_be35e40eeed8d7e8da6c44353b487d19}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!rSwimm@{rSwimm}}
\index{rSwimm@{rSwimm}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[rSwimm]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object}$\ast$ \hyperlink{solid__objects_8cpp_be35e40eeed8d7e8da6c44353b487d19}{r\-Swimm} = \&\hyperlink{solid__objects_8cpp_e9c184df8ee8c2bf65108e017ebb05d7}{r\-Swimm\-Struct}}}
\label{solid__objects_8cpp_be35e40eeed8d7e8da6c44353b487d19}




Definition at line 18 of file solid\_\-objects.cpp.

Referenced by Boat\_\-create(), Boat\_\-delete(), and Boat\_\-draw().\hypertarget{solid__objects_8cpp_e9c184df8ee8c2bf65108e017ebb05d7}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!rSwimmStruct@{rSwimmStruct}}
\index{rSwimmStruct@{rSwimmStruct}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[rSwimmStruct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_e9c184df8ee8c2bf65108e017ebb05d7}{r\-Swimm\-Struct}}}
\label{solid__objects_8cpp_e9c184df8ee8c2bf65108e017ebb05d7}


right swimmer 



Definition at line 17 of file solid\_\-objects.cpp.\hypertarget{solid__objects_8cpp_6b6a69df54662c3d183010761a65cf66}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!yaw@{yaw}}
\index{yaw@{yaw}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[yaw]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object}$\ast$ \hyperlink{solid__objects_8cpp_6b6a69df54662c3d183010761a65cf66}{yaw} = \&\hyperlink{solid__objects_8cpp_38c0e51f1e7052afa86ef9ef3e63dc1c}{yaw\-Struct}}}
\label{solid__objects_8cpp_6b6a69df54662c3d183010761a65cf66}




Definition at line 39 of file solid\_\-objects.cpp.

Referenced by Boat\_\-create(), Boat\_\-delete(), and Boat\_\-draw().\hypertarget{solid__objects_8cpp_38c0e51f1e7052afa86ef9ef3e63dc1c}{
\index{solid_objects.cpp@{solid\_\-objects.cpp}!yawStruct@{yawStruct}}
\index{yawStruct@{yawStruct}!solid_objects.cpp@{solid\_\-objects.cpp}}
\subsubsection[yawStruct]{\setlength{\rightskip}{0pt plus 5cm}\hyperlink{struct_solid_object}{Solid\-Object} \hyperlink{solid__objects_8cpp_38c0e51f1e7052afa86ef9ef3e63dc1c}{yaw\-Struct}}}
\label{solid__objects_8cpp_38c0e51f1e7052afa86ef9ef3e63dc1c}


yaw 



Definition at line 38 of file solid\_\-objects.cpp.