Show
Ignore:
Timestamp:
05/14/07 18:14:40 (8 years ago)
Author:
robert
Message:

Clean up comments and rebuilt wrappers.

Added extra event handlers to osgsimulator example

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgsimulation/osgsimulation.cpp

    r6283 r6665  
    1818 
    1919#include <osgViewer/Viewer> 
     20#include <osgViewer/StatsHandler> 
     21#include <osgViewer/HelpHandler> 
     22#include <osgViewer/ViewerEventHandlers> 
    2023 
    2124#include <osg/Group> 
     
    3841 
    3942#include <osgGA/NodeTrackerManipulator> 
     43#include <osgGA/StateSetManipulator> 
    4044 
    4145#include <iostream> 
     
    173177    osgViewer::Viewer viewer; 
    174178 
     179    // add the state manipulator 
     180    viewer.addEventHandler( new osgGA::StateSetManipulator(viewer.getCamera()->getOrCreateStateSet()) ); 
     181     
     182    // add the thread model handler 
     183    viewer.addEventHandler(new osgViewer::ThreadingHandler); 
     184 
     185    // add the window size toggle handler 
     186    viewer.addEventHandler(new osgViewer::WindowSizeHandler); 
     187         
     188    // add the stats handler 
     189    viewer.addEventHandler(new osgViewer::StatsHandler); 
     190 
     191    // add the help handler 
     192    viewer.addEventHandler(new osgViewer::HelpHandler(arguments.getApplicationUsage())); 
     193 
     194    // set the near far ration computation up. 
    175195    viewer.getCamera()->setComputeNearFarMode(osg::CullSettings::COMPUTE_NEAR_FAR_USING_PRIMITIVES); 
    176196    viewer.getCamera()->setNearFarRatio(0.00001f);