-
Book Overview & Buying
-
Table Of Contents
OpenSceneGraph 3.0: Beginner's Guide
While the osgViewer::Viewer class manages only one single view on one scene graph, there is also an osgViewer::CompositeViewer class, which supports multiple views and multiple scenes. This has the same methods such as run(), frame(), and done() to manage the rendering process, but also supports adding and removing independent scene views by using the addView() and removeView() methods, and obtaining a view object at a specific index by using the getView() method. The view object here is defined by the osgViewer::View class.
The osgViewer::View class is the super class of osgViewer::Viewer. It accepts setting a root node as the scene data, and adding a camera manipulator and event handlers to make use of user events as well. The main difference between osgViewer::View and osgViewer::Viewer is that the former cannot be used as a single viewer directly—that is, it doesn't have run() or frame() methods.
To add a created view object to the composite viewer, use the following...
Change the font size
Change margin width
Change background colour