\hypertarget{class_ogre_1_1_waveform_controller_function}{}\doxysection{Ogre\+::Waveform\+Controller\+Function Class Reference}
\label{class_ogre_1_1_waveform_controller_function}\index{Ogre::WaveformControllerFunction@{Ogre::WaveformControllerFunction}}


Predefined controller function based on a waveform.  




{\ttfamily \#include $<$Ogre\+Predefined\+Controllers.\+h$>$}



Inheritance diagram for Ogre\+::Waveform\+Controller\+Function\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=224pt]{class_ogre_1_1_waveform_controller_function__inherit__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_waveform_controller_function_a1b83f439aae8d785f1db065ac7e59139}{Waveform\+Controller\+Function}} (\mbox{\hyperlink{group___general_gabf2e0412a783a6f708ca1a58abb45c1b}{Waveform\+Type}} w\+Type, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} base=0, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} frequency=1, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} phase=0, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} amplitude=1, bool delta\+Input=true, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} duty\+Cycle=0.\+5)
\item 
\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} \mbox{\hyperlink{class_ogre_1_1_waveform_controller_function_aec4afc09add54fd7872f78e299e1d276}{calculate}} (\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} source)
\end{DoxyCompactItemize}
\doxysubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static \mbox{\hyperlink{group___general_gafa8597a66f145eabb45e932f28fbb0b8}{Controller\+Function\+Real\+Ptr}} \mbox{\hyperlink{class_ogre_1_1_waveform_controller_function_a108505cfc1db5b0a966d4bfff1cc00ee}{create}} (\mbox{\hyperlink{group___general_gabf2e0412a783a6f708ca1a58abb45c1b}{Waveform\+Type}} w\+Type, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} base=0, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} frequency=1, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} phase=0, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} amplitude=1, bool delta\+Input=true, \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} duty\+Cycle=0.\+5)
\begin{DoxyCompactList}\small\item\em Default constructor, requires at least a wave type, other parameters can be defaulted unless required. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Predefined controller function based on a waveform. 

\begin{DoxyRemark}{Remarks}
A waveform function translates parametric input to parametric output based on a wave. 
\end{DoxyRemark}
\begin{DoxyParagraph}{}
Note that for simplicity of integration with the rest of the controller insfrastructure, the output of the wave is parametric i.\+e. 0..1, rather than the typical wave output of \mbox{[}-\/1,1\mbox{]}. To compensate for this, the traditional output of the wave is scaled by the following function before output\+: 
\end{DoxyParagraph}
\begin{DoxyParagraph}{}
output = (waveoutput + 1) $\ast$ 0.\+5 
\end{DoxyParagraph}
\begin{DoxyParagraph}{}
Hence a wave output of -\/1 becomes 0, a wave output of 1 becomes 1, and a wave output of 0 becomes 0.\+5. 
\end{DoxyParagraph}


\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_waveform_controller_function_a1b83f439aae8d785f1db065ac7e59139}\label{class_ogre_1_1_waveform_controller_function_a1b83f439aae8d785f1db065ac7e59139}} 
\index{Ogre::WaveformControllerFunction@{Ogre::WaveformControllerFunction}!WaveformControllerFunction@{WaveformControllerFunction}}
\index{WaveformControllerFunction@{WaveformControllerFunction}!Ogre::WaveformControllerFunction@{Ogre::WaveformControllerFunction}}
\doxysubsubsection{\texorpdfstring{WaveformControllerFunction()}{WaveformControllerFunction()}}
{\footnotesize\ttfamily Ogre\+::\+Waveform\+Controller\+Function\+::\+Waveform\+Controller\+Function (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group___general_gabf2e0412a783a6f708ca1a58abb45c1b}{Waveform\+Type}}}]{w\+Type,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{base = {\ttfamily 0},  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{frequency = {\ttfamily 1},  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{phase = {\ttfamily 0},  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{amplitude = {\ttfamily 1},  }\item[{bool}]{delta\+Input = {\ttfamily true},  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{duty\+Cycle = {\ttfamily 0.5} }\end{DoxyParamCaption})}

\begin{DoxyRefDesc}{Deprecated}
\item[\mbox{\hyperlink{deprecated__deprecated000109}{Deprecated}}]use \mbox{\hyperlink{class_ogre_1_1_waveform_controller_function_a108505cfc1db5b0a966d4bfff1cc00ee}{create()}} \end{DoxyRefDesc}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_waveform_controller_function_a108505cfc1db5b0a966d4bfff1cc00ee}\label{class_ogre_1_1_waveform_controller_function_a108505cfc1db5b0a966d4bfff1cc00ee}} 
\index{Ogre::WaveformControllerFunction@{Ogre::WaveformControllerFunction}!create@{create}}
\index{create@{create}!Ogre::WaveformControllerFunction@{Ogre::WaveformControllerFunction}}
\doxysubsubsection{\texorpdfstring{create()}{create()}}
{\footnotesize\ttfamily static \mbox{\hyperlink{group___general_gafa8597a66f145eabb45e932f28fbb0b8}{Controller\+Function\+Real\+Ptr}} Ogre\+::\+Waveform\+Controller\+Function\+::create (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{group___general_gabf2e0412a783a6f708ca1a58abb45c1b}{Waveform\+Type}}}]{w\+Type,  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{base = {\ttfamily 0},  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{frequency = {\ttfamily 1},  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{phase = {\ttfamily 0},  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{amplitude = {\ttfamily 1},  }\item[{bool}]{delta\+Input = {\ttfamily true},  }\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{duty\+Cycle = {\ttfamily 0.5} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Default constructor, requires at least a wave type, other parameters can be defaulted unless required. 


\begin{DoxyParams}{Parameters}
{\em w\+Type} & the shape of the wave \\
\hline
{\em base} & the base value of the output from the wave \\
\hline
{\em frequency} & the speed of the wave in cycles per second \\
\hline
{\em phase} & the offset of the start of the wave, e.\+g. 0.\+5 to start half-\/way through the wave \\
\hline
{\em amplitude} & scales the output so that instead of lying within \mbox{[}0,1\mbox{]} it lies within \mbox{[}0,1\mbox{]} $\ast$ amplitude \\
\hline
{\em delta\+Input} & If true, signifies that the input will be a delta value such that the function should add it to an internal counter before calculating the output. \\
\hline
{\em duty\+Cycle} & Used in P\+WM mode to specify the pulse width. \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{class_ogre_1_1_waveform_controller_function_aec4afc09add54fd7872f78e299e1d276}\label{class_ogre_1_1_waveform_controller_function_aec4afc09add54fd7872f78e299e1d276}} 
\index{Ogre::WaveformControllerFunction@{Ogre::WaveformControllerFunction}!calculate@{calculate}}
\index{calculate@{calculate}!Ogre::WaveformControllerFunction@{Ogre::WaveformControllerFunction}}
\doxysubsubsection{\texorpdfstring{calculate()}{calculate()}}
{\footnotesize\ttfamily \mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}} Ogre\+::\+Waveform\+Controller\+Function\+::calculate (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespace_ogre_aa3a7b6dfb905e6572d62f0dfa3d4274d}{Real}}}]{source }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [virtual]}}



Implements \mbox{\hyperlink{class_ogre_1_1_controller_function_a0f77d037a78ce3b430c0a18fbe711df0}{Ogre\+::\+Controller\+Function$<$ Real $>$}}.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{_ogre_predefined_controllers_8h}{Ogre\+Predefined\+Controllers.\+h}}\end{DoxyCompactItemize}
