Show
Ignore:
Timestamp:
02/06/06 18:12:35 (8 years ago)
Author:
robert
Message:

Added support for up sampling by dividing longest edges.

Files:
1 modified

Legend:

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

    r4780 r4979  
    134134    std::cout << "Time to load = "<<osg::Timer::instance()->delta_s(start_tick,end_tick)<<std::endl; 
    135135 
    136     osgUtil::Simplifier simplifier(sampleRatio, maxError); 
    137136     
    138137    //loadedModel->accept(simplifier); 
     
    167166            if (keyFlag == 1) ratio *= multiplier; 
    168167            if (keyFlag == 2) ratio /= multiplier; 
    169             if (ratio>1.0f) ratio=1.0f; 
    170168            if (ratio<minRatio) ratio=minRatio; 
    171169             
    172             simplifier.setSampleRatio(ratio); 
     170            osgUtil::Simplifier simplifier(ratio, maxError); 
    173171 
    174172            std::cout<<"Runing osgUtil::Simplifier with SampleRatio="<<ratio<<" maxError="<<maxError<<" ...";