\hypertarget{a07272}{}\section{A\+CG\+:\+:Color\+Stack Class Reference}
\label{a07272}\index{A\+C\+G\+::\+Color\+Stack@{A\+C\+G\+::\+Color\+Stack}}


{\ttfamily \#include $<$Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+G\+L/\+Color\+Stack.\+hh$>$}

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{a07276}{Node}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07272_a3c0b2272c27e354116a708a9e041a141}\label{a07272_a3c0b2272c27e354116a708a9e041a141}} 
\hyperlink{a07272_a3c0b2272c27e354116a708a9e041a141}{Color\+Stack} ()
\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07272_a2f2681a75ec7a3e7d1495a7e87dbcc9e}\label{a07272_a2f2681a75ec7a3e7d1495a7e87dbcc9e}} 
\hyperlink{a07272_a2f2681a75ec7a3e7d1495a7e87dbcc9e}{$\sim$\+Color\+Stack} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07272_a41a594463a36353534856b48d15927c0}\label{a07272_a41a594463a36353534856b48d15927c0}} 
void \hyperlink{a07272_a41a594463a36353534856b48d15927c0}{initialize} (\hyperlink{a07452}{A\+C\+G\+::\+G\+L\+State} $\ast$)
\begin{DoxyCompactList}\small\item\em init (takes current GL context/ like gl\+Init\+Names (); gl\+Push\+Name (0)) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07272_a702686ad2f246d1185dc3b678acca5a9}\label{a07272_a702686ad2f246d1185dc3b678acca5a9}} 
bool \hyperlink{a07272_a702686ad2f246d1185dc3b678acca5a9}{initialized} () const
\begin{DoxyCompactList}\small\item\em has it been initialized? \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07272_a1309615387e31e36289af156ed9aecb1}\label{a07272_a1309615387e31e36289af156ed9aecb1}} 
bool \hyperlink{a07272_a1309615387e31e36289af156ed9aecb1}{set\+Maximum\+Index} (size\+\_\+t \+\_\+idx)
\begin{DoxyCompactList}\small\item\em sets the maximum index number used in current node \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07272_a8e380891f54d6b4802f6757c62e79f29}\label{a07272_a8e380891f54d6b4802f6757c62e79f29}} 
void \hyperlink{a07272_a8e380891f54d6b4802f6757c62e79f29}{set\+Index} (size\+\_\+t \+\_\+idx)
\begin{DoxyCompactList}\small\item\em sets the current color the given index (like gl\+Load\+Name) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07272_a05f228def5156adbf309a79275852b69}\label{a07272_a05f228def5156adbf309a79275852b69}} 
\hyperlink{a06176_adb89a8d57b6d179ad535c0880a8b616e}{Vec4uc} \hyperlink{a07272_a05f228def5156adbf309a79275852b69}{get\+Index\+Color} (size\+\_\+t \+\_\+idx)
\begin{DoxyCompactList}\small\item\em gets the color instead of setting it directly \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07272_a81ccc0be1ac327ab06b3bcdc466f91e0}\label{a07272_a81ccc0be1ac327ab06b3bcdc466f91e0}} 
void \hyperlink{a07272_a81ccc0be1ac327ab06b3bcdc466f91e0}{push\+Index} (size\+\_\+t \+\_\+idx)
\begin{DoxyCompactList}\small\item\em creates a new node the stack (like gl\+Push\+Name) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07272_a4c9339096a4f3d8533f5bd4dec30e4ca}\label{a07272_a4c9339096a4f3d8533f5bd4dec30e4ca}} 
void \hyperlink{a07272_a4c9339096a4f3d8533f5bd4dec30e4ca}{pop\+Index} ()
\begin{DoxyCompactList}\small\item\em pops the current node from the stack (like gl\+Pop\+Name) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07272_adf477d5be0fa53416c9e21d661d8205d}\label{a07272_adf477d5be0fa53416c9e21d661d8205d}} 
std\+::vector$<$ size\+\_\+t $>$ \hyperlink{a07272_adf477d5be0fa53416c9e21d661d8205d}{color\+To\+Stack} (\hyperlink{a06176_adb89a8d57b6d179ad535c0880a8b616e}{Vec4uc} \+\_\+rgba) const
\begin{DoxyCompactList}\small\item\em converts the given color to index values on the stack \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07272_a339d315c883189332c12e580f9c16501}\label{a07272_a339d315c883189332c12e580f9c16501}} 
size\+\_\+t \hyperlink{a07272_a339d315c883189332c12e580f9c16501}{free\+Indicies} () const
\begin{DoxyCompactList}\small\item\em returns maximal available index count \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07272_aaed88fd75874899456ece0d7ff642dfe}\label{a07272_aaed88fd75874899456ece0d7ff642dfe}} 
bool \hyperlink{a07272_aaed88fd75874899456ece0d7ff642dfe}{error} () const
\begin{DoxyCompactList}\small\item\em Did an error occur during picking. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07272_ab6cc6bdbaaa9aea0b204bacb3f333c81}\label{a07272_ab6cc6bdbaaa9aea0b204bacb3f333c81}} 
size\+\_\+t \hyperlink{a07272_ab6cc6bdbaaa9aea0b204bacb3f333c81}{current\+Index} () const
\begin{DoxyCompactList}\small\item\em returns the current color index \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07272_a11617cb5c4e449e437520f78dae1b876}\label{a07272_a11617cb5c4e449e437520f78dae1b876}} 
bool {\bfseries initialized\+\_\+}
\item 
\mbox{\Hypertarget{a07272_aca2252e241f11fc3c9cfa89d8d187e4d}\label{a07272_aca2252e241f11fc3c9cfa89d8d187e4d}} 
\hyperlink{a07280}{Color\+Translator} {\bfseries translator\+\_\+}
\item 
\mbox{\Hypertarget{a07272_a04b2a6a6779b605df964c6c6646fc18c}\label{a07272_a04b2a6a6779b605df964c6c6646fc18c}} 
\hyperlink{a07276}{Node} $\ast$ {\bfseries root\+\_\+}
\item 
\mbox{\Hypertarget{a07272_aa71c3838ed99a1bbd59b94330624ab02}\label{a07272_aa71c3838ed99a1bbd59b94330624ab02}} 
\hyperlink{a07276}{Node} $\ast$ {\bfseries current\+Node\+\_\+}
\item 
\mbox{\Hypertarget{a07272_ad0cc21b12e0a7d817a97c0e4ee36b003}\label{a07272_ad0cc21b12e0a7d817a97c0e4ee36b003}} 
bool {\bfseries error\+\_\+}
\end{DoxyCompactItemize}


\subsection{Detailed Description}
This class can be used to implement a gl picking stack based on colors 

Definition at line 73 of file Color\+Stack.\+hh.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+G\+L/Color\+Stack.\+hh\item 
Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+G\+L/Color\+Stack.\+cc\end{DoxyCompactItemize}
