Time for action—constructing a LOD Cessna

We will create a discrete LOD node with a set of predefined objects to represent the same model. These objects are used as child nodes of the osg::LOD node and displayed at different distances. We will use the internal polygon reduction technique class osgUtil::Simplifier to generate various detailed objects from an original model. You may also read low-polygon and high-polygon models from disk files.

  1. Include the necessary headers:
    #include <osg/LOD>
    #include <osgDB/ReadFile>
    #include <osgUtil/Simplifier>
    #include <osgViewer/Viewer>
    
  2. We would like to build three levels of model details. First, we need to create three copies of the original model. It is OK to read the Cessna from the file three times, but ...

Get OpenSceneGraph 3.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.