This class is for embedding an OSG based window inside another OpenGL contex, for example in QT.
More...
#include <EmbeddedGLWindow.h>
|
| | EmbeddedGLWindow () |
| | Constructor. More...
|
| |
| | ~EmbeddedGLWindow () |
| | Destructor. More...
|
| |
| void | clear () |
| | Will remove simulation, deallocate all scene graph elements After call to this method, init is required. More...
|
| |
| void | fitSceneIntoView () |
| | Will move the camera so that the whole scene is visible. More...
|
| |
| void | frame () |
| | Should be called to update the rendering frame. More...
|
| |
| osg::Camera * | getCamera () |
| |
| const osg::Camera * | getCamera () const |
| |
| osgGA::EventQueue * | getEventQueue () const |
| |
| osg::Group * | getRoot () |
| |
| const osg::Group * | getRoot () const |
| |
| agxOSG::SceneDecorator * | getSceneDecorator () |
| |
| agxSDK::Simulation * | getSimulation () const |
| |
| bool | init (int x, int y, int width, int height) |
| | Will initialize the scenegraph, camera, viewer A valid OpenGL context should be initialized and active for this to work. More...
|
| |
| void | keyPressEvent (int key, int mod_mask) |
| | Called upon a keypress event. More...
|
| |
| void | keyReleaseEvent (int key, int mod_mask) |
| | Called upon a keyrelease event. More...
|
| |
| void | mouseMoveEvent (int x, int y) |
| | Called upon mouse event. More...
|
| |
| void | mousePressEvent (int x, int y, int button) |
| | Called upon pressing a mouse button. More...
|
| |
| void | mouseReleaseEvent (int x, int y, int button) |
| | Called upon releasing a mouse button. More...
|
| |
| void | removeSimulation () |
| | Deassociates any registered simulation. More...
|
| |
| void | resize (int x, int y, int width, int height) |
| | Called at resize of the window. More...
|
| |
| void | setSimulation (agxSDK::Simulation *simulation) |
| | Associate a Simulation to this window. More...
|
| |
| void | wheelEvent (int motion) |
| | Called when the mouse wheel is used. More...
|
| |
This class is for embedding an OSG based window inside another OpenGL contex, for example in QT.
Definition at line 46 of file EmbeddedGLWindow.h.
◆ EmbeddedGLWindow()
| agxOSG::EmbeddedGLWindow::EmbeddedGLWindow |
( |
| ) |
|
◆ ~EmbeddedGLWindow()
| agxOSG::EmbeddedGLWindow::~EmbeddedGLWindow |
( |
| ) |
|
◆ clear()
| void agxOSG::EmbeddedGLWindow::clear |
( |
| ) |
|
Will remove simulation, deallocate all scene graph elements After call to this method, init is required.
◆ fitSceneIntoView()
| void agxOSG::EmbeddedGLWindow::fitSceneIntoView |
( |
| ) |
|
Will move the camera so that the whole scene is visible.
◆ frame()
| void agxOSG::EmbeddedGLWindow::frame |
( |
| ) |
|
Should be called to update the rendering frame.
◆ getCamera() [1/2]
| osg::Camera* agxOSG::EmbeddedGLWindow::getCamera |
( |
| ) |
|
◆ getCamera() [2/2]
| const osg::Camera* agxOSG::EmbeddedGLWindow::getCamera |
( |
| ) |
const |
◆ getEventQueue()
| osgGA::EventQueue* agxOSG::EmbeddedGLWindow::getEventQueue |
( |
| ) |
const |
◆ getRoot() [1/2]
| osg::Group* agxOSG::EmbeddedGLWindow::getRoot |
( |
| ) |
|
◆ getRoot() [2/2]
| const osg::Group* agxOSG::EmbeddedGLWindow::getRoot |
( |
| ) |
const |
◆ getSceneDecorator()
◆ getSimulation()
- Returns
- the associated simulation
◆ init()
| bool agxOSG::EmbeddedGLWindow::init |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Will initialize the scenegraph, camera, viewer A valid OpenGL context should be initialized and active for this to work.
- Parameters
-
| x,y | - Position of the window |
| width,height | - Size of the window |
◆ keyPressEvent()
| void agxOSG::EmbeddedGLWindow::keyPressEvent |
( |
int |
key, |
|
|
int |
mod_mask |
|
) |
| |
Called upon a keypress event.
- Parameters
-
| key | - which key is pressed |
| mod_mask | - mask for the modification keys |
◆ keyReleaseEvent()
| void agxOSG::EmbeddedGLWindow::keyReleaseEvent |
( |
int |
key, |
|
|
int |
mod_mask |
|
) |
| |
Called upon a keyrelease event.
- Parameters
-
| key | - which key is released |
| mod_mask | - mask for the modification keys |
◆ mouseMoveEvent()
| void agxOSG::EmbeddedGLWindow::mouseMoveEvent |
( |
int |
x, |
|
|
int |
y |
|
) |
| |
Called upon mouse event.
- Parameters
-
| x,y | - position of the mouse pointer in the window |
◆ mousePressEvent()
| void agxOSG::EmbeddedGLWindow::mousePressEvent |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
button |
|
) |
| |
Called upon pressing a mouse button.
- Parameters
-
| x,y | - position of the mouse pointer in the window |
| button | - which button is pressed, 0,1,2 |
◆ mouseReleaseEvent()
| void agxOSG::EmbeddedGLWindow::mouseReleaseEvent |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
button |
|
) |
| |
Called upon releasing a mouse button.
- Parameters
-
| x,y | - position of the mouse pointer in the window |
| button | - which button is released, 0,1,2 |
◆ removeSimulation()
| void agxOSG::EmbeddedGLWindow::removeSimulation |
( |
| ) |
|
Deassociates any registered simulation.
◆ resize()
| void agxOSG::EmbeddedGLWindow::resize |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Called at resize of the window.
- Parameters
-
| x,y | - new position of the window |
| width,height | - new size of the window |
◆ setSimulation()
Associate a Simulation to this window.
Will be used to perform debug rendering. However, the simulation will not be step forward. That has to be handled explicitly
◆ wheelEvent()
| void agxOSG::EmbeddedGLWindow::wheelEvent |
( |
int |
motion | ) |
|
Called when the mouse wheel is used.
- Parameters
-
| motion | - which direction the mouse wheel is moved, 0,1 (up/down) |
The documentation for this class was generated from the following file: