\hypertarget{a07860}{}\section{A\+CG\+:\+:Scene\+Graph\+:\+:A\+CG\+:\+:Color\+Translator Class Reference}
\label{a07860}\index{A\+C\+G\+::\+Scene\+Graph\+::\+A\+C\+G\+::\+Color\+Translator@{A\+C\+G\+::\+Scene\+Graph\+::\+A\+C\+G\+::\+Color\+Translator}}


{\ttfamily \#include $<$Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+Scenegraph/\+Mesh\+Node2\+T\+\_\+impl.\+hh$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07860_a4238e72ec8672d156d550b8947a85b6b}\label{a07860_a4238e72ec8672d156d550b8947a85b6b}} 
\hyperlink{a07860_a4238e72ec8672d156d550b8947a85b6b}{Color\+Translator} ()
\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07860_a57b4b381e489cb878c107085abea148a}\label{a07860_a57b4b381e489cb878c107085abea148a}} 
\hyperlink{a07860_a57b4b381e489cb878c107085abea148a}{$\sim$\+Color\+Translator} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
void \hyperlink{a07860_a343292121ee0b9d420f6c8216377b195}{initialize} (\hyperlink{a07884}{A\+C\+G\+::\+G\+L\+State} $\ast$)
\item 
\mbox{\Hypertarget{a07860_ac036cbcb4a8d44e7b218a7afbea2b4b9}\label{a07860_ac036cbcb4a8d44e7b218a7afbea2b4b9}} 
bool \hyperlink{a07860_ac036cbcb4a8d44e7b218a7afbea2b4b9}{initialized} () const
\begin{DoxyCompactList}\small\item\em has it been initialized? \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07860_a2dbfb6109591045e4a3122300eaaeba3}\label{a07860_a2dbfb6109591045e4a3122300eaaeba3}} 
\hyperlink{a08448}{Vec4uc} \hyperlink{a07860_a2dbfb6109591045e4a3122300eaaeba3}{index2color} (const size\+\_\+t \+\_\+idx) const
\begin{DoxyCompactList}\small\item\em index -\/$>$ color (one buffer) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07860_ad21bbb7320227a20a546d94726e22e69}\label{a07860_ad21bbb7320227a20a546d94726e22e69}} 
size\+\_\+t \hyperlink{a07860_ad21bbb7320227a20a546d94726e22e69}{color2index} (const \hyperlink{a08448}{Vec4uc} \+\_\+rgba) const
\begin{DoxyCompactList}\small\item\em color -\/$>$ index (one buffer) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07860_a83694625b8dce934f56be7467eeed6ed}\label{a07860_a83694625b8dce934f56be7467eeed6ed}} 
size\+\_\+t \hyperlink{a07860_a83694625b8dce934f56be7467eeed6ed}{max\+\_\+index} () const
\begin{DoxyCompactList}\small\item\em returns maximal convertible index \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07860_a8ae96547391eb8dbba747f249fd1b2aa}\label{a07860_a8ae96547391eb8dbba747f249fd1b2aa}} 
bool {\bfseries initialized\+\_\+}
\item 
\mbox{\Hypertarget{a07860_a893cf6e7bebf3e97ba31021efc3bbdf8}\label{a07860_a893cf6e7bebf3e97ba31021efc3bbdf8}} 
G\+Lint {\bfseries red\+\_\+bits\+\_\+}
\item 
\mbox{\Hypertarget{a07860_ae026b3836e2403adbcd8306c6b3b8ef6}\label{a07860_ae026b3836e2403adbcd8306c6b3b8ef6}} 
G\+Lint {\bfseries green\+\_\+bits\+\_\+}
\item 
\mbox{\Hypertarget{a07860_a0e549504cfbe71f149ac28ff093e52aa}\label{a07860_a0e549504cfbe71f149ac28ff093e52aa}} 
G\+Lint {\bfseries blue\+\_\+bits\+\_\+}
\item 
\mbox{\Hypertarget{a07860_affe1d2e81aec4677a8fef7bb8daa5168}\label{a07860_affe1d2e81aec4677a8fef7bb8daa5168}} 
G\+Lint {\bfseries alpha\+\_\+bits\+\_\+}
\item 
\mbox{\Hypertarget{a07860_aa394ad0c25f9b93b83a4b1aab176241b}\label{a07860_aa394ad0c25f9b93b83a4b1aab176241b}} 
G\+Luint {\bfseries red\+\_\+mask\+\_\+}
\item 
\mbox{\Hypertarget{a07860_a62a4af8bc465cc72e077849de5899dc5}\label{a07860_a62a4af8bc465cc72e077849de5899dc5}} 
G\+Luint {\bfseries green\+\_\+mask\+\_\+}
\item 
\mbox{\Hypertarget{a07860_ac836fb3009c7d213547716a0ef3f1101}\label{a07860_ac836fb3009c7d213547716a0ef3f1101}} 
G\+Luint {\bfseries blue\+\_\+mask\+\_\+}
\item 
\mbox{\Hypertarget{a07860_ae3675e4c9d385f0c656316d55b6dc2db}\label{a07860_ae3675e4c9d385f0c656316d55b6dc2db}} 
G\+Luint {\bfseries alpha\+\_\+mask\+\_\+}
\item 
\mbox{\Hypertarget{a07860_ac2deaeb8d2ed318a51890bba82bcaa40}\label{a07860_ac2deaeb8d2ed318a51890bba82bcaa40}} 
G\+Luint {\bfseries red\+\_\+shift\+\_\+}
\item 
\mbox{\Hypertarget{a07860_a8b8808679b8bc4e7b4dd18c0076519f2}\label{a07860_a8b8808679b8bc4e7b4dd18c0076519f2}} 
G\+Luint {\bfseries green\+\_\+shift\+\_\+}
\item 
\mbox{\Hypertarget{a07860_a136c6d654ec05355fd965916fbbeaa66}\label{a07860_a136c6d654ec05355fd965916fbbeaa66}} 
G\+Luint {\bfseries blue\+\_\+shift\+\_\+}
\item 
\mbox{\Hypertarget{a07860_af97a636753796fc04e9cb27edbbc9055}\label{a07860_af97a636753796fc04e9cb27edbbc9055}} 
G\+Luint {\bfseries alpha\+\_\+shift\+\_\+}
\item 
\mbox{\Hypertarget{a07860_a790d75baae186d73eec9765a0cc3a55a}\label{a07860_a790d75baae186d73eec9765a0cc3a55a}} 
G\+Luint {\bfseries red\+\_\+round\+\_\+}
\item 
\mbox{\Hypertarget{a07860_ab79c5e60b7738f1c62ced83fb2853f25}\label{a07860_ab79c5e60b7738f1c62ced83fb2853f25}} 
G\+Luint {\bfseries green\+\_\+round\+\_\+}
\item 
\mbox{\Hypertarget{a07860_a04012088c486ffeca28c15b0e85c362b}\label{a07860_a04012088c486ffeca28c15b0e85c362b}} 
G\+Luint {\bfseries blue\+\_\+round\+\_\+}
\item 
\mbox{\Hypertarget{a07860_afaa84e6d5c771c6b90f4b3ef34cba17a}\label{a07860_afaa84e6d5c771c6b90f4b3ef34cba17a}} 
G\+Luint {\bfseries alpha\+\_\+round\+\_\+}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
This class can be used to translate colors to integers. Use this e.\+g. for color index picking, i.\+e. drawing objects using a color corresponding to an unique index. 

