- Timestamp:
- Aug 13, 2012, 8:36:29 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/DistortionSetupStrategyProjectionDesigner.h
r406 r410 19 19 #pragma once 20 20 21 #include <osgDB/FileUtils> 22 #include <osg/Texture2D> 23 21 24 #include "DistortionSetupStrategy.h" 25 26 /** 27 * \brief This class parses the Projection Dsigner specific configuration files. 28 * 29 * @author Torben Dannhauer 30 * @date Aug 2012 31 */ 32 class CameraConfigParser : public osg::Referenced 33 { 34 public: 35 CameraConfigParser(); 36 virtual ~CameraConfigParser() {}; 37 38 bool parseConfigFile(const char * filename); 39 40 bool extractFrustum(std::string data_); 41 bool extractRotation(std::string data_); 42 bool extractTranslation(std::string data_); 43 44 std::vector<double> getFrustumDataset() {return(frustumValues);} 45 std::vector<double> getRotationDataset() {return(rotationValues);} 46 std::vector<double> getTranslationDataset() {return(translationValues);} 47 bool isConfigParsed() {return configParsed;}; 48 49 private: 50 bool configParsed; 51 std::vector<double> frustumValues; 52 std::vector<double> rotationValues; 53 std::vector<double> translationValues; 54 }; 22 55 23 56 24 57 /** 25 * \brief "Project Syntropy" Setup Strategy reads setup files of http://www.project-syntropy.de/and configures the distortion accordingly.58 * \brief "Projection Designer" Setup Strategy reads setup files of Projection Designer and configures the distortion accordingly. 26 59 * 27 * @author Torben Dannhauer 60 * @author Torben Dannhauer, Ludwig Friedmann 28 61 * @date Aug 2012 29 62 */ … … 35 68 ~DistortionSetupStrategyProjectionDesigner(); 36 69 void delegateDistortionSetup(osgViewer::DistortionSet* distortionSet); 70 void setDistortionInputFiles(std::string distortionFile, std::string blendmapFile, std::string frustumFile); 71 72 std::vector<double> getFrustumDataset() {return parser->getFrustumDataset();}; 73 74 std::vector<double> getRotationDataset() {return parser->getRotationDataset();}; 75 76 std::vector<double> getTranslationDataset() {return parser->getTranslationDataset();}; 77 37 78 private: 38 79 bool _distortionInitialized; //Is Distortion already initialized? 80 std::string _blendmapFilename; 81 std::string _frustumFilename; 82 std::string _distortionFilename; 39 83 84 85 86 osg::Texture* loadTexture( const std::string& fileName ); 87 88 osg::ref_ptr<CameraConfigParser> parser; 89 osg::ref_ptr<osg::Texture> distortMapTexture; 40 90 }; 91 92 93
Note: See TracChangeset
for help on using the changeset viewer.