source: experimental/distortionNG/DistortionManipulator.h @ 348

Last change on this file since 348 was 348, checked in by Torben Dannhauer, 13 years ago
File size: 2.0 KB
Line 
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
19#ifndef OSGGA_DISTORTION_MANIPULATOR
20#define OSGGA_DISTORTION_MANIPULATOR 1
21
22#include<osgGA/GUIEventHandler>
23
24
25namespace osgViewer {
26
27class DistortionManipulator : public osgGA::GUIEventHandler
28{
29public:
30        enum SetupMode {
31                DISABLED,
32                MANUAL,
33                DELEGATED
34        };
35        enum DistortionMode {
36                MESH,
37                TEXCOORDINATES
38        };
39        enum ManualSetupMode {
40                DISTORTION,
41                BLENDING
42        };
43        enum VisualizationMode {
44                DISTORTION_MESH,
45                INTENSITY_MAP,
46                NONE
47        };
48
49
50        DistortionManipulator();
51        virtual ~DistortionManipulator();
52
53        virtual void getUsage(osg::ApplicationUsage& usage) const;
54    virtual bool handle(const osgGA::GUIEventAdapter& ea,osgGA::GUIActionAdapter& aa, osg::Object*, osg::NodeVisitor* nv);
55
56private:
57        void resetIntensityMap();
58        void resetDistortion();
59
60        SetupMode activeSetupMode;
61        DistortionMode activeDistortionMode;
62        ManualSetupMode activeManualSetupMode;
63        VisualizationMode activeVisualizationMode;
64};
65
66
67}
68
69#endif /* OSGGA_DISTORTION_MANIPULATOR */
Note: See TracBrowser for help on using the repository browser.