The class interface for selectable objects – objects which can be selectedc in the OpenGL context by clicking on them.
More...
#include <Select.h>
|
| Selectable () |
| Constructor.
|
|
void | loadSelectName () const |
| Performs the OpenGL task to make this object selectable.
|
|
unsigned int | getID () const |
| Returns this object's globally unique selection id. More...
|
|
virtual void | dummy () |
| A dummy function that makes Selectable polymorphic. It enables the use of dynamic_cast. Otherwise, it is a no-op.
|
|
|
unsigned int | _id |
| Globally unique OpenGL name for selection.
|
|
bool | _selected |
| Reports if this node is selcted. More...
|
|
The class interface for selectable objects – objects which can be selectedc in the OpenGL context by clicking on them.
unsigned int Menge::SceneGraph::Selectable::getID |
( |
| ) |
const |
|
inline |
Returns this object's globally unique selection id.
- Returns
- The selection id - a positive value.
static unsigned int Menge::SceneGraph::Selectable::getSelectedName |
( |
| ) |
|
|
inlinestatic |
Returns the "name" of the currently selected object.
In this case, "name" refers to the OpenGL identifier. It corresponds to a selectable object's id (see Selectable::getID).
- Returns
- The OpenGL name (selectable id) of the currently selected object. If no object is selected, it returns zero.
static Selectable* Menge::SceneGraph::Selectable::getSelectedObject |
( |
| ) |
|
|
inlinestatic |
Retrives a pointer to the currently selected node.
- Returns
- A pointer to the selected object – NULL if no object is selected.
bool Menge::SceneGraph::Selectable::selectEnd |
( |
| ) |
|
|
static |
The selection take down.
When performing selection, after calling Selectable::selectStart and drawing the scene, this must be called to conclude the selection process.
- Returns
- A boolean reporting if the selection changed (true) or not (false).
void Menge::SceneGraph::Selectable::selectStart |
( |
| ) |
|
|
static |
The selection set up.
To perform selection, this needs to be called prior to drawing the scene of selectable objects.
static void Menge::SceneGraph::Selectable::setSelectedObject |
( |
Selectable * |
obj | ) |
|
|
inlinestatic |
Forces an arbitrary selectable to be selected.
- Parameters
-
obj | A selectable object to set as selected. |
bool Menge::SceneGraph::Selectable::_selected |
|
protected |
Reports if this node is selcted.
This can be used by contexts or objects that change how they are drawn based on selection state.
The documentation for this class was generated from the following files:
- src/menge/MengeCore/SceneGraph/Select.h
- src/menge/MengeCore/SceneGraph/Select.cpp