class OSGGLUT_EXPORT osgGLUT::Viewer

A basic viewer base class which provides a window, simple keyboard and mouse interaction.

Inheritance:


Public Methods

[more] Viewer()
[more]virtual ~Viewer()
[more]virtual void init(osg::Node* rootnode)
init is deprecated, you should use addViewport instead.
[more]virtual unsigned int addViewport(osgUtil::SceneView* sv, float x = 0.0, float y = 0.0, float width = 1.0, float height = 1.0)
[more]virtual unsigned int addViewport(osg::Node*, float x = 0.0, float y = 0.0, float width = 1.0, float height = 1.0)
[more]unsigned int getNumViewports() const
[more]osgUtil::SceneView* getViewportSceneView(unsigned int pos)
[more]virtual bool open()
[more]virtual bool run()
[more]virtual float app(unsigned int viewport)
[more]virtual float cull(unsigned int viewport)
[more]virtual float draw(unsigned int viewport)
[more]long initClock()
[more]double clockSeconds()
[more]osg::Timer_t updateFrameTick()
[more]double frameSeconds()
[more]double frameRate()
[more]void help(std::ostream& fout)
[more]unsigned int registerCameraManipulator(osgGA::CameraManipulator* cm, unsigned int viewport = 0)
[more]void selectCameraManipulator(unsigned int pos, unsigned int viewport = 0)
[more]void prependEventHandler(osgGA::GUIEventHandler* handler, unsigned int viewport = 0)
[more]void appendEventHandler(osgGA::GUIEventHandler* handler, unsigned int viewport = 0)
[more]virtual void requestRedraw()
[more]virtual void requestContinuousUpdate(bool )
[more]virtual void requestWarpPointer(int x, int y)
[more]virtual void requestShutdown()
[more]virtual void toggleFullScreen()
Toggle fullscreen
[more]void readCommandLine(std::vector<std::string>& commandLine)
read the command line string list, removing any matched control sequences
[more]void setDisplaySettings(osg::DisplaySettings* ds)
[more]osg::DisplaySettings* getDisplaySettings()
[more]const osg::DisplaySettings* getDisplaySettings() const
[more]void setRecordingAnimationPath(bool on)
[more]bool getRecordingAnimationPath() const
[more]void setAnimationPath(osg::AnimationPath* path)
[more]osg::AnimationPath* getAnimationPath()
[more]const osg::AnimationPath* getAnimationPath() const

Public Members

[more]typedef std::vector<osg::ref_ptr<osgGA::CameraManipulator> > CameraManipList
[more]typedef std::list<osg::ref_ptr<osgGA::GUIEventHandler> > EventHandlerList

Protected Fields

[more]static Viewer* s_theViewer
[more]ViewportList _viewportList
[more]unsigned int _focusedViewport
[more]std::string _saveFileName
[more]bool _viewFrustumCullingActive
[more]bool _smallFeatureCullingActive
[more]int polymode
[more]int texture
[more]int backface
[more]int lighting
[more]int flat_shade
[more]float frRate
[more]int _printStats
[more]StatsRecord times[3]
[more]bool _useDisplayLists
[more]osg::Timer _timer
[more]osg::Timer_t _initialTick
[more]osg::Timer_t _lastFrameTick
[more]osg::Timer_t _frameTick
[more]osg::ref_ptr<osg::FrameStamp> _frameStamp
[more]osg::ref_ptr<osg::DisplaySettings> _displaySettings
[more]bool _recordingAnimationPath
[more]osg::ref_ptr<osg::AnimationPath> _animationPath

Protected Methods

[more]virtual void clear()
[more]virtual void display()
[more]virtual void reshape(GLint w, GLint h)
[more]virtual void mouseMotion(int x, int y)
[more]virtual void mousePassiveMotion(int x, int y)
[more]virtual void mouse(int button, int state, int x, int y)
[more]virtual void keyboard(unsigned char key, int x, int y)
[more]void setFocusedViewport(unsigned int pos)
[more]int mapWindowXYToViewport(int x, int y)
[more]void showStats(unsigned int i)
[more]osg::Timer_t clockTick()
[more]osg::Timer_t frameTick()

Protected Members

[more]struct ViewportDef
[more]typedef std::vector<ViewportDef> ViewportList
[more]struct StatsRecord


Inherited from Window:

Public Methods

ovoid setWindowOrigin(int x, int y)
ovoid setWindowSize(int width, int height)
ovoid setWindowTitle(const std::string& title)
ovoid setDisplayMode(unsigned int displayMode)

Protected Fields

ostatic Window* s_theWindow
ostd::string _title
oint _wx
oint _wy
oint _ww
oint _wh
ounsigned int _displayMode
oint _is_open
oint _mx
oint _my
oint _mbutton
obool _fullscreen
oint _saved_wx
oint _saved_wy
oint _saved_ww
oint _saved_wh
obool _exit

Protected Methods

