Ignore:
Timestamp:
Aug 13, 2012, 8:36:29 PM (12 years ago)
Author:
Torben Dannhauer
Message:

New Distortion setup strategy added: distortionNG can now handle configuration files of "Projection Designer"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/main.cpp

    r409 r410  
    3838#include "DistortionManipulator.h"
    3939#include "DistortionSetupStrategyProjectSyntropy.h"
     40#include "DistortionSetupStrategyProjectionDesigner.h"
    4041
    4142int main(int argc, char** argv)
     
    9899                                                                                "./resources/ProjectSyntropy/example2/blending_1.bmp",
    99100                                                                                "./resources/ProjectSyntropy/example2/frustum_1.csv" );
    100         distortionManip->setDistortionSetupStrategy( psStrategy );
     101
     102        //LF UPDATE
     103        DistortionSetupStrategyProjectionDesigner* pdStrategy = new DistortionSetupStrategyProjectionDesigner();
     104        pdStrategy->setDistortionInputFiles( "./resources/ProjectionDesigner/example1/distort_center.bmp",
     105                                                                                "./resources/ProjectionDesigner/example1/blend_center.bmp",
     106                                                                                "./resources/ProjectionDesigner/example1/view_center.cfg" );
     107
     108
     109        //Decide on DistortionSetupStrategy
     110        //distortionManip->setDistortionSetupStrategy( psStrategy );
     111        distortionManip->setDistortionSetupStrategy( pdStrategy );
    101112        viewer.addEventHandler(distortionManip);
    102113
     
    127138    // load the nodes from the commandline arguments.
    128139    osg::Node* rootnode = osgDB::readNodeFiles(arguments);
     140        osgDB::Registry::instance()->getDataFilePathList().push_front("./resources/");
    129141        osgDB::Registry::instance()->getDataFilePathList().push_front("H:/AllInOnDB");
    130142
    131143    if (!rootnode)
    132144    {
    133                 rootnode = osgDB::readNodeFile("D:/osgVisual/experimental/distortionNG/resources/TestSphere/sphere_500.obj");
     145                rootnode = osgDB::readNodeFile("./resources/TestSphere/sphere_500.obj");
    134146                if(!rootnode)
    135147                {
Note: See TracChangeset for help on using the changeset viewer.