17#ifndef NASAL_MODEL_DATA_HXX
18#define NASAL_MODEL_DATA_HXX
20#include <simgear/nasal/nasal.h>
21#include <simgear/scene/model/modellib.hxx>
34 const std::string& path,
64 inline static std::mutex _loaded_models_mutex;
65 inline static unsigned int _max_module_id = 0;
68 std::string _module, _path;
69 SGPropertyNode_ptr _root, _prop;
70 SGConstPropertyNode_ptr _load, _unload;
71 osg::ref_ptr<osg::Node> _branch;
72 unsigned int _module_id;
SGSharedPtr< FGNasalModelData > FGNasalModelDataRef
std::list< FGNasalModelData * > FGNasalModelDataList
FGNasalModelDataProxy(SGPropertyNode *root=0)
void modelLoaded(const std::string &path, SGPropertyNode *prop, osg::Node *branch)
FGNasalModelDataRef _data
ErrorContext getErrorContext() const override
virtual FGNasalModelDataProxy * clone() const
Nasal model data container.
static FGNasalModelData * getByModuleId(unsigned int id)
Get FGNasalModelData for model with the given module id.
void unload()
Unload hook.
FGNasalModelData(SGPropertyNode *root, const std::string &path, SGPropertyNode *prop, SGPropertyNode *load, SGPropertyNode *unload, osg::Node *branch)
Constructor to be run in an arbitrary thread.
osg::Node * getNode()
Get osg scenegraph node of model.