\hypertarget{class_ogre_1_1_controller}{}\section{Ogre\+:\+:Controller$<$ T $>$ Class Template Reference}
\label{class_ogre_1_1_controller}\index{Ogre\+::\+Controller$<$ T $>$@{Ogre\+::\+Controller$<$ T $>$}}


Instances of this class \textquotesingle{}control\textquotesingle{} the value of another object in the system.  




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



Inheritance diagram for Ogre\+:\+:Controller$<$ T $>$\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=202pt]{class_ogre_1_1_controller__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ogre_1_1_controller_a3fb917fd69fdc9d6799913970039652b}{Controller} (const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}$<$ T $>$ $>$ \&src, const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}$<$ T $>$ $>$ \&dest, const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_function}{Controller\+Function}$<$ T $>$ $>$ \&func)
\begin{DoxyCompactList}\small\item\em Usual constructor. \end{DoxyCompactList}\item 
virtual \hyperlink{class_ogre_1_1_controller_ab0ba3276e026fdd9d6779e043a250617}{$\sim$\+Controller} ()
\begin{DoxyCompactList}\small\item\em Default d-\/tor. \end{DoxyCompactList}\item 
const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}$<$ T $>$ $>$ \& \hyperlink{class_ogre_1_1_controller_a69ed3f511be30a83b2cb353d6b401c45}{get\+Destination} (void) const
\begin{DoxyCompactList}\small\item\em Gets the output controller value. \end{DoxyCompactList}\item 
bool \hyperlink{class_ogre_1_1_controller_a677899554232e1380c6fed84e27a0120}{get\+Enabled} (void) const
\begin{DoxyCompactList}\small\item\em Returns true if this controller is currently enabled. \end{DoxyCompactList}\item 
const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_function}{Controller\+Function}$<$ T $>$ $>$ \& \hyperlink{class_ogre_1_1_controller_abde53adfa17ff64e7a1db5fb0ac89d5d}{get\+Function} (void) const
\begin{DoxyCompactList}\small\item\em Returns a pointer to the function object used by this controller. \end{DoxyCompactList}\item 
const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}$<$ T $>$ $>$ \& \hyperlink{class_ogre_1_1_controller_a8148f672163f703261e020d1bdd82277}{get\+Source} (void) const
\begin{DoxyCompactList}\small\item\em Gets the input controller value. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_controller_af3f635f593cbe7d7973e5ab402846c5c}{set\+Destination} (const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}$<$ T $>$ $>$ \&dest)
\begin{DoxyCompactList}\small\item\em Sets the output controller value. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_controller_a780a6566e4af4b23e760863f3de02028}{set\+Enabled} (bool enabled)
\begin{DoxyCompactList}\small\item\em Sets whether this controller is enabled. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_controller_af5d922ba593d4132e75ea6fad2848677}{set\+Function} (const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_function}{Controller\+Function}$<$ T $>$ $>$ \&func)
\begin{DoxyCompactList}\small\item\em Sets the function object to be used by this controller. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_controller_a5432e56160bfd643bdcc0348ad191e11}{set\+Source} (const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}$<$ T $>$ $>$ \&src)
\begin{DoxyCompactList}\small\item\em Sets the input controller value. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_controller_a4b16ce7b5a436c3f895bea7960bdcb07}{update} (void)
\begin{DoxyCompactList}\small\item\em Tells this controller to map it\textquotesingle{}s input controller value to it\textquotesingle{}s output controller value, via the controller function. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\subsubsection*{template$<$typename T$>$\newline
class Ogre\+::\+Controller$<$ T $>$}

Instances of this class \textquotesingle{}control\textquotesingle{} the value of another object in the system. 

\begin{DoxyRemark}{Remarks}
\hyperlink{class_ogre_1_1_controller}{Controller} classes are used to manage the values of object automatically based on the value of some input. For example, a \hyperlink{class_ogre_1_1_controller}{Controller} could animate a texture by controlling the current frame of the texture based on time, or a different \hyperlink{class_ogre_1_1_controller}{Controller} could change the colour of a material used for a spaceship shield mesh based on the remaining shield power level of the ship. 
\end{DoxyRemark}
\begin{DoxyParagraph}{}
The \hyperlink{class_ogre_1_1_controller}{Controller} is an intentionally abstract concept -\/ it can generate values based on input and a function, which can either be one of the standard ones supplied, or a function can be \textquotesingle{}plugged in\textquotesingle{} for custom behaviour -\/ see the \hyperlink{class_ogre_1_1_controller_function}{Controller\+Function} class for details. Both the input and output values are via \hyperlink{class_ogre_1_1_controller_value}{Controller\+Value} objects, meaning that any value can be both input and output of the controller. 
\end{DoxyParagraph}
\begin{DoxyParagraph}{}
Whilst this is very flexible, it can be a little bit confusing so to make it simpler the most often used controller setups are available by calling methods on the \hyperlink{class_ogre_1_1_controller_manager}{Controller\+Manager} object. 
\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\hyperlink{class_ogre_1_1_controller_function}{Controller\+Function} 
\end{DoxySeeAlso}


