\hypertarget{class_ogre_1_1_controller}{}\doxysection{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}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_ogre_1_1_controller_a3fb917fd69fdc9d6799913970039652b}{Controller}} (const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}}$<$ T $>$ $>$ \&src, const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}}$<$ T $>$ $>$ \&dest, const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\hyperlink{class_ogre_1_1_controller_function}{Controller\+Function}}$<$ T $>$ $>$ \&func)
\begin{DoxyCompactList}\small\item\em Usual constructor. \end{DoxyCompactList}\item 
virtual \mbox{\hyperlink{class_ogre_1_1_controller_ab0ba3276e026fdd9d6779e043a250617}{$\sim$\+Controller}} ()
\begin{DoxyCompactList}\small\item\em Default d-\/tor. \end{DoxyCompactList}\item 
const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}}$<$ T $>$ $>$ \& \mbox{\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 \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\hyperlink{class_ogre_1_1_controller_function}{Controller\+Function}}$<$ T $>$ $>$ \& \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}}$<$ T $>$ $>$ \& \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_controller_af3f635f593cbe7d7973e5ab402846c5c}{set\+Destination}} (const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\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 \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_controller_af5d922ba593d4132e75ea6fad2848677}{set\+Function}} (const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_controller_a5432e56160bfd643bdcc0348ad191e11}{set\+Source}} (const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\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 \mbox{\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}


\doxysubsection{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}
\mbox{\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 \mbox{\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 \mbox{\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 \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_controller_function}{Controller\+Function}} class for details. Both the input and output values are via \mbox{\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 \mbox{\hyperlink{class_ogre_1_1_controller_manager}{Controller\+Manager}} object. 
\end{DoxyParagraph}
\begin{DoxySeeAlso}{See also}
\mbox{\hyperlink{class_ogre_1_1_controller_function}{Controller\+Function}} 
\end{DoxySeeAlso}


\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_controller_a3fb917fd69fdc9d6799913970039652b}\label{class_ogre_1_1_controller_a3fb917fd69fdc9d6799913970039652b}} 
\index{Ogre::Controller$<$ T $>$@{Ogre::Controller$<$ T $>$}!Controller@{Controller}}
\index{Controller@{Controller}!Ogre::Controller$<$ T $>$@{Ogre::Controller$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{Controller()}{Controller()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
\mbox{\hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}}$<$ T $>$\+::\mbox{\hyperlink{class_ogre_1_1_controller}{Controller}} (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}}$<$ T $>$ $>$ \&}]{src,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}}$<$ T $>$ $>$ \&}]{dest,  }\item[{const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\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 \mbox{\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$<$ T $>$@{Ogre::Controller$<$ T $>$}!````~Controller@{$\sim$Controller}}
\index{````~Controller@{$\sim$Controller}!Ogre::Controller$<$ T $>$@{Ogre::Controller$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{$\sim$Controller()}{~Controller()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
virtual \mbox{\hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}}$<$ T $>$\+::$\sim$\mbox{\hyperlink{class_ogre_1_1_controller}{Controller}} (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Default d-\/tor. 



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_controller_a5432e56160bfd643bdcc0348ad191e11}\label{class_ogre_1_1_controller_a5432e56160bfd643bdcc0348ad191e11}} 
\index{Ogre::Controller$<$ T $>$@{Ogre::Controller$<$ T $>$}!setSource@{setSource}}
\index{setSource@{setSource}!Ogre::Controller$<$ T $>$@{Ogre::Controller$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{setSource()}{setSource()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \mbox{\hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}}$<$ T $>$\+::set\+Source (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\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$<$ T $>$@{Ogre::Controller$<$ T $>$}!getSource@{getSource}}
\index{getSource@{getSource}!Ogre::Controller$<$ T $>$@{Ogre::Controller$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{getSource()}{getSource()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}}$<$T$>$ $>$\& \mbox{\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$<$ T $>$@{Ogre::Controller$<$ T $>$}!setDestination@{setDestination}}
\index{setDestination@{setDestination}!Ogre::Controller$<$ T $>$@{Ogre::Controller$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{setDestination()}{setDestination()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \mbox{\hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}}$<$ T $>$\+::set\+Destination (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\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$<$ T $>$@{Ogre::Controller$<$ T $>$}!getDestination@{getDestination}}
\index{getDestination@{getDestination}!Ogre::Controller$<$ T $>$@{Ogre::Controller$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{getDestination()}{getDestination()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\hyperlink{class_ogre_1_1_controller_value}{Controller\+Value}}$<$T$>$ $>$\& \mbox{\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$<$ T $>$@{Ogre::Controller$<$ T $>$}!getEnabled@{getEnabled}}
\index{getEnabled@{getEnabled}!Ogre::Controller$<$ T $>$@{Ogre::Controller$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{getEnabled()}{getEnabled()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
bool \mbox{\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$<$ T $>$@{Ogre::Controller$<$ T $>$}!setEnabled@{setEnabled}}
\index{setEnabled@{setEnabled}!Ogre::Controller$<$ T $>$@{Ogre::Controller$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{setEnabled()}{setEnabled()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \mbox{\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$<$ T $>$@{Ogre::Controller$<$ T $>$}!setFunction@{setFunction}}
\index{setFunction@{setFunction}!Ogre::Controller$<$ T $>$@{Ogre::Controller$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{setFunction()}{setFunction()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \mbox{\hyperlink{class_ogre_1_1_controller}{Ogre\+::\+Controller}}$<$ T $>$\+::set\+Function (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\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$<$ T $>$@{Ogre::Controller$<$ T $>$}!getFunction@{getFunction}}
\index{getFunction@{getFunction}!Ogre::Controller$<$ T $>$@{Ogre::Controller$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{getFunction()}{getFunction()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
const \mbox{\hyperlink{class_ogre_1_1_shared_ptr}{Shared\+Ptr}}$<$ \mbox{\hyperlink{class_ogre_1_1_controller_function}{Controller\+Function}}$<$T$>$ $>$\& \mbox{\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$<$ T $>$@{Ogre::Controller$<$ T $>$}!update@{update}}
\index{update@{update}!Ogre::Controller$<$ T $>$@{Ogre::Controller$<$ T $>$}}
\doxysubsubsection{\texorpdfstring{update()}{update()}}
{\footnotesize\ttfamily template$<$typename T$>$ \\
void \mbox{\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 \mbox{\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 
\mbox{\hyperlink{_ogre_controller_8h}{Ogre\+Controller.\+h}}\end{DoxyCompactItemize}
