Ignore:
Timestamp:
Jun 15, 2012, 9:14:07 PM (12 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/DistortionSet.h

    r379 r383  
    5454
    5555        // Working access
    56         bool isDirty(){return(_dirty);}
    57         void dirty(){_dirty=true;}
     56        bool isDirty(){return(_meshDirty || _matrixDirty);}
     57        void dirtyMesh(){_meshDirty = true;}
     58        void dirtyMatrix(){_matrixDirty = true;}
     59        void clearDirtyStatus() { _meshDirty = false; _matrixDirty = false;}
     60       
     61        void setDistortionMeshDimensions(int rows, int cols);
    5862
    5963        osg::Image* getIntensityMap()  { return _intensityMap; }        // Also for manipulating the intensity map
     
    7983        int getDistortionMeshColumns() const    { return _distortionMeshColumns; }
    8084
    81         void setDistortionMesh(osg::Geometry*);
    82         const osg::Geometry* getDistortionMesh() const;
     85        void setDistortionMesh(osg::Vec4Array* distortionMesh)  { _distortionMesh = distortionMesh; }
     86        const osg::Vec4Array* getDistortionMesh() const { return _distortionMesh; }
    8387
    8488        void setMeshType(GLenum meshType) { _meshType = meshType; }
     
    106110
    107111private:
    108         bool _dirty;
     112        // Blendmap has no dirty flag because changes of the intensityMap is directly effective.
     113        bool _meshDirty;
     114        bool _matrixDirty;
     115
    109116        int _distortionMeshRows;
    110117        int _distortionMeshColumns;
     118        osg::ref_ptr<osg::Vec4Array> _distortionMesh;   // x,y = vertex coordinates, z,t=textureCoordinates
    111119        GLenum _meshType;
    112120       
Note: See TracChangeset for help on using the changeset viewer.