Definition at line 75 of file Mesh\+Node2\+T\+\_\+impl.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{a07860_a343292121ee0b9d420f6c8216377b195}\label{a07860_a343292121ee0b9d420f6c8216377b195}} 
\index{A\+C\+G\+::\+Scene\+Graph\+::\+A\+C\+G\+::\+Color\+Translator@{A\+C\+G\+::\+Scene\+Graph\+::\+A\+C\+G\+::\+Color\+Translator}!initialize@{initialize}}
\index{initialize@{initialize}!A\+C\+G\+::\+Scene\+Graph\+::\+A\+C\+G\+::\+Color\+Translator@{A\+C\+G\+::\+Scene\+Graph\+::\+A\+C\+G\+::\+Color\+Translator}}
\subsubsection{\texorpdfstring{initialize()}{initialize()}}
{\footnotesize\ttfamily void A\+C\+G\+::\+Scene\+Graph\+::\+A\+C\+G\+::\+Color\+Translator\+::initialize (\begin{DoxyParamCaption}\item[{\hyperlink{a07884}{A\+C\+G\+::\+G\+L\+State} $\ast$}]{ }\end{DoxyParamCaption})}

init (takes current GL context to get the component sizes) Can\textquotesingle{}t use constructor as we might not have a context at this point. 

The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+Scenegraph/Mesh\+Node2\+T\+\_\+impl.\+hh\end{DoxyCompactItemize}
