Developer Documentation
ACG::ColorStack Class Reference

#include <OpenFlipper/libs_required/ACG/GL/ColorStack.hh>

Classes

class  Node
 

Public Member Functions

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

Private Attributes

bool initialized_
 
ColorTranslator translator_
 
Noderoot_
 
NodecurrentNode_
 
bool error_
 

Detailed Description

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

Definition at line 73 of file ColorStack.hh.


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