|
CEDRIC
Revision_backup-2009-02
|
Qt Widget for osgViewer::Viewer. More...
#include <OsgWidget.h>
Public Slots | |
| virtual void | idle (double simulationTime=USE_REFERENCE_TIME) |
| Do event and update traversal. More... | |
| void | triggerRedraw () |
| Trigger a redraw in 1/60 sec. More... | |
| void | toggleContinuousUpdate (bool activate) |
| Toggle continous redraw (usefull for animation) More... | |
| void | forceContinuousUpdate (bool force) |
| Forces continous redraw (i.e. continuous redraw cannot be disabled via toggleContinousUpdate(false)) More... | |
Public Member Functions | |
| OsgViewerWidget (QWidget *parent=0) | |
| virtual | ~OsgViewerWidget () |
| virtual void | paintGL () |
| Render the scenegraph by calling frame() (QGLWidget override) More... | |
| virtual bool | paintGL2PS (const char *filename, int format) |
| Render scene to postscript using GL2PS library. More... | |
| bool | isContinuousUpdateForced () const |
| Returns true if continous update was forced (i.e. continuous redraw cannot be disable via toggleContinousUpdate(false)) More... | |
osgViewer::Viewer overrides | |
Override default frame() function to split event and update traversals from pure rendering | |
| virtual void | frame (double simulationTime=USE_REFERENCE_TIME) |
osgViewer::View overrides (osgGA::GUIActionAdapter implementation) | |
| virtual void | requestRedraw () |
| virtual void | requestContinuousUpdate (bool needed=true) |
| virtual void | requestWarpPointer (float x, float y) |
Public Member Functions inherited from OsgAdapterWidget | |
| OsgAdapterWidget (QWidget *parent=0) | |
| virtual | ~OsgAdapterWidget () |
| osgViewer::GraphicsWindow * | getGraphicsWindow () |
| const osgViewer::GraphicsWindow * | getGraphicsWindow () const |
Public Attributes | |
| unsigned long | idleCount |
Additional Inherited Members | |
Signals inherited from OsgAdapterWidget | |
| void | processEvents () |
Protected Member Functions inherited from OsgAdapterWidget | |
| void | init () |
| virtual void | resizeGL (int width, int height) |
| virtual void | keyPressEvent (QKeyEvent *event) |
| virtual void | keyReleaseEvent (QKeyEvent *event) |
| virtual void | mousePressEvent (QMouseEvent *event) |
| virtual void | mouseReleaseEvent (QMouseEvent *event) |
| virtual void | mouseMoveEvent (QMouseEvent *event) |
| virtual void | wheelEvent (QWheelEvent *event) |
| osgGA::GUIEventAdapter * | makeEventAdapter (QMouseEvent *event, osgGA::GUIEventAdapter::EventType type) |
Protected Attributes inherited from OsgAdapterWidget | |
| osg::ref_ptr < osgViewer::GraphicsWindowEmbedded > | _gw |
Qt Widget for osgViewer::Viewer.
The osgViewer::Viewer frame() function is splitted into two parts, namely
frame() which renders the frame via renderingTraversals(). The purpose is to separate user interface update handling (as provided by OsgAdapterWidget) from rendering. idle() processes the osg EventQueues which are filled by OsgAdapterWidget. If a processed event needs a redraw it will call requestRedraw() or requestContinousUpdate() which then triggers the actual frame() rendering function.
At the moment this class is laid out for single threading.
Based on the osgviewerQT example.
\author Max Hermann <mhermann[at]mail.cern.ch>
| OsgViewerWidget::OsgViewerWidget | ( | QWidget * | parent = 0 | ) |
References OsgAdapterWidget::getGraphicsWindow(), idle(), and OsgAdapterWidget::processEvents().
|
virtual |
|
inlineslot |
Forces continous redraw (i.e. continuous redraw cannot be disabled via toggleContinousUpdate(false))
References toggleContinuousUpdate().
Referenced by EventMultiViewer::createTrackDetVisPerspective(), and EventViewerWidget::forceContinuousUpdate().
|
virtual |
References idle().
Referenced by paintGL(), and paintGL2PS().
|
virtualslot |
|
inline |
Returns true if continous update was forced (i.e. continuous redraw cannot be disable via toggleContinousUpdate(false))
Referenced by EventViewerWidget::isContinuousUpdateForced(), and EventMultiViewer::setActiveViewer().
|
virtual |
Render the scenegraph by calling frame() (QGLWidget override)
Reimplemented in MyCameraWidget.
References frame(), glPopAll(), and glPushAll().
Referenced by MyCameraWidget::paintGL().
|
virtual |
Render scene to postscript using GL2PS library.
References frame().
Referenced by EventMultiViewer::exportActiveViewerTo().
|
inlinevirtual |
References toggleContinuousUpdate(), and triggerRedraw().
Referenced by MyCameraWidget::mousePressEvent(), and MyCameraWidget::mouseReleaseEvent().
|
inlinevirtual |
References triggerRedraw().
Referenced by EventCameraWidget::mouseMoveEvent().
|
inlinevirtual |
|
slot |
Toggle continous redraw (usefull for animation)
Referenced by forceContinuousUpdate(), requestContinuousUpdate(), and MyCameraWidget::setMouseMode().
|
slot |
Trigger a redraw in 1/60 sec.
Referenced by EventViewerWidget::changeProjectionAlpha(), requestContinuousUpdate(), requestRedraw(), EventViewerWidget::setViewHome(), EventViewerWidget::setViewMode(), and EventViewerWidget::triggerRedraw().
| unsigned long OsgViewerWidget::idleCount |
Referenced by idle().
1.8.6