root/OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/ExportOptions.h @ 13041

Revision 13041, 2.8 kB (checked in by robert, 2 years ago)

Ran script to remove trailing spaces and tabs

  • Property svn:eol-style set to native
Line 
1/*
2 * This library is open source and may be redistributed and/or modified under
3 * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or (at
4 * your option) any later version. The full license is in the LICENSE file
5 * included with this distribution, and on the openscenegraph.org website.
6 *
7 * This library is distributed in the hope that it will be useful, but
8 * WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * OpenSceneGraph Public License for more details.
11*/
12
13//
14// Copyright(c) 2008 Skew Matrix Software LLC.
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
32namespace flt
33{
34
35
36/*!
37   Options class for controlling export behavior.
38   Features a parser for the Option string as well as getter
39   methods for supported options.
40 */
41class ExportOptions : public osgDB::Options
42{
43public:
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    // Parse the OptionString and override values based on
81    //   what was set in the OptionString.
82    void parseOptionsString();
83
84protected:
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 /* __OPEN_FLIGHT_WRITER_H__ */
Note: See TracBrowser for help on using the browser.