Changeset 372 for experimental


Ignore:
Timestamp:
Jun 1, 2012, 9:57:13 PM (12 years ago)
Author:
Torben Dannhauer
Message:

Alpha version of the strategy pattern to separate the delegated DistortionSetup? algorithms from the main software.

Location:
experimental/distortionNG
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/DistortionManipulator.h

    r371 r372  
    6666        void setDistortionSet(DistortionSet* ds) {_distortionSet = ds;}
    6767
    68        
     68        void setDistortionSetupStrategy(DistortionSetupStrategy* strategy)      {_delegatedDistortionSetupStrategy = strategy;}
    6969
    7070private:
  • experimental/distortionNG/DistortionSetupStrategy.h

    r371 r372  
    3434public:
    3535        DistortionSetupStrategy();
    36         ~DistortionSetupStrategy();
     36        virtual ~DistortionSetupStrategy();
    3737        virtual void delegateDistortionSetup(osgViewer::DistortionSet* distortionSet)=0;
    3838
  • experimental/distortionNG/distortionNG.vcproj

    r371 r372  
    346346                        </File>
    347347                        <File
     348                                RelativePath=".\DistortionSetupStrategyProjectSyntropy.cpp"
     349                                >
     350                        </File>
     351                        <File
    348352                                RelativePath=".\extViewer.cpp"
    349353                                >
     
    372376                        </File>
    373377                        <File
     378                                RelativePath=".\DistortionSetupStrategyProjectSyntropy.h"
     379                                >
     380                        </File>
     381                        <File
    374382                                RelativePath=".\extViewer.h"
    375383                                >
  • experimental/distortionNG/main.cpp

    r371 r372  
    3737
    3838#include "DistortionManipulator.h"
     39#include "DistortionSetupStrategyProjectSyntropy.h"
    3940
    4041int main(int argc, char** argv)
     
    9293
    9394        // Add the distortion manipulator
    94         viewer.addEventHandler(new osgViewer::DistortionManipulator(_distortionSet));
     95        osgViewer::DistortionManipulator* distortionManip = new osgViewer::DistortionManipulator(_distortionSet);
     96        distortionManip->setDistortionSetupStrategy( new DistortionSetupStrategyProjectSyntropy() );
     97        viewer.addEventHandler(distortionManip);
    9598
    9699    // add the state manipulator
Note: See TracChangeset for help on using the changeset viewer.