Changeset 38
- Timestamp:
- Dec 6, 2004, 2:34:19 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Swollen/swollen/main.cpp
r37 r38 31 31 { 32 32 33 std::cout << argv[0] << std::endl;34 35 33 // use an ArgumentParser object to manage the program arguments. 36 34 osg::ArgumentParser arguments(&argc,argv); … … 39 37 arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()); 40 38 arguments.getApplicationUsage()->setCommandLineUsage("swwviewer [options] swwfile ..."); 41 39 arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); 40 arguments.getApplicationUsage()->addCommandLineOption("-scale <s>","Vertical scale factor"); 41 42 42 // construct the viewer. 43 43 CustomViewer viewer(arguments); … … 46 46 viewer.setUpViewer(osgProducer::Viewer::STANDARD_SETTINGS); 47 47 viewer.setClearColor(osg::Vec4(DEF_BACKGROUND_COLOUR)); 48 viewer.getCamera(0)->getRenderSurface()->setWindowRectangle(550,100,640,480);48 //viewer.getCamera(0)->getRenderSurface()->setWindowRectangle(550,100,640,480); 49 49 50 50 … … 81 81 float tps; 82 82 if( !arguments.read("-tps",tps) || tps <= 0.0 ) tps = DEF_TPS; 83 float vscale; 84 if( !arguments.read("-scale",vscale) ) vscale = 1.0; 85 83 86 84 87 … … 118 121 119 122 // FIXME: should be reasonable default and adjustable 120 model->setScale( osg::Vec3(1.0, 1.0, 1.0) );123 model->setScale( osg::Vec3(1.0, 1.0, vscale) ); 121 124 122 125 // sky
Note: See TracChangeset
for help on using the changeset viewer.