source: experimental/distortionNG/DistortionSetupStrategyProjectSyntropy.h @ 393

Last change on this file since 393 was 383, checked in by Torben Dannhauer, 12 years ago
File size: 2.4 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#pragma once
20
21#include "DistortionSetupStrategy.h"
22
23
24/**
25 * \brief "Project Syntropy" Setup Strategy reads setup files of http://www.project-syntropy.de/ and configures the distortion accordingly.
26 *
27 * @author Torben Dannhauer
28 * @date  Jun 2012
29 */ 
30class DistortionSetupStrategyProjectSyntropy :
31        public DistortionSetupStrategy
32{
33public:
34        DistortionSetupStrategyProjectSyntropy();
35        ~DistortionSetupStrategyProjectSyntropy();
36        void delegateDistortionSetup(osgViewer::DistortionSet* distortionSet);
37        void setDistortionInputFiles( std::string vertexDistortionFile, std::string texCoordDistortionFile, std::string blendmapFile, std::string frustumFile, DistortionSetupStrategy::distortionType type);
38private:
39        //Functions related to CSV-File-Reading
40        int readFrustumFromCSVFile(std::string filePath, int numValues, float* frustumValues);
41        int readMeshDimensionsFromCSVFile(std::string filePath, int* meshRows, int* meshColumns);
42        int readMeshPointsFromCSVFile(std::string filePath, osg::Vec2Array* tmpMesh);
43
44        bool _distortionInitialized;                            //Is Distortion already initialized?
45        DistortionSetupStrategy::distortionType _distortionType; //might be VERTEXDISTORTION, TEXCOORDDISTORTION, COMBINEDDISTORTION or UNDEFINED...
46        std::string _blendmapFilename;
47        std::string _frustumFilename;
48        std::string _vertexDistortionFilename;
49        std::string _texCoordDistortionFilename;
50
51};
Note: See TracBrowser for help on using the repository browser.