A basic viewer base class which provides a window, simple keyboard and mouse interaction.
Inheritance:
Public Methods
-
Viewer()
-
virtual ~Viewer()
-
virtual void init(osg::Node* rootnode)
- init is deprecated, you should use addViewport instead.
-
virtual unsigned int addViewport(osgUtil::SceneView* sv, float x = 0.0, float y = 0.0, float width = 1.0, float height = 1.0)
-
virtual unsigned int addViewport(osg::Node*, float x = 0.0, float y = 0.0, float width = 1.0, float height = 1.0)
-
unsigned int getNumViewports() const
-
osgUtil::SceneView* getViewportSceneView(unsigned int pos)
-
virtual bool open()
-
virtual bool run()
-
virtual float app(unsigned int viewport)
-
virtual float cull(unsigned int viewport)
-
virtual float draw(unsigned int viewport)
-
long initClock()
-
double clockSeconds()
-
osg::Timer_t updateFrameTick()
-
double frameSeconds()
-
double frameRate()
-
void help(std::ostream& fout)
-
unsigned int registerCameraManipulator(osgGA::CameraManipulator* cm, unsigned int viewport = 0)
-
void selectCameraManipulator(unsigned int pos, unsigned int viewport = 0)
-
void prependEventHandler(osgGA::GUIEventHandler* handler, unsigned int viewport = 0)
-
void appendEventHandler(osgGA::GUIEventHandler* handler, unsigned int viewport = 0)
-
virtual void requestRedraw()
-
virtual void requestContinuousUpdate(bool )
-
virtual void requestWarpPointer(int x, int y)
-
virtual void requestShutdown()
-
virtual void toggleFullScreen()
- Toggle fullscreen
-
void readCommandLine(std::vector<std::string>& commandLine)
- read the command line string list, removing any matched control sequences
-
void setDisplaySettings(osg::DisplaySettings* ds)
-
osg::DisplaySettings* getDisplaySettings()
-
const osg::DisplaySettings* getDisplaySettings() const
-
void setRecordingAnimationPath(bool on)
-
bool getRecordingAnimationPath() const
-
void setAnimationPath(osg::AnimationPath* path)
-
osg::AnimationPath* getAnimationPath()
-
const osg::AnimationPath* getAnimationPath() const
Public Members
-
typedef std::vector<osg::ref_ptr<osgGA::CameraManipulator> > CameraManipList
-
typedef std::list<osg::ref_ptr<osgGA::GUIEventHandler> > EventHandlerList
Protected Fields
-
static Viewer* s_theViewer
-
ViewportList _viewportList
-
unsigned int _focusedViewport
-
std::string _saveFileName
-
bool _viewFrustumCullingActive
-
bool _smallFeatureCullingActive
-
int polymode
-
int texture
-
int backface
-
int lighting
-
int flat_shade
-
float frRate
-
int _printStats
-
StatsRecord times[3]
-
bool _useDisplayLists
-
osg::Timer _timer
-
osg::Timer_t _initialTick
-
osg::Timer_t _lastFrameTick
-
osg::Timer_t _frameTick
-
osg::ref_ptr<osg::FrameStamp> _frameStamp
-
osg::ref_ptr<osg::DisplaySettings> _displaySettings
-
bool _recordingAnimationPath
-
osg::ref_ptr<osg::AnimationPath> _animationPath
Protected Methods
-
virtual void clear()
-
virtual void display()
-
virtual void reshape(GLint w, GLint h)
-
virtual void mouseMotion(int x, int y)
-
virtual void mousePassiveMotion(int x, int y)
-
virtual void mouse(int button, int state, int x, int y)
-
virtual void keyboard(unsigned char key, int x, int y)
-
void setFocusedViewport(unsigned int pos)
-
int mapWindowXYToViewport(int x, int y)
-
void showStats(unsigned int i)
-
osg::Timer_t clockTick()
-
osg::Timer_t frameTick()
Protected Members
-
struct ViewportDef
-
typedef std::vector<ViewportDef> ViewportList
-
struct StatsRecord
Inherited from Window:
Public Methods
-
void setWindowOrigin(int x, int y)
-
void setWindowSize(int width, int height)
-
void setWindowTitle(const std::string& title)
-
void setDisplayMode(unsigned int displayMode)
Protected Fields
-
static Window* s_theWindow
-
std::string _title
-
int _wx
-
int _wy
-
int _ww
-
int _wh
-
unsigned int _displayMode
-
int _is_open
-
int _mx
-
int _my
-
int _mbutton
-
bool _fullscreen
-
int _saved_wx
-
int _saved_wy
-
int _saved_ww
-
int _saved_wh
-
bool _exit
Protected Methods
-
static void displayCB()
-
static void reshapeCB(int w, int h)
-
static void visibilityCB(int state)
-
static void mouseMotionCB(int x, int y)
-
static void mousePassiveMotionCB(int x, int y)
-
static void mouseCB(int button, int state, int x, int y)
-
static void keyboardCB(unsigned char key, int x, int y )
-
static void specialCB(int key, int x, int y)
-
static void spaceballMotionCB(int x, int y, int z)
-
static void spaceballRotateCB(int x, int y, int z)
-
static void spaceballButtonCB(int button, int state)
-
virtual void visibility(int state)
-
virtual void special(int key, int x, int y)
-
virtual void spaceballMotion(int x, int y, int z)
-
virtual void spaceballRotate(int x, int y, int z)
-
virtual void spaceballButton(int button, int state)
-
void 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 :-)
- Viewer()
- virtual ~Viewer()
- virtual void init(osg::Node* rootnode)
- init is deprecated, you should use addViewport instead. init is
only available for backwards compatibility.
- virtual unsigned int addViewport(osgUtil::SceneView* sv, float x = 0.0, float y = 0.0, float width = 1.0, float height = 1.0)
- virtual unsigned int addViewport(osg::Node*, float x = 0.0, float y = 0.0, float width = 1.0, float height = 1.0)
- unsigned int getNumViewports() const
- osgUtil::SceneView* getViewportSceneView(unsigned int pos)
- virtual bool open()
- virtual bool run()
- virtual float app(unsigned int viewport)
- virtual float cull(unsigned int viewport)
- virtual float draw(unsigned int viewport)
- long initClock()
- double clockSeconds()
- osg::Timer_t updateFrameTick()
- double frameSeconds()
- double frameRate()
- void help(std::ostream& fout)
- unsigned int registerCameraManipulator(osgGA::CameraManipulator* cm, unsigned int viewport = 0)
- void selectCameraManipulator(unsigned int pos, unsigned int viewport = 0)
- void prependEventHandler(osgGA::GUIEventHandler* handler, unsigned int viewport = 0)
- void appendEventHandler(osgGA::GUIEventHandler* handler, unsigned int viewport = 0)
- virtual void requestRedraw()
- virtual void requestContinuousUpdate(bool )
- virtual void requestWarpPointer(int x, int y)
- virtual void requestShutdown()
- virtual void toggleFullScreen()
- Toggle fullscreen
- void readCommandLine(std::vector<std::string>& commandLine)
- read the command line string list, removing any matched control sequences
- void setDisplaySettings(osg::DisplaySettings* ds)
- osg::DisplaySettings* getDisplaySettings()
- const osg::DisplaySettings* getDisplaySettings() const
- typedef std::vector<osg::ref_ptr<osgGA::CameraManipulator> > CameraManipList
- typedef std::list<osg::ref_ptr<osgGA::GUIEventHandler> > EventHandlerList
- void setRecordingAnimationPath(bool on)
- bool getRecordingAnimationPath() const
- void setAnimationPath(osg::AnimationPath* path)
- osg::AnimationPath* getAnimationPath()
- const osg::AnimationPath* getAnimationPath() const
- virtual void clear()
- virtual void display()
- virtual void reshape(GLint w, GLint h)
- virtual void mouseMotion(int x, int y)
- virtual void mousePassiveMotion(int x, int y)
- virtual void mouse(int button, int state, int x, int y)
- virtual void keyboard(unsigned char key, int x, int y)
- void setFocusedViewport(unsigned int pos)
- int mapWindowXYToViewport(int x, int y)
- void showStats(unsigned int i)
- static Viewer* s_theViewer
- struct ViewportDef
- osg::ref_ptr<osgUtil::SceneView> sceneView
- float viewport[4]
- osg::ref_ptr<osgGA::CameraManipulator> _cameraManipulator
- CameraManipList _cameraManipList
- EventHandlerList _eventHandlerList
- typedef std::vector<ViewportDef> ViewportList
- ViewportList _viewportList
- unsigned int _focusedViewport
- std::string _saveFileName
- bool _viewFrustumCullingActive
- bool _smallFeatureCullingActive
- int polymode
- int texture
- int backface
- int lighting
- int flat_shade
- float frRate
- int _printStats
- struct StatsRecord
- StatsRecord()
- float timeApp
- float timeCull
- float timeDraw
- float timeFrame
- osg::Timer_t frameend
- StatsRecord times[3]
- bool _useDisplayLists
- osg::Timer _timer
- osg::Timer_t _initialTick
- osg::Timer_t _lastFrameTick
- osg::Timer_t _frameTick
- osg::Timer_t clockTick()
- osg::Timer_t frameTick()
- osg::ref_ptr<osg::FrameStamp> _frameStamp
- osg::ref_ptr<osg::DisplaySettings> _displaySettings
- bool _recordingAnimationPath
- osg::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++.