ReTo  0.3.7
reto::PickingSystem Class Reference
+ Collaboration diagram for reto::PickingSystem:

Public Member Functions

 PickingSystem (reto::ShaderProgram *prog)
 Reuse a ShaderProgram that lacks fragment shader. More...
 
void AddObject (reto::Pickable *pickSystem)
 Method to add a Pickable object. More...
 
void RemoveObject (reto::Pickable *pickSystem)
 Method to remove a Pickable object. More...
 
void Clear (void)
 Method to clear Pickable elements.
 
int click (Point point)
 Method to find front object in a specific point. More...
 
std::set< unsigned int > area (Point minPoint, Point maxPoint)
 Method to find front object in a specific area. More...
 
reto::ShaderProgram *const & program () const
 
virtual std::string _VertexCode (void)
 

Public Attributes

reto::ShaderProgram_program
 
std::set< reto::Pickable * > _objects
 

Protected Member Functions

virtual void init (void)
 This method is invoked in the constuctor after creating the program. More...
 
virtual void renderObjects (void)
 This method is invoked to render objects. More...
 

Detailed Description

Definition at line 42 of file PickingSystem.h.

Constructor & Destructor Documentation

reto::PickingSystem::PickingSystem ( reto::ShaderProgram prog)

Reuse a ShaderProgram that lacks fragment shader.

Parameters
progProgramShader*

Member Function Documentation

void reto::PickingSystem::AddObject ( reto::Pickable pickSystem)

Method to add a Pickable object.

Parameters
pickSystemPickable object
std::set<unsigned int> reto::PickingSystem::area ( Point  minPoint,
Point  maxPoint 
)

Method to find front object in a specific area.

Parameters
minPointminPoint (in OpenGL coordinates)
maxPointmaxPoint (in OpenGL coordinates)
Returns
std::set<unsigned int> Indices that objects are visibles
int reto::PickingSystem::click ( Point  point)

Method to find front object in a specific point.

Parameters
pointPoint (in OpenGL coordinates)
Returns
int: Indice that is visible
virtual void reto::PickingSystem::init ( void  )
protectedvirtual

This method is invoked in the constuctor after creating the program.

Override thist just like you want it ( Default: Cache model, view, proj and id)

void reto::PickingSystem::RemoveObject ( reto::Pickable pickSystem)

Method to remove a Pickable object.

Parameters
pickSystemPickable object
virtual void reto::PickingSystem::renderObjects ( void  )
protectedvirtual

This method is invoked to render objects.

Override thist just like you want it (Default: Send id uniform)


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