Developer Documentation
|
#include <ACG/GL/ColorStack.hh>
Classes | |
class | Node |
Public Member Functions | |
ColorStack () | |
Default constructor. | |
~ColorStack () | |
Destructor. | |
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_ |
Node * | root_ |
Node * | currentNode_ |
bool | error_ |
This class can be used to implement a gl picking stack based on colors
Definition at line 82 of file ColorStack.hh.