| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | #ifndef __FLT_EXPORT_OPTIONS_H__ |
|---|
| 18 | #define __FLT_EXPORT_OPTIONS_H__ 1 |
|---|
| 19 | |
|---|
| 20 | #include "FltWriteResult.h" |
|---|
| 21 | |
|---|
| 22 | #include <osg/Node> |
|---|
| 23 | #include <osg/Notify> |
|---|
| 24 | #include <osgDB/Options> |
|---|
| 25 | #include <osgDB/FileNameUtils> |
|---|
| 26 | |
|---|
| 27 | #include <string> |
|---|
| 28 | #include <utility> |
|---|
| 29 | #include <vector> |
|---|
| 30 | |
|---|
| 31 | |
|---|
| 32 | namespace flt |
|---|
| 33 | { |
|---|
| 34 | |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | |
|---|
| 38 | |
|---|
| 39 | |
|---|
| 40 | |
|---|
| 41 | class ExportOptions : public osgDB::Options |
|---|
| 42 | { |
|---|
| 43 | public: |
|---|
| 44 | ExportOptions( const Options* opt ); |
|---|
| 45 | ExportOptions(); |
|---|
| 46 | |
|---|
| 47 | static const int VERSION_15_7; |
|---|
| 48 | static const int VERSION_15_8; |
|---|
| 49 | static const int VERSION_16_1; |
|---|
| 50 | |
|---|
| 51 | enum FlightUnits |
|---|
| 52 | { |
|---|
| 53 | METERS, |
|---|
| 54 | KILOMETERS, |
|---|
| 55 | FEET, |
|---|
| 56 | INCHES, |
|---|
| 57 | NAUTICAL_MILES |
|---|
| 58 | }; |
|---|
| 59 | |
|---|
| 60 | void setFlightFileVersionNumber( int num ) { _version = num; } |
|---|
| 61 | int getFlightFileVersionNumber() const { return _version; } |
|---|
| 62 | |
|---|
| 63 | void setFlightUnits( FlightUnits units ) { _units = units; } |
|---|
| 64 | FlightUnits getFlightUnits() const { return _units; } |
|---|
| 65 | |
|---|
| 66 | void setValidateOnly( bool validate ) { _validate = validate; } |
|---|
| 67 | bool getValidateOnly() const { return _validate; } |
|---|
| 68 | |
|---|
| 69 | void setTempDir( const std::string& dir ) { _tempDir = dir; } |
|---|
| 70 | std::string getTempDir() const { return _tempDir; } |
|---|
| 71 | |
|---|
| 72 | void setLightingDefault( bool lighting ) { _lightingDefault = lighting; } |
|---|
| 73 | bool getLightingDefault() const { return _lightingDefault; } |
|---|
| 74 | |
|---|
| 75 | void setStripTextureFilePath( bool strip ) { _stripTextureFilePath = strip; } |
|---|
| 76 | bool getStripTextureFilePath() const { return _stripTextureFilePath; } |
|---|
| 77 | |
|---|
| 78 | FltWriteResult & getWriteResult() const { return( wr_ ); } |
|---|
| 79 | |
|---|
| 80 | |
|---|
| 81 | |
|---|
| 82 | void parseOptionsString(); |
|---|
| 83 | |
|---|
| 84 | protected: |
|---|
| 85 | int _version; |
|---|
| 86 | FlightUnits _units; |
|---|
| 87 | bool _validate; |
|---|
| 88 | std::string _tempDir; |
|---|
| 89 | bool _lightingDefault; |
|---|
| 90 | bool _stripTextureFilePath; |
|---|
| 91 | |
|---|
| 92 | mutable FltWriteResult wr_; |
|---|
| 93 | |
|---|
| 94 | static std::string _versionOption; |
|---|
| 95 | static std::string _unitsOption; |
|---|
| 96 | static std::string _validateOption; |
|---|
| 97 | static std::string _tempDirOption; |
|---|
| 98 | static std::string _lightingOption; |
|---|
| 99 | static std::string _stripTextureFilePathOption; |
|---|
| 100 | }; |
|---|
| 101 | |
|---|
| 102 | } |
|---|
| 103 | |
|---|
| 104 | #endif |
|---|