1 // model.cxx - manage a 3D aircraft model.
2 // Written by David Megginson, started 2002.
4 // This file is in the Public Domain, and comes with no warranty.
10 #include <simgear/compiler.h>
14 #include <simgear/props/props.hxx>
15 #include <simgear/scene/model/modellib.hxx>
16 #include <simgear/scene/util/SGNodeMasks.hxx>
18 #include "panelnode.hxx"
20 #include "model_panel.hxx"
24 using namespace simgear;
27 osg::Node* load_panel(SGPropertyNode *n)
29 osg::Geode* geode = new osg::Geode;
30 geode->addDrawable(new FGPanelNode(n));
35 ////////////////////////////////////////////////////////////////////////
37 ////////////////////////////////////////////////////////////////////////
40 fgLoad3DModelPanel(const string &path, SGPropertyNode *prop_root)
42 osg::Node* node = SGModelLib::loadModel(path, prop_root, load_panel);
43 node->setNodeMask(~SG_NODEMASK_TERRAIN_BIT);
48 // end of model_panel.cxx