Public Member Functions | Protected Member Functions

OpenTissue::gl::Picking Class Reference

#include <gl_picking.h>

List of all members.

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[])

Detailed Description

Picking Functor.


Member Function Documentation

GLuint OpenTissue::gl::Picking::inFront ( GLint  hits,
GLuint  buffer[] 
) [inline, protected]

Auxiliary method used by the pick-method.

Processes hits, in order to find the one in front of all the others.

template<typename draw_functor >
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.

Parameters:
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!!!
Returns:
The name (a GLuint identifier value) of the front most primitive lying at screen location x,y.

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