#include <gl_picking.h>
Public Member Functions | |
template<typename draw_functor > | |
GLuint | operator() (int x, int y, draw_functor const &draw) |
Protected Member Functions | |
GLuint | inFront (GLint hits, GLuint buffer[]) |
Picking Functor.
Auxiliary method used by the pick-method.
Processes hits, in order to find the one in front of all the others.
GLuint OpenTissue::gl::Picking::operator() | ( | int | x, | |
int | y, | |||
draw_functor const & | draw | |||
) | [inline] |
Get Picked Object Name. The pick method returns a name, during rendering the caller must set this name (by using glPushName and glPopName) for the object being rendered.
By default the name value: 0 is used as background, user should not use this value, when setting the object names.
x | Screen x-coordinates | |
y | Screen y-coordinates | |
draw | A function pointer to a drawing routine, this method should NOT try to change model view or projection matrices, nor the viewport, it should only draw things!!! |