00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef SGREADERWRITERBTGOPTIONS_HXX
00018 #define SGREADERWRITERBTGOPTIONS_HXX
00019
00020 #include <osgDB/ReaderWriter>
00021 #include <simgear/scene/tgdb/obj.hxx>
00022 class SGReaderWriterBTGOptions : public osgDB::ReaderWriter::Options {
00023 public:
00024 SGReaderWriterBTGOptions(const std::string& str = std::string()) :
00025 osgDB::ReaderWriter::Options(str),
00026 _matlib(0), _calcLights(true),
00027 _useRandomObjects(false),
00028 _useRandomVegetation(false)
00029 {}
00030
00031 SGReaderWriterBTGOptions(const SGReaderWriterBTGOptions& options,
00032 const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY):
00033 osgDB::ReaderWriter::Options(options, copyop),
00034 _matlib(options._matlib), _calcLights(options._calcLights),
00035 _useRandomObjects(options._useRandomObjects),
00036 _useRandomVegetation(options._useRandomVegetation)
00037 {
00038 }
00039 SGMaterialLib* getMatlib() const { return _matlib; }
00040 void setMatlib (SGMaterialLib* matlib) { _matlib = matlib; }
00041 bool getCalcLights() const { return _calcLights; }
00042 void setCalcLights(bool calcLights) { _calcLights = calcLights; }
00043 bool getUseRandomObjects() const { return _useRandomObjects; }
00044 bool getUseRandomVegetation() const { return _useRandomVegetation; }
00045 void setUseRandomObjects(bool useRandomObjects)
00046 {
00047 _useRandomObjects = useRandomObjects;
00048 }
00049 void setUseRandomVegetation(bool useRandomVegetation)
00050 {
00051 _useRandomVegetation = useRandomVegetation;
00052 }
00053
00054 protected:
00055 virtual ~SGReaderWriterBTGOptions() {}
00056 SGMaterialLib* _matlib;
00057 bool _calcLights;
00058 bool _useRandomObjects;
00059 bool _useRandomVegetation;
00060 };
00061 #endif