]> git.mxchange.org Git - flightgear.git/blobdiff - src/Model/model_panel.cxx
Don't make the SoundManager a memebr of the subsystem manager; It needs to be initial...
[flightgear.git] / src / Model / model_panel.cxx
index ef98544793cc2d39c2c844fc3766baf400d9d952..eef538cb0a41c7b809e7e3a2078afdf3066c3090 100644 (file)
 #include <osg/Geode>
 
 #include <simgear/props/props.hxx>
-#include <simgear/scene/model/model.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"
 
-SG_USING_STD(vector);
+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;
+    osg::Geode* geode = new osg::Geode;
+    geode->addDrawable(new FGPanelNode(n));
+    return geode;
 }
 
 \f
@@ -35,14 +37,12 @@ osg::Node* load_panel(SGPropertyNode *n)
 ////////////////////////////////////////////////////////////////////////
 
 osg::Node *
-fgLoad3DModelPanel( const string &fg_root, const string &path,
-                    SGPropertyNode *prop_root,
-                    double sim_time_sec, const SGPath& livery )
+fgLoad3DModelPanel(const string &path, SGPropertyNode *prop_root)
 {
-  osg::Node* node = sgLoad3DModel( fg_root, path, prop_root, sim_time_sec,
-                                   load_panel, 0, livery );
-  node->setNodeMask(~SG_NODEMASK_TERRAIN_BIT);
-  return node;
+    osg::Node* node = SGModelLib::loadModel(path, prop_root, load_panel);
+    if (node)
+        node->setNodeMask(~SG_NODEMASK_TERRAIN_BIT);
+    return node;
 }