Changeset 308


Ignore:
Timestamp:
Jul 26, 2011, 8:12:25 AM (13 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
experimental/distortionNG
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/distortionNG.h

    r307 r308  
    11#pragma once
    22
    3 class distortionNG :
    4         public osg::Referenced
     3#include<osg/Referenced>
     4
     5class distortionNG : public osg::Referenced
    56{
    67public:
  • experimental/distortionNG/main.cpp

    r307 r308  
    8888    viewer.addEventHandler(new osgViewer::ScreenCaptureHandler);
    8989
    90 
    91     // obtain the vertical scale
    92     float verticalScale = 1.0f;
    93     while(arguments.read("-v",verticalScale)) {}
    94 
    95     // obtain the sample ratio
    96     float sampleRatio = 1.0f;
    97     while(arguments.read("-r",sampleRatio)) {}
    98 
    9990    // load the nodes from the commandline arguments.
    10091    osg::Node* rootnode = osgDB::readNodeFiles(arguments);
     
    10293    if (!rootnode)
    10394    {
    104         osg::notify(osg::NOTICE)<<"Warning: no valid data loaded, please specify a database on the command line."<<std::endl;
     95        osg::notify(osg::WARN)<<"Warning: no valid data loaded, please specify a database on the command line."<<std::endl;
    10596        return 1;
    10697    }
    10798
    108     terrain->setSampleRatio(sampleRatio);
    109     terrain->setVerticalScale(verticalScale);
    110     terrain->setBlendingPolicy(blendingPolicy);
    111         //osg::ref_ptr<osgTerrain::TerrainTechnique> myT = new osgTerrain::myTerrainTechnique();
    112         //terrain->setTerrainTechniquePrototype( myT );
    113 
    114 
    115         // Use Tile load Callback
    116         osg::ref_ptr<osgTerrain::GeometryTechniquePrototypeWorkaroundTLC<osgTerrain::myTerrainTechnique> > tlcb = new osgTerrain::GeometryTechniquePrototypeWorkaroundTLC<osgTerrain::myTerrainTechnique>();
    117         osgTerrain::TerrainTile::setTileLoadedCallback(tlcb);
    118 
    119     // register our custom handler for adjust Terrain settings
    120     viewer.addEventHandler(new TerrainHandler(terrain));
    12199
    122100    // add a viewport to the viewer and attach the scene graph.
Note: See TracChangeset for help on using the changeset viewer.