]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/model_panel.cxx
Improve transponder instrumentation: new version
[flightgear.git] / src / Model / model_panel.cxx
index 8a581d2f49deedbb35107220dfce1d9f5ab272a6..ac2ab88b1c3bbd9194f2db62a32e079586bf4b22 100644 (file)
@@ -14,7 +14,6 @@
 #include <simgear/props/props.hxx>
 #include <simgear/scene/model/modellib.hxx>
 #include <simgear/scene/util/SGNodeMasks.hxx>
-#include <simgear/Math/SGMath.hxx>
 
 #include "panelnode.hxx"
 #include "model_panel.hxx"
 using std::vector;
 
 using namespace simgear;
-
-static
-osg::Node* load_panel(SGPropertyNode *n)
-{
-    osg::Geode* geode = new osg::Geode;
-    geode->addDrawable(new FGPanelNode(n));
-    return geode;
-}
-
 \f
 ////////////////////////////////////////////////////////////////////////
 // Global functions.
 ////////////////////////////////////////////////////////////////////////
 
 osg::Node *
-fgLoad3DModelPanel(const string &path, SGPropertyNode *prop_root)
+fgLoad3DModelPanel(const std::string &path, SGPropertyNode *prop_root)
 {
-    osg::Node* node = SGModelLib::loadModel(path, prop_root, load_panel);
+    bool loadPanels = true;
+    osg::Node* node = SGModelLib::loadModel(path, prop_root, NULL, loadPanels);
     if (node)
         node->setNodeMask(~SG_NODEMASK_TERRAIN_BIT);
     return node;