|
Public Types |
| typedef std::vector< osg::GraphicsContext * > | Contexts |
| typedef std::vector< osgViewer::GraphicsWindow * > | Windows |
| typedef std::vector< osg::Camera * > | Cameras |
| typedef std::vector< OpenThreads::Thread * > | Threads |
| typedef std::vector< osg::OperationsThread * > | OperationsThreads |
| enum | ThreadingModel {
SingleThreaded,
CullDrawThreadPerContext,
DrawThreadPerContext,
CullThreadPerCameraDrawThreadPerContext,
AutomaticSelection
} |
| enum | BarrierPosition { BeforeSwapBuffers,
AfterSwapBuffers
} |
Public Member Functions |
| | Viewer () |
| | Viewer (osg::ArgumentParser &arguments) |
| virtual | ~Viewer () |
| bool | isRealized () const |
| | Get whether at least of one of this viewers windows are realized.
|
| void | realize () |
| | set up windows and associated threads.
|
| void | setDone (bool done) |
| bool | done () const |
| void | setStartTick (osg::Timer_t tick) |
| osg::Timer_t | getStartTick () const |
| void | setReferenceTime (double time=0.0) |
| osg::FrameStamp * | getFrameStamp () |
| const osg::FrameStamp * | getFrameStamp () const |
| virtual void | setSceneData (osg::Node *node) |
| | Set the sene graph data that viewer with view.
|
| virtual GraphicsWindowEmbedded * | setUpViewerAsEmbeddedInWindow (int x, int y, int width, int height) |
| | Convenience method for setting up the viewer so it can be used embedded in an external managed window.
|
| void | setThreadingModel (ThreadingModel threadingModel) |
| | Set the threading model the rendering traversals will use.
|
| ThreadingModel | getThreadingModel () const |
| | Get the threading model the rendering traversals will use.
|
| void | setUseMainThreadForRenderingTraversals (bool flag) |
| | Set whether the main thread, calling frame(), should be used for the rendering traversals.
|
| bool | getUseMainThreadForRenderingTraversals () const |
| | Get whether the main thread, calling frame(), should be used for the rendering traversals.
|
| ThreadingModel | suggestBestThreadingModel () |
| | Let the viewer suggest the best threading model for the viewers camera/window setup and the hardware available.
|
| void | setEndBarrierPosition (BarrierPosition bp) |
| | Set the position of the end barrier.
|
| BarrierPosition | getEndBarrierPosition () const |
| | Get the end barrier position.
|
| void | setKeyEventSetsDone (int key) |
| | Set the key event that the viewer checks on each frame to see if the viewer's done flag should be set to signal end of viewers main loop.
|
| int | getKeyEventSetsDone () const |
| | get the key event that the viewer checks on each frame to see if the viewer's done flag.
|
| void | setQuitEventSetsDone (bool flag) |
| | if the flag is true, the viewer set its done flag when a QUIT_APPLICATION is received, false disables this feature
|
| bool | getQuitEventSetsDone () const |
| virtual int | run () |
| | Execute a main frame loop.
|
| virtual void | frame (double simulationTime=USE_REFERENCE_TIME) |
| | Render a complete new frame.
|
| virtual void | advance (double simulationTime=USE_REFERENCE_TIME) |
| virtual void | eventTraversal () |
| virtual void | updateTraversal () |
| virtual void | renderingTraversals () |
| void | setCameraWithFocus (osg::Camera *camera) |
| osg::Camera * | getCameraWithFocus () |
| const osg::Camera * | getCameraWithFocus () const |
| void | getContexts (Contexts &contexts, bool onlyValid=true) |
| void | getWindows (Windows &windows, bool onlyValid=true) |
| void | getCameras (Cameras &cameras, bool onlyActive=true) |
| void | getAllThreads (Threads &threads, bool onlyActive=true) |
| void | getOperationsThreads (OperationsThreads &threads, bool onlyActive=true) |
| void | setRealizeOperation (osg::Operation *op) |
| | Set the graphics operation to call on realization of the viewers graphics windows.
|
| osg::Operation * | getRealizeOperation () |
| | Get the graphics operation to call on realization of the viewers graphics windows.
|
| void | setUpThreading () |
| | Set up the threading and processor affinity as per the viewers threading model.
|
| bool | areThreadsRunning () const |
| | Return true if viewer threads are running.
|
| void | stopThreading () |
| | Stop any threads begin run by viewer.
|
| void | startThreading () |
| | Start any threads required by the viewer.
|
| void | setUpRenderingSupport () |
| | Set up the Operations to render the various viewer cameras on the viewers graphics windows.
|
| virtual void | getUsage (osg::ApplicationUsage &usage) const |
| | Get the keyboard and mouse usage of this viewer.
|
Protected Types |
typedef std::list< osg::ref_ptr<
osgUtil::SceneView > > | SceneViews |
Protected Member Functions |
| void | constructorInit () |
| void | checkWindowStatus () |
| void | makeCurrent (osg::GraphicsContext *gc) |
| void | releaseContext () |
Protected Attributes |
| bool | _firstFrame |
| bool | _done |
| int | _keyEventSetsDone |
| bool | _quitEventSetsDone |
| ThreadingModel | _threadingModel |
| bool | _threadsRunning |
| bool | _useMainThreadForRenderingTraversal |
| BarrierPosition | _endBarrierPosition |
| osg::ref_ptr< osg::BarrierOperation > | _startRenderingBarrier |
| osg::ref_ptr< osg::BarrierOperation > | _endRenderingDispatchBarrier |
| osg::ref_ptr< EndOfDynamicDrawBlock > | _endDynamicDrawBlock |
| unsigned int | _numWindowsOpenAtLastSetUpThreading |
| SceneViews | _sceneViews |
| osg::Timer_t | _startTick |
| osg::ref_ptr< osg::FrameStamp > | _frameStamp |
| osg::observer_ptr< osg::Camera > | _cameraWithFocus |
| osg::ref_ptr< osgGA::EventVisitor > | _eventVisitor |
| osg::ref_ptr< osg::Operation > | _realizeOperation |
| osg::observer_ptr< osg::GraphicsContext > | _currentContext |