1 // Copyright (C) 2007 Tim Moore timoore@redhat.com
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.
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.
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.
17 #ifndef SGREADERWRITERBTGOPTIONS_HXX
18 #define SGREADERWRITERBTGOPTIONS_HXX
20 #include <osgDB/ReaderWriter>
21 #include <simgear/scene/tgdb/obj.hxx>
22 class SGReaderWriterBTGOptions : public osgDB::ReaderWriter::Options {
24 META_Object(simgear,SGReaderWriterBTGOptions);
25 SGReaderWriterBTGOptions(const std::string& str = std::string()) :
26 osgDB::ReaderWriter::Options(str),
27 _matlib(0), _calcLights(true),
28 _useRandomObjects(false),
29 _useRandomVegetation(false)
32 SGReaderWriterBTGOptions(const SGReaderWriterBTGOptions& options,
33 const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
34 osgDB::ReaderWriter::Options(options, copyop),
35 _matlib(options._matlib), _calcLights(options._calcLights),
36 _useRandomObjects(options._useRandomObjects),
37 _useRandomVegetation(options._useRandomVegetation)
40 SGMaterialLib* getMatlib() const { return _matlib; }
41 void setMatlib (SGMaterialLib* matlib) { _matlib = matlib; }
42 bool getCalcLights() const { return _calcLights; }
43 void setCalcLights(bool calcLights) { _calcLights = calcLights; }
44 bool getUseRandomObjects() const { return _useRandomObjects; }
45 bool getUseRandomVegetation() const { return _useRandomVegetation; }
46 void setUseRandomObjects(bool useRandomObjects)
48 _useRandomObjects = useRandomObjects;
50 void setUseRandomVegetation(bool useRandomVegetation)
52 _useRandomVegetation = useRandomVegetation;
56 virtual ~SGReaderWriterBTGOptions() {}
57 SGMaterialLib* _matlib;
59 bool _useRandomObjects;
60 bool _useRandomVegetation;