Ignore:
Timestamp:
Jun 14, 2012, 10:21:52 PM (12 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/DistortionManipulator.cpp

    r379 r380  
    1818
    1919#include "DistortionManipulator.h"
     20#include "extViewer.h"
    2021
    2122#include <osgViewer/Viewer>
     
    3334
    3435
    35 DistortionManipulator::DistortionManipulator(DistortionSet* ds)
    36  : _highlightColor( osg::Vec4(1.0f, 1.0f, 0.0f, 1.0f) ), _distortionSet( ds )
     36DistortionManipulator::DistortionManipulator(extViewer* viewer, DistortionSet* ds)
     37 : _highlightColor( osg::Vec4(1.0f, 1.0f, 0.0f, 1.0f) ), _distortionSet( ds ), _viewer(viewer)
    3738{
    3839        activeSetupMode = DISABLED;
     
    258259                                //OSG_ALWAYS<<"Calling delegated class.."<<std::endl;
    259260                                _delegatedDistortionSetupStrategy->delegateDistortionSetup(_distortionSet);
    260                                 if( _distortionSet->isDirty() )
     261                                if( _distortionSet->isDirty() && _viewer.valid())
    261262                                {
    262                                         // todo: transfer matrixes into viewer camera.
     263                                        _viewer->updateDistortion();
    263264                                }
    264265                                //OSG_ALWAYS<<"..done"<<std::endl;
Note: See TracChangeset for help on using the changeset viewer.