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


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

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{a07868}{Node}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{a07864_a9577aa36eec1118a568f86211be02398}\label{a07864_a9577aa36eec1118a568f86211be02398}} 
\hyperlink{a07864_a9577aa36eec1118a568f86211be02398}{Color\+Stack} ()
\begin{DoxyCompactList}\small\item\em Default constructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07864_af34f2927feffeeaeec0a1223f2a6c898}\label{a07864_af34f2927feffeeaeec0a1223f2a6c898}} 
\hyperlink{a07864_af34f2927feffeeaeec0a1223f2a6c898}{$\sim$\+Color\+Stack} ()
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07864_a2667538ebf8d24aab2e1df3949fc6553}\label{a07864_a2667538ebf8d24aab2e1df3949fc6553}} 
void \hyperlink{a07864_a2667538ebf8d24aab2e1df3949fc6553}{initialize} (\hyperlink{a07884}{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{a07864_aa91597bd94eab4ec2ac13f9d7959176e}\label{a07864_aa91597bd94eab4ec2ac13f9d7959176e}} 
bool \hyperlink{a07864_aa91597bd94eab4ec2ac13f9d7959176e}{initialized} () const
\begin{DoxyCompactList}\small\item\em has it been initialized? \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07864_a1c65d1842831aae5f6f118506b10d8d8}\label{a07864_a1c65d1842831aae5f6f118506b10d8d8}} 
bool \hyperlink{a07864_a1c65d1842831aae5f6f118506b10d8d8}{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{a07864_aae571ea423797ba2d454d38a62cae1ac}\label{a07864_aae571ea423797ba2d454d38a62cae1ac}} 
void \hyperlink{a07864_aae571ea423797ba2d454d38a62cae1ac}{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{a07864_a587a7efc291ebc254f4b4a904bd74b54}\label{a07864_a587a7efc291ebc254f4b4a904bd74b54}} 
\hyperlink{a08448}{Vec4uc} \hyperlink{a07864_a587a7efc291ebc254f4b4a904bd74b54}{get\+Index\+Color} (size\+\_\+t \+\_\+idx)
\begin{DoxyCompactList}\small\item\em gets the color instead of setting it directly \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07864_a6f79a40225ecda48847640100a02aa08}\label{a07864_a6f79a40225ecda48847640100a02aa08}} 
void \hyperlink{a07864_a6f79a40225ecda48847640100a02aa08}{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{a07864_ab93b81c65ccf2e1d48b725d191e1f4c9}\label{a07864_ab93b81c65ccf2e1d48b725d191e1f4c9}} 
void \hyperlink{a07864_ab93b81c65ccf2e1d48b725d191e1f4c9}{pop\+Index} ()
\begin{DoxyCompactList}\small\item\em pops the current node from the stack (like gl\+Pop\+Name) \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07864_a712162f7d21f8ff31c5b911473aaa4b8}\label{a07864_a712162f7d21f8ff31c5b911473aaa4b8}} 
std\+::vector$<$ size\+\_\+t $>$ \hyperlink{a07864_a712162f7d21f8ff31c5b911473aaa4b8}{color\+To\+Stack} (\hyperlink{a08448}{Vec4uc} \+\_\+rgba) const
\begin{DoxyCompactList}\small\item\em converts the given color to index values on the stack \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07864_a526368cc5b8bb197b0d3ee4e1313cdce}\label{a07864_a526368cc5b8bb197b0d3ee4e1313cdce}} 
size\+\_\+t \hyperlink{a07864_a526368cc5b8bb197b0d3ee4e1313cdce}{free\+Indicies} () const
\begin{DoxyCompactList}\small\item\em returns maximal available index count \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07864_a7f1cdb12e6b85d0ff6cff9f497c0b82b}\label{a07864_a7f1cdb12e6b85d0ff6cff9f497c0b82b}} 
bool \hyperlink{a07864_a7f1cdb12e6b85d0ff6cff9f497c0b82b}{error} () const
\begin{DoxyCompactList}\small\item\em Did an error occur during picking. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{a07864_a05d43e97f30e69fd734e6d934a10b382}\label{a07864_a05d43e97f30e69fd734e6d934a10b382}} 
size\+\_\+t \hyperlink{a07864_a05d43e97f30e69fd734e6d934a10b382}{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{a07864_abab370bedd684b744bb34d904c67c616}\label{a07864_abab370bedd684b744bb34d904c67c616}} 
bool {\bfseries initialized\+\_\+}
\item 
\mbox{\Hypertarget{a07864_af837f8d7070172ad406551e464edfb9b}\label{a07864_af837f8d7070172ad406551e464edfb9b}} 
\hyperlink{a07860}{Color\+Translator} {\bfseries translator\+\_\+}
\item 
\mbox{\Hypertarget{a07864_ae085c62d5aeca9b396a7ee951e724438}\label{a07864_ae085c62d5aeca9b396a7ee951e724438}} 
\hyperlink{a07868}{Node} $\ast$ {\bfseries root\+\_\+}
\item 
\mbox{\Hypertarget{a07864_a9fc98a605586beb1b34d5a094dff4fb9}\label{a07864_a9fc98a605586beb1b34d5a094dff4fb9}} 
\hyperlink{a07868}{Node} $\ast$ {\bfseries current\+Node\+\_\+}
\item 
\mbox{\Hypertarget{a07864_a56391dffeb84afd22a8edf3056121c15}\label{a07864_a56391dffeb84afd22a8edf3056121c15}} 
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 Mesh\+Node2\+T\+\_\+impl.\+hh.



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}
