source: experimental/distortionNG/DistortionSet.h @ 344

Last change on this file since 344 was 344, checked in by Torben Dannhauer, 12 years ago

distortion container osgViewer::DistortionSet? angelegt

File size: 3.1 KB
Line 
1#ifndef OSGVIEWER_DistortionSet
2#define OSGVIEWER_DistortionSet 1
3
4/* -*-c++-*- osgVisual - Copyright (C) 2009-2012 Torben Dannhauer
5 *
6 * This library is based on OpenSceneGraph, open source and may be redistributed and/or modified under
7 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
8 * (at your option) any later version.  The full license is in LICENSE file
9 * included with this distribution, and on the openscenegraph.org website.
10 *
11 * osgVisual requires for some proprietary modules a license from the correspondig manufacturer.
12 * You have to aquire licenses for all used proprietary modules.
13 *
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * OpenSceneGraph Public License for more details.
18*/
19
20#include <osg/Object>
21#include <osg/Image>
22#include <osg/Matrixd>
23#include <osg/PrimitiveSet>
24
25namespace osgViewer {
26
27class DistortionSet : public osg::Object
28{
29public:
30        META_Object(osgViewer,DistortionSet);   // Required for serializer
31
32        DistortionSet(const osgViewer::DistortionSet& ds, const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY): // Required for serializer
33                _distortionMeshRows(ds._distortionMeshRows),
34                _distortionMeshColumns(ds._distortionMeshColumns),
35                //osg::PrimitiveSet::Mode _MeshType
36                _intensityMap(ds._intensityMap),
37                _texUnitScene(ds._texUnitScene),
38                _texUnitIntensityMap(ds._texUnitIntensityMap),
39                _viewOffset(ds._viewOffset),
40                _projectionOffset(ds._projectionOffset){}
41
42        DistortionSet();
43        virtual ~DistortionSet();
44
45        void setDistortionMeshRows(int distortionMeshRows)              { _distortionMeshRows = distortionMeshRows; }
46        int getDistortionMeshRows() const       { return(_distortionMeshRows); }
47
48        void setDistortionMeshColumns(int distortionMeshColumns)                { _distortionMeshColumns = distortionMeshColumns; }
49        int getDistortionMeshColumns() const    { return(_distortionMeshColumns); }
50
51        void setIntensityMap(osg::Image* intensityMap)          { _intensityMap = intensityMap; }
52        const osg::Image* getIntensityMap() const       { return(_intensityMap); }
53
54        void setTexUnitScene(unsigned int texUnitScene)         { _texUnitScene = texUnitScene; }
55        unsigned int getTexUnitScene() const    { return(_texUnitScene); }
56
57        void setTexUnitIntensityMap(unsigned int texUnitIntensityMap)   { _texUnitIntensityMap = texUnitIntensityMap; }
58        unsigned int getTexUnitIntensityMap() const     { return(_texUnitIntensityMap); }
59
60        void setViewOffset(const osg::Matrixd& viewOffset)      { _viewOffset = viewOffset; }
61        const osg::Matrixd& getViewOffset() const       { return(_viewOffset); }
62
63        void setProjectionOffset(const osg::Matrixd& projectionOffset)          { _projectionOffset = projectionOffset; }
64        const osg::Matrixd& getProjectionOffset() const { return(_projectionOffset); }
65
66private:
67        int _distortionMeshRows;
68        int _distortionMeshColumns;
69        //osg::PrimitiveSet::Mode _MeshType
70       
71        osg::ref_ptr<osg::Image> _intensityMap;
72        unsigned int _texUnitScene;
73        unsigned int _texUnitIntensityMap;
74
75        osg::Matrixd _viewOffset;
76        osg::Matrixd _projectionOffset;
77
78
79};
80
81}
82
83
84#endif
Note: See TracBrowser for help on using the repository browser.