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]void setWindowOrigin(int x, int y)
[more]void setWindowSize(int width, int height)
[more]void setWindowTitle(const std::string& title)
[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(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)

Protected Fields

[more]static Viewer* s_theViewer
[more]unsigned int _focusedViewport
[more]std::string _saveFileName
[more]std::string _title
[more]int wx
[more]int wy
[more]int ww
[more]int wh
[more]int _is_open
[more]unsigned int frame_rate
[more]RTfs* fs
[more]bool _viewFrustumCullingActive
[more]bool _smallFeatureCullingActive
[more]int mx
[more]int my
[more]int mbutton
[more]int polymode
[more]int texture
[more]int backface
[more]int lighting
[more]int flat_shade
[more]int _two_sided_lighting
[more]bool fullscreen
[more]int _saved_wx
[more]int _saved_wy
[more]int _saved_ww
[more]int _saved_wh
[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

Protected Methods

[more]static void displayCB()
[more]static void reshapeCB(int w, int h)
[more]static void visibilityCB(int state)
[more]static void mouseMotionCB(int x, int y)
[more]static void mousePassiveMotionCB(int x, int y)
[more]static void mouseCB(int button, int state, int x, int y)
[more]static void keyboardCB(unsigned char key, int x, int y )
[more]virtual void display()
[more]virtual void reshape(GLint w, GLint h)
[more]virtual void visibility(int state)
[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(void)
[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


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 demo's but shouldn't be viewed as the be all and end of osg viewer classes. Someone please rewrite it :-)
o Viewer()

ovirtual ~Viewer()

ovoid setWindowOrigin(int x, int y)

ovoid setWindowSize(int width, int height)

ovoid setWindowTitle(const std::string& title)

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(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)

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 display()

ovirtual void reshape(GLint w, GLint h)

ovirtual void visibility(int state)

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(void)

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

ostd::string _title

oint wx

oint wy

oint ww

oint wh

oint _is_open

ounsigned int frame_rate

oRTfs* fs

obool _viewFrustumCullingActive

obool _smallFeatureCullingActive

oint mx

oint my

oint mbutton

oint polymode

oint texture

oint backface

oint lighting

oint flat_shade

oint _two_sided_lighting

obool fullscreen

oint _saved_wx

oint _saved_wy

oint _saved_ww

oint _saved_wh

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


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



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