Developer Documentation
|
Public Member Functions | |
ColorTranslator () | |
Default constructor. | |
~ColorTranslator () | |
Destructor. | |
void | initialize () |
bool | initialized () const |
has it been initialized? | |
Vec4uc | index2color (const size_t _idx) const |
index -> color (one buffer) | |
size_t | color2index (const Vec4uc _rgba) const |
color -> index (one buffer) | |
size_t | max_index () const |
returns maximal convertible index | |
This class can be used to translate colors to integers. Use this e.g. for color index picking, i.e. drawing objects using a color corresponding to an unique index.
Definition at line 82 of file MeshNode2T.cc.
void ACG::SceneGraph::ACG::ColorTranslator::initialize | ( | ) |
init (takes current GL context to get the component sizes) Can't use constructor as we might not have a context at this point.