Developer Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
ACG::SceneGraph::ACG::ColorStack Class Reference


class  Node

Public Member Functions

 ColorStack ()
 Default constructor.
 ~ColorStack ()
void initialize ()
 init (takes current GL context/ like glInitNames (); glPushName (0))
bool initialized () const
 has it been initialized?
bool setMaximumIndex (unsigned int _idx)
 sets the maximum index number used in current node
void setIndex (unsigned int _idx)
 sets the current color the given index (like glLoadName)
Vec4uc getIndexColor (unsigned int _idx)
 gets the color instead of setting it directly
void pushIndex (unsigned int _idx)
 creates a new node the stack (like glPushName)
void popIndex ()
 pops the current node from the stack (like glPopName)
std::vector< unsigned int > colorToStack (Vec4uc _rgba) const
 converts the given color to index values on the stack
unsigned int freeIndicies () const
 returns maximal available index count
bool error () const
 Did an error occur during picking.
unsigned int currentIndex () const
 returns the current color index

Private Attributes

bool initialized_
ColorTranslator translator_
bool error_

Detailed Description

This class can be used to implement a gl picking stack based on colors

Definition at line 82 of file

The documentation for this class was generated from the following file: