#include <osgDB/FileNameUtils>
#include <osgDB/Registry>
+
+#include <simgear/scene/model/ModelRegistry.hxx>
+
#include "SGReaderWriterBTGOptions.hxx"
#include "SGReaderWriterBTG.hxx"
#include "obj.hxx"
+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";
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
return ReadResult::FILE_NOT_HANDLED;
}
-
+namespace
+{
+ModelRegistryCallbackProxy<LoadOnlyCallback> g_btgCallbackProxy("btg");
+}