The class which contains the entire drawable scene.
More...
#include <GLScene.h>
The class which contains the entire drawable scene.
bool Menge::SceneGraph::GLScene::addNode |
( |
GLNode * |
node, |
|
|
GLDagNode * |
parent = 0x0 |
|
) |
| |
Add a node to the scene (with an optional parent)
A node is added to the scene. If no parent is specified, the node is a child of the scene directly. Otherwise, it is a child of the parent. NOTE: No test is performed to confirm that the parent already exists in the scene. It is the responsibility of the caller to confirm that this is the case.
- Parameters
-
node | The node to add to the scene. |
parent | The optional parent node. |
- Returns
- Indication if the addition was successful (true) or not (false). Currently, this function always returns true.
bool Menge::SceneGraph::GLScene::addSystem |
( |
System * |
system | ) |
|
Adds a System to the scene.
- Parameters
-
system | The system to add to the scene. |
- Returns
- True if the system is successfully added, false otherwise. In this implementation, it is always successful.
void Menge::SceneGraph::GLScene::drawGL |
( |
const GLCamera & |
camera, |
|
|
const GLLightVector & |
lights, |
|
|
int |
vWidth, |
|
|
int |
vHeight |
|
) |
| |
Causes the scene to draw into an open gl context.
- Parameters
-
camera | The camera from which to derive the draw the scene. |
lights | The lights to illuminate the 3D elements. |
vWidth | The viewport width, in pixels, used in text overlay. |
vHeight | The viewport height, in pixels, used in text overlay. |
void Menge::SceneGraph::GLScene::finish |
( |
| ) |
|
Informs the scene that it is done being used.
This gives the scene the chance to free up memory and stop whatever processes it may have been using (e.g., flushing caches, etc.) Typically just called by the viewer at the conclusion of visualization. More particularly, it gives the scene's systems to clean up and conclude their processes.
Allows the scene to respond to a keyboard event.
- Parameters
-
e | An instance of a keyboard event. |
- Returns
- An instance of a ContextResult, reporting whether the event has been handled and whether a redraw is necessary.
Allows the scene to respond to a mouse event.
- Parameters
-
e | An instance of a mouse event. |
- Returns
- An instance of a ContextResult, reporting whether the event has been handled and whether a redraw is necessary.
bool Menge::SceneGraph::GLScene::selectGL |
( |
const GLCamera & |
camera, |
|
|
int |
vWidth, |
|
|
int |
vHeight, |
|
|
int * |
selectPoint |
|
) |
| |
Draws the selectable elements of the scene in preparation for selection.
This uses the OpenGL selection context to perform active selection of elements in the scene.
- Parameters
-
camera | The camera from which to derive the draw the scene. |
vWidth | The viewport width, in pixels, used in text overlay. |
vHeight | The viewport height, in pixels, used in text overlay. |
selectPoint | The point in screen space at which selection should occur. |
- Returns
- True if the selection changed, false otherwise.
void Menge::SceneGraph::GLScene::setContext |
( |
Context * |
context | ) |
|
Sets the context the scene will use to handle UI events.
If the scene already has a context assigned, that context will be deactivated and deleted.
- Parameters
-
context | The scene's context. |
bool Menge::SceneGraph::GLScene::updateScene |
( |
float |
time | ) |
|
Updates the state of the scene graph to the global time.
- Parameters
-
time | The time for which the scene should be drawn. |
- Returns
- A boolean reporting if a redraw is necessary (true) or not (false).
The documentation for this class was generated from the following files:
- src/menge/MengeCore/SceneGraph/GLScene.h
- src/menge/MengeCore/SceneGraph/GLScene.cpp