Ignore:
Timestamp:
Apr 21, 2012, 5:28:24 PM (12 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/main.cpp

    r350 r352  
    3535#include <osgGA/AnimationPathManipulator>
    3636#include <osgGA/TerrainManipulator>
     37
     38#include "DistortionManipulator.h"
     39
    3740int main(int argc, char** argv)
    3841{
     
    4851                return -1;
    4952        }
    50 
    51         viewer.setUpViewForManualDistortion(0, intMap);
    52    
     53        // Create DistortionSet
     54        osg::ref_ptr<osgViewer::DistortionSet> _distortionSet = new osgViewer::DistortionSet();
     55        _distortionSet->setIntensityMap( intMap );
     56        _distortionSet->setDistortionMeshRows( 20 );
     57        _distortionSet->setDistortionMeshColumns( 20 );
     58       
     59        viewer.setUpViewForManualDistortion(_distortionSet, 0);
     60   
     61       
     62
    5363        // set up the camera manipulators.
    5464    {
     
    7787    }
    7888
     89        // Add the distortion manipulator
     90        osgViewer::DistortionManipulator* distManip = new osgViewer::DistortionManipulator();
     91        distManip->setDistortionSet(_distortionSet);
     92        viewer.addEventHandler(distManip);
    7993
    8094    // add the state manipulator
Note: See TracChangeset for help on using the changeset viewer.