]> git.mxchange.org Git - flightgear.git/blob - src/Model/model_panel.cxx
Improve transponder instrumentation: new version
[flightgear.git] / src / Model / model_panel.cxx
1 // model.cxx - manage a 3D aircraft model.
2 // Written by David Megginson, started 2002.
3 //
4 // This file is in the Public Domain, and comes with no warranty.
5
6 #ifdef HAVE_CONFIG_H
7 #  include <config.h>
8 #endif
9
10 #include <simgear/compiler.h>
11
12 #include <osg/Geode>
13
14 #include <simgear/props/props.hxx>
15 #include <simgear/scene/model/modellib.hxx>
16 #include <simgear/scene/util/SGNodeMasks.hxx>
17
18 #include "panelnode.hxx"
19 #include "model_panel.hxx"
20
21 using std::vector;
22
23 using namespace simgear;
24 \f
25 ////////////////////////////////////////////////////////////////////////
26 // Global functions.
27 ////////////////////////////////////////////////////////////////////////
28
29 osg::Node *
30 fgLoad3DModelPanel(const std::string &path, SGPropertyNode *prop_root)
31 {
32     bool loadPanels = true;
33     osg::Node* node = SGModelLib::loadModel(path, prop_root, NULL, loadPanels);
34     if (node)
35         node->setNodeMask(~SG_NODEMASK_TERRAIN_BIT);
36     return node;
37 }
38
39
40 // end of model_panel.cxx