Ignore:
Timestamp:
Apr 21, 2012, 9:49:26 PM (12 years ago)
Author:
Torben Dannhauer
Message:

DistortionManipulator? is working (alpha stadium)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/DistortionSet.h

    r350 r353  
    2121#include <osg/Image>
    2222#include <osg/Matrixd>
     23#include <osg/Camera>
     24#include <osg/Switch>
    2325
    2426namespace osgViewer {
     
    4648        osg::Image* getIntensityMap()  { return _intensityMap; }        // Also for manipulating the intensity map
    4749        bool& getShowIntensityMapOnlyAsRef()    { return _showIntesityMapMapOnly;}
     50
     51        void setDistortionCamera(osg::Camera* camera)   { _camera = camera;}
     52        osg::Camera* getDistortionCamera()      { return _camera.get(); }
     53
     54        osg::Switch* getDistortionInternals()   { return _distortionInternals; }
    4855
    4956
     
    9299
    93100        bool _showIntesityMapMapOnly;   // Intensity Blending is done by a frag shader. To control it on runtime, the uniform must be bound to a central variable.
     101
     102        // Interconnect-Pointer to allow acces between distortion elements (osgViewer) and the distortion manipulator.
     103        // These variable are therefor not saved/restored by the serializer but populated on runtime.
     104        osg::observer_ptr<osg::Camera> _camera; // is used to pass the distortion cam from osgViewers setupDistortion() method to the manipulator.
     105        osg::ref_ptr<osg::Switch> _distortionInternals;
    94106};
    95107
Note: See TracChangeset for help on using the changeset viewer.