\hypertarget{joystick___p_c_8cpp}{
\section{D:/Basile/Visual\-Cpp\-Projects/hydro\-MEX3/hydro\-MEX3/joystick/joystick\_\-PC.cpp File Reference}
\label{joystick___p_c_8cpp}\index{D:/Basile/VisualCppProjects/hydroMEX3/hydroMEX3/joystick/joystick_PC.cpp@{D:/Basile/VisualCppProjects/hydroMEX3/hydroMEX3/joystick/joystick\_\-PC.cpp}}
}
{\tt \#include \char`\"{}joystick\_\-PC.h\char`\"{}}\par
{\tt \#include \char`\"{}stdafx.h\char`\"{}}\par
{\tt \#include $<$windows.h$>$}\par
{\tt \#include $<$mmsystem.h$>$}\par


Include dependency graph for joystick\_\-PC.cpp:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=303pt]{joystick___p_c_8cpp__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{joystick___p_c_8cpp_961bcf0a0912e1ae0e51a5e89846ad1f}{joystick\_\-init} ()
\begin{CompactList}\small\item\em Initializes joystick stuff. \item\end{CompactList}\item 
void \hyperlink{joystick___p_c_8cpp_2a7bdfbb925135f3547113abd0e62b19}{joystick\_\-get\-XYZR} (float $\ast$X, float $\ast$Y, float $\ast$Z, float $\ast$R, bool \hyperlink{graphics__main_8cpp_5a3c2aa9a76204fb5a88ad3feaa9a0f4}{do\-X}, bool \hyperlink{graphics__main_8cpp_400d40cdb5ad93ffc84da0cc86cb351c}{do\-Y}, bool \hyperlink{graphics__main_8cpp_8ffdb1e1aa5b4f8c1f41601c9c69529a}{do\-Z}, bool \hyperlink{graphics__main_8cpp_9b61dde9e1f583fd397cc8d18889eb20}{do\-R})
\begin{CompactList}\small\item\em Get joystick position under MS Windows. \item\end{CompactList}\item 
void \hyperlink{joystick___p_c_8cpp_1323767921554cd72f51eea5bb165654}{joystick\_\-close} ()
\begin{CompactList}\small\item\em Close joystick under MS Windoze. \item\end{CompactList}\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item 
JOYINFOEX \hyperlink{joystick___p_c_8cpp_ef7b0241382ad8378d4f9ec62bb7098e}{Actual\-Pos}
\item 
DWORD \hyperlink{joystick___p_c_8cpp_25cf5da05d8e4d820d2820295c1daa12}{dw\-Boutons}
\item 
UINT \hyperlink{joystick___p_c_8cpp_8af1031491e0266cd3629b3775a041b2}{u\-Max} \mbox{[}2\mbox{]}
\item 
UINT \hyperlink{joystick___p_c_8cpp_4166033b60b7ec7da90b244c911b6353}{u\-Min} \mbox{[}2\mbox{]}
\item 
UINT \hyperlink{joystick___p_c_8cpp_af4a787dc0e471bac3ce81bf55d0a5c1}{u\-Pool\-Period}
\item 
JOYCAPS \hyperlink{joystick___p_c_8cpp_684a6e1e9cad0aaa4d530ed6dd9e21f8}{Infos\-Caps}
\item 
BOOL \hyperlink{joystick___p_c_8cpp_415483184b608ea606b302cec9d7aa63}{b\-Stop}
\item 
POINT \hyperlink{joystick___p_c_8cpp_c5713e881857a3c88e2659ceb7f7aa23}{Curseur}
\end{CompactItemize}


\subsection{Detailed Description}
\begin{Desc}
\item[Author:]\href{mailto:basile.graf@epfl.ch}{\tt basile.graf@epfl.ch}\end{Desc}
This file contains functions related to the joystick under MS Windoze 

Definition in file \hyperlink{joystick___p_c_8cpp-source}{joystick\_\-PC.cpp}.

\subsection{Function Documentation}
\hypertarget{joystick___p_c_8cpp_1323767921554cd72f51eea5bb165654}{
\index{joystick_PC.cpp@{joystick\_\-PC.cpp}!joystick_close@{joystick\_\-close}}
\index{joystick_close@{joystick\_\-close}!joystick_PC.cpp@{joystick\_\-PC.cpp}}
\subsubsection[joystick\_\-close]{\setlength{\rightskip}{0pt plus 5cm}void joystick\_\-close ()}}
\label{joystick___p_c_8cpp_1323767921554cd72f51eea5bb165654}


Close joystick under MS Windoze. 

No need to close anything under Windows =$>$ this function does nothing... 

Definition at line 89 of file joystick\_\-PC.cpp.

Referenced by draw\_\-graphics\_\-kill().\hypertarget{joystick___p_c_8cpp_2a7bdfbb925135f3547113abd0e62b19}{
\index{joystick_PC.cpp@{joystick\_\-PC.cpp}!joystick_getXYZR@{joystick\_\-getXYZR}}
\index{joystick_getXYZR@{joystick\_\-getXYZR}!joystick_PC.cpp@{joystick\_\-PC.cpp}}
\subsubsection[joystick\_\-getXYZR]{\setlength{\rightskip}{0pt plus 5cm}void joystick\_\-get\-XYZR (float $\ast$ {\em X}, float $\ast$ {\em Y}, float $\ast$ {\em Z}, float $\ast$ {\em R}, bool {\em do\-X}, bool {\em do\-Y}, bool {\em do\-Z}, bool {\em do\-R})}}
\label{joystick___p_c_8cpp_2a7bdfbb925135f3547113abd0e62b19}


Get joystick position under MS Windows. 

Get the joystick positions for the axes specified. Values should be between -1.0 and 1.0 \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em $\ast$X}]pointer to the X axis variable \item[{\em $\ast$Y}]pointer to the Y axis variable \item[{\em $\ast$Z}]pointer to the Z axis variable \item[{\em $\ast$R}]pointer to the R axis variable \item[{\em do\-X}]modify X value only if true \item[{\em do\-Y}]modify Y value only if true \item[{\em do\-Z}]modify Z value only if true \item[{\em do\-R}]modify R value only if true \end{description}
\end{Desc}


Definition at line 68 of file joystick\_\-PC.cpp.

References Actual\-Pos, and f().

Referenced by Draw\-GLScene().\hypertarget{joystick___p_c_8cpp_961bcf0a0912e1ae0e51a5e89846ad1f}{
\index{joystick_PC.cpp@{joystick\_\-PC.cpp}!joystick_init@{joystick\_\-init}}
\index{joystick_init@{joystick\_\-init}!joystick_PC.cpp@{joystick\_\-PC.cpp}}
\subsubsection[joystick\_\-init]{\setlength{\rightskip}{0pt plus 5cm}int joystick\_\-init ()}}
\label{joystick___p_c_8cpp_961bcf0a0912e1ae0e51a5e89846ad1f}


Initializes joystick stuff. 

Use Windows API to initialize joystick (if any connected) 

Definition at line 36 of file joystick\_\-PC.cpp.

References Actual\-Pos, dw\-Boutons, Infos\-Caps, and u\-Pool\-Period.

Referenced by draw\_\-graphics\_\-init().

\subsection{Variable Documentation}
\hypertarget{joystick___p_c_8cpp_ef7b0241382ad8378d4f9ec62bb7098e}{
\index{joystick_PC.cpp@{joystick\_\-PC.cpp}!ActualPos@{ActualPos}}
\index{ActualPos@{ActualPos}!joystick_PC.cpp@{joystick\_\-PC.cpp}}
\subsubsection[ActualPos]{\setlength{\rightskip}{0pt plus 5cm}JOYINFOEX \hyperlink{joystick___p_c_8cpp_ef7b0241382ad8378d4f9ec62bb7098e}{Actual\-Pos}}}
\label{joystick___p_c_8cpp_ef7b0241382ad8378d4f9ec62bb7098e}




Definition at line 27 of file joystick\_\-PC.cpp.

Referenced by joystick\_\-get\-XYZR(), and joystick\_\-init().\hypertarget{joystick___p_c_8cpp_415483184b608ea606b302cec9d7aa63}{
\index{joystick_PC.cpp@{joystick\_\-PC.cpp}!bStop@{bStop}}
\index{bStop@{bStop}!joystick_PC.cpp@{joystick\_\-PC.cpp}}
\subsubsection[bStop]{\setlength{\rightskip}{0pt plus 5cm}BOOL \hyperlink{joystick___p_c_8cpp_415483184b608ea606b302cec9d7aa63}{b\-Stop}}}
\label{joystick___p_c_8cpp_415483184b608ea606b302cec9d7aa63}




Definition at line 32 of file joystick\_\-PC.cpp.\hypertarget{joystick___p_c_8cpp_c5713e881857a3c88e2659ceb7f7aa23}{
\index{joystick_PC.cpp@{joystick\_\-PC.cpp}!Curseur@{Curseur}}
\index{Curseur@{Curseur}!joystick_PC.cpp@{joystick\_\-PC.cpp}}
\subsubsection[Curseur]{\setlength{\rightskip}{0pt plus 5cm}POINT \hyperlink{joystick___p_c_8cpp_c5713e881857a3c88e2659ceb7f7aa23}{Curseur}}}
\label{joystick___p_c_8cpp_c5713e881857a3c88e2659ceb7f7aa23}




Definition at line 33 of file joystick\_\-PC.cpp.\hypertarget{joystick___p_c_8cpp_25cf5da05d8e4d820d2820295c1daa12}{
\index{joystick_PC.cpp@{joystick\_\-PC.cpp}!dwBoutons@{dwBoutons}}
\index{dwBoutons@{dwBoutons}!joystick_PC.cpp@{joystick\_\-PC.cpp}}
\subsubsection[dwBoutons]{\setlength{\rightskip}{0pt plus 5cm}DWORD \hyperlink{joystick___p_c_8cpp_25cf5da05d8e4d820d2820295c1daa12}{dw\-Boutons}}}
\label{joystick___p_c_8cpp_25cf5da05d8e4d820d2820295c1daa12}




Definition at line 28 of file joystick\_\-PC.cpp.

Referenced by joystick\_\-init().\hypertarget{joystick___p_c_8cpp_684a6e1e9cad0aaa4d530ed6dd9e21f8}{
\index{joystick_PC.cpp@{joystick\_\-PC.cpp}!InfosCaps@{InfosCaps}}
\index{InfosCaps@{InfosCaps}!joystick_PC.cpp@{joystick\_\-PC.cpp}}
\subsubsection[InfosCaps]{\setlength{\rightskip}{0pt plus 5cm}JOYCAPS \hyperlink{joystick___p_c_8cpp_684a6e1e9cad0aaa4d530ed6dd9e21f8}{Infos\-Caps}}}
\label{joystick___p_c_8cpp_684a6e1e9cad0aaa4d530ed6dd9e21f8}




Definition at line 31 of file joystick\_\-PC.cpp.

Referenced by joystick\_\-init().\hypertarget{joystick___p_c_8cpp_8af1031491e0266cd3629b3775a041b2}{
\index{joystick_PC.cpp@{joystick\_\-PC.cpp}!uMax@{uMax}}
\index{uMax@{uMax}!joystick_PC.cpp@{joystick\_\-PC.cpp}}
\subsubsection[uMax]{\setlength{\rightskip}{0pt plus 5cm}UINT \hyperlink{joystick___p_c_8cpp_8af1031491e0266cd3629b3775a041b2}{u\-Max}\mbox{[}2\mbox{]}}}
\label{joystick___p_c_8cpp_8af1031491e0266cd3629b3775a041b2}




Definition at line 29 of file joystick\_\-PC.cpp.\hypertarget{joystick___p_c_8cpp_4166033b60b7ec7da90b244c911b6353}{
\index{joystick_PC.cpp@{joystick\_\-PC.cpp}!uMin@{uMin}}
\index{uMin@{uMin}!joystick_PC.cpp@{joystick\_\-PC.cpp}}
\subsubsection[uMin]{\setlength{\rightskip}{0pt plus 5cm}UINT \hyperlink{joystick___p_c_8cpp_4166033b60b7ec7da90b244c911b6353}{u\-Min}\mbox{[}2\mbox{]}}}
\label{joystick___p_c_8cpp_4166033b60b7ec7da90b244c911b6353}




Definition at line 29 of file joystick\_\-PC.cpp.\hypertarget{joystick___p_c_8cpp_af4a787dc0e471bac3ce81bf55d0a5c1}{
\index{joystick_PC.cpp@{joystick\_\-PC.cpp}!uPoolPeriod@{uPoolPeriod}}
\index{uPoolPeriod@{uPoolPeriod}!joystick_PC.cpp@{joystick\_\-PC.cpp}}
\subsubsection[uPoolPeriod]{\setlength{\rightskip}{0pt plus 5cm}UINT \hyperlink{joystick___p_c_8cpp_af4a787dc0e471bac3ce81bf55d0a5c1}{u\-Pool\-Period}}}
\label{joystick___p_c_8cpp_af4a787dc0e471bac3ce81bf55d0a5c1}




Definition at line 30 of file joystick\_\-PC.cpp.

Referenced by joystick\_\-init().