\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_controller_a3fb917fd69fdc9d6799913970039652b}\label{class_ogre_1_1_controller_a3fb917fd69fdc9d6799913970039652b}} 
\index{Ogre\+::\+Controller@{Ogre\+::\+Controller}!Controller@{Controller}}
\index{Controller@{Controller}!Ogre\+::\+Controller@{Ogre\+::\+Controller}}
\subsubsection{\texorpdfstring{Controller()}{Controller()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
\hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}$<$ T $>$\+::\hyperlink{class_ogre_1_1_controller}{Controller} (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}$<$ T $>$ $>$ \&}]{src,  }\item[{const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}$<$ T $>$ $>$ \&}]{dest,  }\item[{const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_function}{Controller\+Function}$<$ T $>$ $>$ \&}]{func }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Usual constructor. 

\begin{DoxyRemark}{Remarks}
Requires source and destination values, and a function object. None of these are destroyed with the \hyperlink{class_ogre_1_1_controller}{Controller} when it is deleted (they can be shared) so you must delete these as appropriate. 
\end{DoxyRemark}
\mbox{\Hypertarget{class_ogre_1_1_controller_ab0ba3276e026fdd9d6779e043a250617}\label{class_ogre_1_1_controller_ab0ba3276e026fdd9d6779e043a250617}} 
\index{Ogre\+::\+Controller@{Ogre\+::\+Controller}!````~Controller@{$\sim$\+Controller}}
\index{````~Controller@{$\sim$\+Controller}!Ogre\+::\+Controller@{Ogre\+::\+Controller}}
\subsubsection{\texorpdfstring{$\sim$\+Controller()}{~Controller()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
virtual \hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}$<$ T $>$\+::$\sim$\hyperlink{class_ogre_1_1_controller}{Controller} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Default d-\/tor. 



\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_controller_a5432e56160bfd643bdcc0348ad191e11}\label{class_ogre_1_1_controller_a5432e56160bfd643bdcc0348ad191e11}} 
\index{Ogre\+::\+Controller@{Ogre\+::\+Controller}!set\+Source@{set\+Source}}
\index{set\+Source@{set\+Source}!Ogre\+::\+Controller@{Ogre\+::\+Controller}}
\subsubsection{\texorpdfstring{set\+Source()}{setSource()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}$<$ T $>$\+::set\+Source (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}$<$ T $>$ $>$ \&}]{src }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Sets the input controller value. 

\mbox{\Hypertarget{class_ogre_1_1_controller_a8148f672163f703261e020d1bdd82277}\label{class_ogre_1_1_controller_a8148f672163f703261e020d1bdd82277}} 
\index{Ogre\+::\+Controller@{Ogre\+::\+Controller}!get\+Source@{get\+Source}}
\index{get\+Source@{get\+Source}!Ogre\+::\+Controller@{Ogre\+::\+Controller}}
\subsubsection{\texorpdfstring{get\+Source()}{getSource()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}$<$T$>$ $>$\& \hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}$<$ T $>$\+::get\+Source (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Gets the input controller value. 

\mbox{\Hypertarget{class_ogre_1_1_controller_af3f635f593cbe7d7973e5ab402846c5c}\label{class_ogre_1_1_controller_af3f635f593cbe7d7973e5ab402846c5c}} 
\index{Ogre\+::\+Controller@{Ogre\+::\+Controller}!set\+Destination@{set\+Destination}}
\index{set\+Destination@{set\+Destination}!Ogre\+::\+Controller@{Ogre\+::\+Controller}}
\subsubsection{\texorpdfstring{set\+Destination()}{setDestination()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}$<$ T $>$\+::set\+Destination (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}$<$ T $>$ $>$ \&}]{dest }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Sets the output controller value. 