ostatic void displayCB()
ostatic void reshapeCB(int w, int h)
ostatic void visibilityCB(int state)
ostatic void mouseMotionCB(int x, int y)
ostatic void mousePassiveMotionCB(int x, int y)
ostatic void mouseCB(int button, int state, int x, int y)
ostatic void keyboardCB(unsigned char key, int x, int y )
ostatic void specialCB(int key, int x, int y)
ostatic void spaceballMotionCB(int x, int y, int z)
ostatic void spaceballRotateCB(int x, int y, int z)
ostatic void spaceballButtonCB(int button, int state)
ovirtual void visibility(int state)
ovirtual void special(int key, int x, int y)
ovirtual void spaceballMotion(int x, int y, int z)
ovirtual void spaceballRotate(int x, int y, int z)
ovirtual void spaceballButton(int button, int state)
ovoid check_if_exit()


Documentation

A basic viewer base class which provides a window, simple keyboard and mouse interaction. Please note, this viewer class has been developed via a rather haphazard path and needs a total rewrite. It currently suffices for osg demos but shouldn't be viewed as the be all and end of osg viewer classes. Someone please rewrite it :-)
o Viewer()

ovirtual ~Viewer()

ovirtual void init(osg::Node* rootnode)
init is deprecated, you should use addViewport instead. init is only available for backwards compatibility.

ovirtual unsigned int addViewport(osgUtil::SceneView* sv, float x = 0.0, float y = 0.0, float width = 1.0, float height = 1.0)

ovirtual unsigned int addViewport(osg::Node*, float x = 0.0, float y = 0.0, float width = 1.0, float height = 1.0)

ounsigned int getNumViewports() const

oosgUtil::SceneView* getViewportSceneView(unsigned int pos)

ovirtual bool open()

ovirtual bool run()

ovirtual float app(unsigned int viewport)

ovirtual float cull(unsigned int viewport)

ovirtual float draw(unsigned int viewport)

olong initClock()

odouble clockSeconds()

oosg::Timer_t updateFrameTick()

odouble frameSeconds()

odouble frameRate()

ovoid help(std::ostream& fout)

ounsigned int registerCameraManipulator(osgGA::CameraManipulator* cm, unsigned int viewport = 0)

ovoid selectCameraManipulator(unsigned int pos, unsigned int viewport = 0)

ovoid prependEventHandler(osgGA::GUIEventHandler* handler, unsigned int viewport = 0)

ovoid appendEventHandler(osgGA::GUIEventHandler* handler, unsigned int viewport = 0)

ovirtual void requestRedraw()

ovirtual void requestContinuousUpdate(bool )

ovirtual void requestWarpPointer(int x, int y)

ovirtual void requestShutdown()

ovirtual void toggleFullScreen()
Toggle fullscreen

ovoid readCommandLine(std::vector<std::string>& commandLine)
read the command line string list, removing any matched control sequences

ovoid setDisplaySettings(osg::DisplaySettings* ds)

oosg::DisplaySettings* getDisplaySettings()

oconst osg::DisplaySettings* getDisplaySettings() const

otypedef std::vector<osg::ref_ptr<osgGA::CameraManipulator> > CameraManipList

otypedef std::list<osg::ref_ptr<osgGA::GUIEventHandler> > EventHandlerList

ovoid setRecordingAnimationPath(bool on)

obool getRecordingAnimationPath() const

ovoid setAnimationPath(osg::AnimationPath* path)

oosg::AnimationPath* getAnimationPath()

oconst osg::AnimationPath* getAnimationPath() const

ovirtual void clear()

ovirtual void display()

ovirtual void reshape(GLint w, GLint h)

ovirtual void mouseMotion(int x, int y)

ovirtual void mousePassiveMotion(int x, int y)

ovirtual void mouse(int button, int state, int x, int y)

ovirtual void keyboard(unsigned char key, int x, int y)

ovoid setFocusedViewport(unsigned int pos)

oint mapWindowXYToViewport(int x, int y)

ovoid showStats(unsigned int i)

ostatic Viewer* s_theViewer

ostruct ViewportDef

oosg::ref_ptr<osgUtil::SceneView> sceneView

ofloat viewport[4]

oosg::ref_ptr<osgGA::CameraManipulator> _cameraManipulator

oCameraManipList _cameraManipList

oEventHandlerList _eventHandlerList

otypedef std::vector<ViewportDef> ViewportList

oViewportList _viewportList

ounsigned int _focusedViewport

ostd::string _saveFileName

obool _viewFrustumCullingActive

obool _smallFeatureCullingActive

oint polymode

oint texture

oint backface

oint lighting

oint flat_shade

ofloat frRate

oint _printStats

ostruct StatsRecord

o StatsRecord()

ofloat timeApp

ofloat timeCull

ofloat timeDraw

ofloat timeFrame

oosg::Timer_t frameend

oStatsRecord times[3]

obool _useDisplayLists

oosg::Timer _timer

oosg::Timer_t _initialTick

oosg::Timer_t _lastFrameTick

oosg::Timer_t _frameTick

oosg::Timer_t clockTick()

oosg::Timer_t frameTick()

oosg::ref_ptr<osg::FrameStamp> _frameStamp

oosg::ref_ptr<osg::DisplaySettings> _displaySettings

obool _recordingAnimationPath

oosg::ref_ptr<osg::AnimationPath> _animationPath


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.