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 void addViewport(osgUtil::SceneView* sv, float x = 0.0, float y = 0.0, float width = 1.0, float height = 1.0)
[more]virtual void addViewport(osg::Node*, float x = 0.0, float y = 0.0, float width = 1.0, float height = 1.0)
[more]const 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(osgUtil::CameraManipulator* cm, unsigned int viewport = 0)
[more]void selectCameraManipulator(unsigned int pos, unsigned int viewport = 0)
[more]virtual void requestRedraw()
[more]virtual void requestContinuousUpdate(bool )
[more]virtual void requestWarpPointer(int x, int y)
[more]void readCommandLine(std::vector<std::string>& commandLine)
read the command line string list, removing any matched control sequences

Protected Fields

[more]static Viewer* s_theViewer
[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]int _two_sided_lighting
[more]float frRate
[more]int _printStats
[more]bool _useDisplayLists
[more]osg::Timer _timer
[more]osg::Timer_t _tickRatePerSecond
[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

Protected Methods

[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 mapWindowXYToSceneView(int x, int y)
[more]void showStats(const unsigned int i)
[more]osg::Timer_t clockTick()
[more]osg::Timer_t frameTick()

Protected Members

[more]typedef std::vector<osg::ref_ptr<osgUtil::CameraManipulator> > CameraManipListstruct ViewportDef
[more]typedef std::vector<ViewportDef> ViewportList ViewportList _viewportList
[more]struct


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

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 )
ovirtual void visibility(int state)


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 void addViewport(osgUtil::SceneView* sv, float x = 0.0, float y = 0.0, float width = 1.0, float height = 1.0)

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

oconst 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(osgUtil::CameraManipulator* cm, unsigned int viewport = 0)

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

ovirtual void requestRedraw()

ovirtual void requestContinuousUpdate(bool )

ovirtual void requestWarpPointer(int x, int y)

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

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 mapWindowXYToSceneView(int x, int y)

ovoid showStats(const unsigned int i)

ostatic Viewer* s_theViewer

otypedef std::vector<osg::ref_ptr<osgUtil::CameraManipulator> > CameraManipListstruct ViewportDef

oosg::ref_ptr<osgUtil::SceneView> sceneView

ofloat viewport[4]

oosg::ref_ptr<osgUtil::CameraManipulator> _cameraManipulator

oCameraManipList _cameraManipList

otypedef std::vector<ViewportDef> ViewportList ViewportList _viewportList

ounsigned int _focusedViewport

ostd::string _saveFileName

obool _viewFrustumCullingActive

obool _smallFeatureCullingActive

oint polymode

oint texture

oint backface

oint lighting

oint flat_shade

oint _two_sided_lighting

ofloat frRate

oint _printStats

ostruct

ofloat timeApp

ofloat timeCull

ofloat timeDraw

ofloat timeFrame

oosg::Timer_t frameend

obool _useDisplayLists

oosg::Timer _timer

oosg::Timer_t _tickRatePerSecond

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


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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