]> git.mxchange.org Git - simgear.git/blobdiff - simgear/scene/tgdb/SGReaderWriterBTG.cxx
Replace SG_USE_STD() by using std::
[simgear.git] / simgear / scene / tgdb / SGReaderWriterBTG.cxx
index 4735f0e3035a4228a7a2fa95ce101898313ca75b..1ab674fd1664c79b0db2afeb0cff22f855cddf22 100644 (file)
 
 using namespace simgear;
 
+// SGReaderWriterBTGOptions static value here to avoid an additional,
+// tiny source file.
+
+std::string SGReaderWriterBTGOptions::defaultOptions;
+
 const char* SGReaderWriterBTG::className() const
 {
     return "BTG Database reader";
@@ -54,15 +59,18 @@ SGReaderWriterBTG::readNode(const std::string& fileName,
     SGMaterialLib* matlib = 0;
     bool calcLights = false;
     bool useRandomObjects = false;
+    bool useRandomVegetation = false;
     const SGReaderWriterBTGOptions* btgOptions
         = dynamic_cast<const SGReaderWriterBTGOptions*>(options);
     if (btgOptions) {
         matlib = btgOptions->getMatlib();
         calcLights = btgOptions->getCalcLights();
         useRandomObjects = btgOptions->getUseRandomObjects();
+        useRandomVegetation = btgOptions->getUseRandomVegetation();
     }
     osg::Node* result = SGLoadBTG(fileName, matlib, calcLights,
-                                  useRandomObjects);
+                                  useRandomObjects,
+                                  useRandomVegetation);
     if (result)
         return result;
     else
@@ -71,5 +79,5 @@ SGReaderWriterBTG::readNode(const std::string& fileName,
 
 namespace
 {
-ModelRegistryCallbackProxy<OSGFileCallback> g_btgCallbackProxy("btg");
+ModelRegistryCallbackProxy<LoadOnlyCallback> g_btgCallbackProxy("btg");
 }