69 void loadSelectName()
const;
76 unsigned int getID()
const {
return _id; }
82 virtual void dummy() {
return; }
106 if ( _selectedObject ) _selectedObject->_selected =
false;
107 _selectedObject = 0x0;
117 clearSelectedObject();
118 _selectedName = obj->
_id;
119 _selectedObject = obj;
129 static void selectStart();
139 static bool selectEnd();
164 static const unsigned int BUFFER_SIZE;
169 static unsigned int * _buffer;
176 static unsigned int ID;
189 static unsigned int _selectedName;
194 static std::vector< Selectable * > _selectables;
201 typedef std::vector< Selectable * > SelectableVector;
206 typedef SelectableVector::iterator SelectableVectorItr;
211 typedef SelectableVector::const_iterator SelectableVectorCItr;
215 #endif // __SELECT_H__
static Selectable * getSelectedObject()
Retrives a pointer to the currently selected node.
Definition: Select.h:89
static unsigned int getSelectedName()
Returns the "name" of the currently selected object.
Definition: Select.h:100
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
virtual void dummy()
A dummy function that makes Selectable polymorphic. It enables the use of dynamic_cast. Otherwise, it is a no-op.
Definition: Select.h:82
Sets up the proper compiler directives for platform and dll export/import.
static void setSelectedObject(Selectable *obj)
Forces an arbitrary selectable to be selected.
Definition: Select.h:116
static void clearSelectedObject()
Clears the current selection.
Definition: Select.h:105
static unsigned int nextSelectName()
Reports the next available selection name.
Definition: Select.h:144
unsigned int _id
Globally unique OpenGL name for selection.
Definition: Select.h:150
The SceneGraph (SceneGraph) name space, containing all elements to use in a SceneGraph.
unsigned int getID() const
Returns this object's globally unique selection id.
Definition: Select.h:76
bool _selected
Reports if this node is selcted.
Definition: Select.h:158
The class interface for selectable objects – objects which can be selectedc in the OpenGL context by...
Definition: Select.h:59