]> git.mxchange.org Git - simgear.git/blob - simgear/scene/tgdb/SGReaderWriterBTGOptions.hxx
OSG Reader and Writer for BTG files
[simgear.git] / simgear / scene / tgdb / SGReaderWriterBTGOptions.hxx
1 // Copyright (C) 2007 Tim Moore timoore@redhat.com
2 //
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License as
5 // published by the Free Software Foundation; either version 2 of the
6 // License, or (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful, but
9 // WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
16 //
17 #ifndef SGREADERWRITERBTGOPTIONS_HXX
18 #define SGREADERWRITERBTGOPTIONS_HXX 1
19
20 #include <osgDB/ReaderWriter>
21 #include <simgear/scene/tgdb/obj.hxx>
22 class SGReaderWriterBTGOptions : public osgDB::ReaderWriter::Options {
23 public:
24     SGReaderWriterBTGOptions() {}
25     SGReaderWriterBTGOptions(const std::string& str):
26         osgDB::ReaderWriter::Options(str),
27         _matlib(0), _calcLights(false), _useRandomObjects(false)
28     {}
29     
30     SGReaderWriterBTGOptions(const SGReaderWriterBTGOptions& options,
31             const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
32         osgDB::ReaderWriter::Options(options, copyop),
33         _matlib(options._matlib), _calcLights(options._calcLights),
34         _useRandomObjects(options._useRandomObjects)
35     {
36     }
37     SGMaterialLib* getMatlib() const { return _matlib; }
38     void setMatlib (SGMaterialLib* matlib) { _matlib = matlib; }
39     bool getCalcLights() const { return _calcLights; }
40     void setCalcLights(bool calcLights)  { _calcLights = calcLights; }
41     bool getUseRandomObjects() const { return _useRandomObjects; }
42     void setUseRandomObjects(bool useRandomObjects)
43     {
44         _useRandomObjects = useRandomObjects;
45     }
46 protected:
47     virtual ~SGReaderWriterBTGOptions() {}
48     SGMaterialLib* _matlib;
49     bool _calcLights;
50     bool _useRandomObjects;
51
52 };
53 #endif