Show
Ignore:
Timestamp:
04/07/05 15:49:54 (9 years ago)
Author:
robert
Message:

Introduced a flight path that goes around the earth going into the north and sound
hemisphere's with heading and roll adjustment.

Files:
1 modified

Legend:

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

    r3933 r3977  
    117117    { 
    118118        _longitude += ((2.0*osg::PI)/360.0)/20.0; 
     119        _latitude = sin(_longitude); 
     120 
     121        // adjust the heading and roll to roughly look ok, 
     122        // but bearing no reality to physics..         
     123        osg::Quat heading; 
     124        heading.makeRotate(osg::DegreesToRadians(90.0)+cos(_longitude),0.0,0.0,1.0); 
     125         
     126        osg::Quat roll; 
     127        roll.makeRotate(-_latitude*0.5f,0.0,1.0,0.0); 
     128         
     129        _rotation = roll*heading; 
    119130    } 
    120131 
     
    204215    arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] image_file_left_eye image_file_right_eye"); 
    205216    arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); 
     217    arguments.getApplicationUsage()->addCommandLineOption("--rotate-model angle x y z","Rotate model"); 
     218    arguments.getApplicationUsage()->addCommandLineOption("--flight-path",""); 
     219    arguments.getApplicationUsage()->addCommandLineOption("--tracker-mode","NODE_CENTER_AND_ROTATION | NODE_CENTER_AND_AZIM | NODE_CENTER"); 
     220    arguments.getApplicationUsage()->addCommandLineOption("--rotation-mode","TRACKBALL | ELEVATION_AZIM"); 
    206221     
    207222