Ignore:
Timestamp:
Nov 1, 2004, 10:53:50 PM (20 years ago)
Author:
darran
Message:
  • searching for origin of "popping" triangles in cairns dataset
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Swollen/swollen/main.cpp

    r6 r11  
    113113    model->addChild( water->get() );
    114114
     115
    115116    // center model in x and y
    116117    osg::BoundingBox bbox = bedslope->getBound();
     
    118119    model->setScale( osg::Vec3(scale,scale,scale) );
    119120    model->setPosition( -bbox.center()*scale );
     121
    120122
    121123    // sky
     
    153155    viewer.getTrackball()->moveToHome();
    154156
    155     // for lighting
    156     //#include <osgGA/TrackballManipulator>
    157     //osgGA::TrackballManipulator* trackball = new osgGA::TrackballManipulator;
    158     //trackball->setAutoComputeHomePosition( false );
    159     // trackball->setNode( spotlight->get() );
    160     //trackball->setByMatrix( spotlight->getMatrix() );
    161     //viewer.getEventHandlerList().push_front( trackball );
    162 
    163 
    164     // set up the animation path
    165     #include <osg/AnimationPath>
    166     osg::AnimationPath* animationPath = new osg::AnimationPath;
    167     animationPath->insert(0.0,osg::AnimationPath::ControlPoint( osg::Vec3(0,0,2) ));
    168     animationPath->insert(2.0,osg::AnimationPath::ControlPoint( osg::Vec3(2,0,0) ));
    169     animationPath->insert(4.0,osg::AnimationPath::ControlPoint( osg::Vec3(0,0,2) ));
    170     animationPath->insert(6.0,osg::AnimationPath::ControlPoint( osg::Vec3(-2,0,0) ));
    171     animationPath->insert(8.0,osg::AnimationPath::ControlPoint( osg::Vec3(0,0,2) ));
    172     animationPath->setLoopMode(osg::AnimationPath::LOOP);
    173 
    174157
    175158    while( !viewer.done() )
     
    190173        }
    191174
    192         // std::cout << viewer.getTrackball()->getMatrix() << std::endl;
    193         //spotlight->setMatrix( trackball->getInverseMatrix() );
    194 
    195             // light animation
    196             //osg::AnimationPath::ControlPoint cp;
    197             //bool rc = animationPath->getInterpolatedControlPoint( time, cp );
    198             //spotlight->setPosition( cp._position );
    199 
    200175        // watersurface
    201176        if( event_handler->toggleWireframe() )
Note: See TracChangeset for help on using the changeset viewer.