\mbox{\Hypertarget{class_ogre_1_1_controller_a69ed3f511be30a83b2cb353d6b401c45}\label{class_ogre_1_1_controller_a69ed3f511be30a83b2cb353d6b401c45}} 
\index{Ogre\+::\+Controller@{Ogre\+::\+Controller}!get\+Destination@{get\+Destination}}
\index{get\+Destination@{get\+Destination}!Ogre\+::\+Controller@{Ogre\+::\+Controller}}
\subsubsection{\texorpdfstring{get\+Destination()}{getDestination()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}$<$T$>$ $>$\& \hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}$<$ T $>$\+::get\+Destination (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Gets the output controller value. 

\mbox{\Hypertarget{class_ogre_1_1_controller_a677899554232e1380c6fed84e27a0120}\label{class_ogre_1_1_controller_a677899554232e1380c6fed84e27a0120}} 
\index{Ogre\+::\+Controller@{Ogre\+::\+Controller}!get\+Enabled@{get\+Enabled}}
\index{get\+Enabled@{get\+Enabled}!Ogre\+::\+Controller@{Ogre\+::\+Controller}}
\subsubsection{\texorpdfstring{get\+Enabled()}{getEnabled()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
bool \hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}$<$ T $>$\+::get\+Enabled (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns true if this controller is currently enabled. 

\mbox{\Hypertarget{class_ogre_1_1_controller_a780a6566e4af4b23e760863f3de02028}\label{class_ogre_1_1_controller_a780a6566e4af4b23e760863f3de02028}} 
\index{Ogre\+::\+Controller@{Ogre\+::\+Controller}!set\+Enabled@{set\+Enabled}}
\index{set\+Enabled@{set\+Enabled}!Ogre\+::\+Controller@{Ogre\+::\+Controller}}
\subsubsection{\texorpdfstring{set\+Enabled()}{setEnabled()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}$<$ T $>$\+::set\+Enabled (\begin{DoxyParamCaption}\item[{bool}]{enabled }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Sets whether this controller is enabled. 

\mbox{\Hypertarget{class_ogre_1_1_controller_af5d922ba593d4132e75ea6fad2848677}\label{class_ogre_1_1_controller_af5d922ba593d4132e75ea6fad2848677}} 
\index{Ogre\+::\+Controller@{Ogre\+::\+Controller}!set\+Function@{set\+Function}}
\index{set\+Function@{set\+Function}!Ogre\+::\+Controller@{Ogre\+::\+Controller}}
\subsubsection{\texorpdfstring{set\+Function()}{setFunction()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}$<$ T $>$\+::set\+Function (\begin{DoxyParamCaption}\item[{const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_function}{Controller\+Function}$<$ T $>$ $>$ \&}]{func }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Sets the function object to be used by this controller. 

\mbox{\Hypertarget{class_ogre_1_1_controller_abde53adfa17ff64e7a1db5fb0ac89d5d}\label{class_ogre_1_1_controller_abde53adfa17ff64e7a1db5fb0ac89d5d}} 
\index{Ogre\+::\+Controller@{Ogre\+::\+Controller}!get\+Function@{get\+Function}}
\index{get\+Function@{get\+Function}!Ogre\+::\+Controller@{Ogre\+::\+Controller}}
\subsubsection{\texorpdfstring{get\+Function()}{getFunction()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
const \hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}$<$ \hyperlink{class_ogre_1_1_controller_function}{Controller\+Function}$<$T$>$ $>$\& \hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}$<$ T $>$\+::get\+Function (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Returns a pointer to the function object used by this controller. 

\mbox{\Hypertarget{class_ogre_1_1_controller_a4b16ce7b5a436c3f895bea7960bdcb07}\label{class_ogre_1_1_controller_a4b16ce7b5a436c3f895bea7960bdcb07}} 
\index{Ogre\+::\+Controller@{Ogre\+::\+Controller}!update@{update}}
\index{update@{update}!Ogre\+::\+Controller@{Ogre\+::\+Controller}}
\subsubsection{\texorpdfstring{update()}{update()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}$<$ T $>$\+::update (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Tells this controller to map it\textquotesingle{}s input controller value to it\textquotesingle{}s output controller value, via the controller function. 

\begin{DoxyRemark}{Remarks}
This method is called automatically every frame by \hyperlink{class_ogre_1_1_controller_manager}{Controller\+Manager}. 
\end{DoxyRemark}


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