Changeset 371 for experimental


Ignore:
Timestamp:
Jun 1, 2012, 9:23:50 PM (12 years ago)
Author:
Torben Dannhauer
Message:
 
Location:
experimental/distortionNG
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/DistortionManipulator.cpp

    r370 r371  
    2727#include <osgDB/WriteFile>
    2828
     29#include "DistortionSetupStrategy.h"
     30
    2931using namespace osg;
    3032using namespace osgViewer;
     
    3840        activeManualSetupMode = DISTORTION;
    3941        activeVisualizationMode = NONE;
     42
     43        _delegatedDistortionSetupStrategy = NULL;
    4044
    4145        _highlighter = NULL;
     
    250254                case(osgGA::GUIEventAdapter::FRAME):
    251255                {
    252                         if ( activeSetupMode == DELEGATED)
    253                         {
    254                                 OSG_ALWAYS<<"Todo: Calling delegated class!"<<std::endl;
     256                        if ( activeSetupMode == DELEGATED && _delegatedDistortionSetupStrategy.valid())
     257                        {
     258                                OSG_ALWAYS<<"Calling delegated class.."<<std::endl;
     259                                _delegatedDistortionSetupStrategy->delegateDistortionSetup(_distortionSet);
     260                                OSG_ALWAYS<<"..done"<<std::endl;
    255261                        }
    256262                        break;
  • experimental/distortionNG/DistortionManipulator.h

    r370 r371  
    2828#include <osgText/Text>
    2929
     30#include "DistortionSetupStrategy.h"
    3031#include "DistortionSet.h"
    3132
     
    8485
    8586        osg::ref_ptr<DistortionSet> _distortionSet;
    86 
     87        osg::ref_ptr<DistortionSetupStrategy> _delegatedDistortionSetupStrategy;
    8788
    8889        osg::ref_ptr<osg::Geometry> _highlighter;
  • experimental/distortionNG/ReaderWriterDist.cpp

    r368 r371  
     1/* osgVisual test. distortionNG, experimental.
     2*
     3*  Permission is hereby granted, free of charge, to any person obtaining a copy
     4*  of this software and associated documentation files (the "Software"), to deal
     5*  in the Software without restriction, including without limitation the rights
     6*  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     7*  copies of the Software, and to permit persons to whom the Software is
     8*  furnished to do so, subject to the following conditions:
     9*
     10*  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     11*  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     12*  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     13*  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     14*  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     15*  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
     16*  THE SOFTWARE.
     17*/
     18
    119#include "ReaderWriterDist.h"
    220#include <osg/KdTree>
  • experimental/distortionNG/ReaderWriterDist.h

    r368 r371  
     1/* osgVisual test. distortionNG, experimental.
     2*
     3*  Permission is hereby granted, free of charge, to any person obtaining a copy
     4*  of this software and associated documentation files (the "Software"), to deal
     5*  in the Software without restriction, including without limitation the rights
     6*  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
     7*  copies of the Software, and to permit persons to whom the Software is
     8*  furnished to do so, subject to the following conditions:
     9*
     10*  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     11*  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     12*  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     13*  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     14*  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
     15*  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
     16*  THE SOFTWARE.
     17*/
     18
    119#pragma once
    2 
    3 
    420
    521#include <osg/Notify>
  • experimental/distortionNG/distortionNG.vcproj

    r361 r371  
    342342                        </File>
    343343                        <File
     344                                RelativePath=".\DistortionSetupStrategy.cpp"
     345                                >
     346                        </File>
     347                        <File
    344348                                RelativePath=".\extViewer.cpp"
    345349                                >
     
    364368                        </File>
    365369                        <File
     370                                RelativePath=".\DistortionSetupStrategy.h"
     371                                >
     372                        </File>
     373                        <File
    366374                                RelativePath=".\extViewer.h"
    367375                                >
  • experimental/distortionNG/main.cpp

    r370 r371  
    5757
    5858// ---- test plugin read / write
    59 
    6059        //osgDB::writeObjectFile( *_distortionSet, "distortionset.dist" );
    6160        _distortionSet = NULL;
    6261        _distortionSet = dynamic_cast<osgViewer::DistortionSet*>( osgDB::readObjectFile( "distortionset.dist" ) );
    63                
    64 
    6562// ------------ Test ende -----------
    6663
     
    198195 *                                                                              Grundfunktionen:
    199196 *                                                      [done]          - Key to Show Distortion Mesh / Intensity Map / none
    200  *                                                                              - Key to Save distortion Container  - via osgDB::writeObjectFile(const osg::Object& object, const std::string& filename, const Options* options). osgDB & registry determines and loads the approriate plugin bythe file ending (.dist).
    201  *                                                      [.]             - Key to toggle MANUAL mode between blending und distortion setup
     197 *                                                      [done]          - Key to Save distortion Container  - via osgDB::writeObjectFile(const osg::Object& object, const std::string& filename, const Options* options). osgDB & registry determines and loads the approriate plugin bythe file ending (.dist).
     198 *                                                      [.]                     - Key to toggle MANUAL mode between blending und distortion setup
    202199 *                                                      [done]          - Key to toggle distortion setup:
    203200 *                                                                                              DISABLED distortion/blending modifications are forbidden (ggfs. beim Verlassen von DISABLED ggf. auf singleThreaded wechseln und beim aktivieren von DISABLED wieder auf das alte threadingmodel. Alternativ  die data variance des meshes/Blendmap beeinflussen)
     
    221218 *
    222219 * Plugin fertigstellen
    223  * save funktion des manipulators via osgDB::writeObjectFile fertig stellen
    224220 * extViewer::setUpViewForManualDistortion(std::string distFile)
    225221 * Load Funktion vom osgViewer (ersatzweise Anfangs in der main.cpp) fertigstellen : -dist <distFile> weiterreichen and extViewer::setUpViewForManualDistortion(std::string distFile)
Note: See TracChangeset for help on using the changeset viewer.