eXperiment robotics framework

ManagerGLNames Class Reference
[Manager of OpenGL Names and Events]

Class to manage a STL Map of OpenGL names. More...

#include <erf/erf_manager_glnames.hpp>>

Collaboration diagram for ManagerGLNames:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 ManagerGLNames ()
 ~ManagerGLNames ()
 the destructor.
Object3DgetObject3D (GLuint n)
 get pointer to object3d.
Object3DgetObject3D (const Tags &t)
Object3DaddObject3D (Object3D *o)
 add a Object3D to the map of object3Ds.
bool deleteObject3D (GLuint n)
 delete an Object3D by it unique id.
bool deleteObject3D (Object3D *)
 delete an Object3D by its pointer.
bool removeObject3D (Object3D *)
bool setAEH (WorldEventHandler *o)
 set the object that will handle the next events.
WorldEventHandlergetAEH ()
 get the active event handler.
GLuint newId ()
 request a new id to identify a object.
int event (int e)
 the received event.
int runEvents (int &e, vector< Hit > &hv)
 pass the event to an hit vector until the event is handled.

Public Attributes

GLNamesMap object3Ds
 a map of id->Object3D*.

Private Attributes

WorldEventHandleractiveWorldEventHandler
GLuint glNamesCount

Friends

std::ostream & operator<< (std::ostream &os, ManagerGLNames &c)
 get root frame


Detailed Description

Class to manage a STL Map of OpenGL names.

Also responsible for object picking operations.

Definition at line 48 of file erf_manager_glnames.hpp.


Constructor & Destructor Documentation

ManagerGLNames::ManagerGLNames (  ) 

Todo:
add a current picked objects vector so that the AEH can see what are the objects under the cursor. Must be reset every time a new event happens.
the constructor.

ManagerGLNames::~ManagerGLNames (  ) 

the destructor.


Member Function Documentation

Object3D* ManagerGLNames::getObject3D ( GLuint  n  ) 

get pointer to object3d.

Returns:
pointer to Object3D
Parameters:
n an Object3D id.

Object3D* ManagerGLNames::getObject3D ( const Tags t  ) 

Object3D* ManagerGLNames::addObject3D ( Object3D o  ) 

add a Object3D to the map of object3Ds.

Returns:
a pointer to Object3D inserted. Returns null if failed.
Parameters:
o a pointer to Object3D.

bool ManagerGLNames::deleteObject3D ( GLuint  n  ) 

delete an Object3D by it unique id.

bool ManagerGLNames::deleteObject3D ( Object3D  ) 

delete an Object3D by its pointer.

bool ManagerGLNames::removeObject3D ( Object3D  ) 

bool ManagerGLNames::setAEH ( WorldEventHandler o  ) 

set the object that will handle the next events.

WorldEventHandler* ManagerGLNames::getAEH (  ) 

get the active event handler.

Returns:
the current event handler.

GLuint ManagerGLNames::newId (  ) 

request a new id to identify a object.

Returns:
the id of the new object.

int ManagerGLNames::event ( int  e  ) 

the received event.

Parameters:
e the event.
Returns:
0 if not handled 1 if handled.

int ManagerGLNames::runEvents ( int &  e,
vector< Hit > &  hv 
)

pass the event to an hit vector until the event is handled.

Returns:
0 if not handled 1 if handled.
Parameters:
e the event.
hv the hit vector.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
ManagerGLNames c 
) [friend]

get root frame

set root frame reset root frame to opengl identity matrix prints information on the ManagerGLNames.


Member Data Documentation

Definition at line 50 of file erf_manager_glnames.hpp.

GLuint ManagerGLNames::glNamesCount [private]

Definition at line 51 of file erf_manager_glnames.hpp.

a map of id->Object3D*.

Definition at line 60 of file erf_manager_glnames.hpp.


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

The miarn project - written by Joao Xavier