7#define __MODELMGR_HXX 1
12#include <simgear/compiler.h>
13#include <simgear/structure/subsystem_mgr.hxx>
19class SGModelPlacement;
45 SGModelPlacement *
model =
nullptr;
67 void update(
double dt)
override;
72 virtual void add_model (SGPropertyNode * node);
107 class Listener :
public SGPropertyChangeListener
111 virtual void childAdded (SGPropertyNode * parent, SGPropertyNode * child);
112 virtual void childRemoved (SGPropertyNode * parent, SGPropertyNode * child);
118 SGPropertyNode_ptr _models;
119 std::unique_ptr<Listener> _listener;
121 std::vector<Instance *> _instances;
Manage a list of user-specified models.
static const char * staticSubsystemClassId()
virtual void add_instance(Instance *instance)
Add an instance of a dynamic model to the manager.
virtual void remove_instance(Instance *instance)
Remove an instance of a dynamic model from the manager.
Instance * findInstanceByNodePath(const std::string &nodePath) const
Finds an instance in the model manager from a given node path in the property tree.
virtual void add_model(SGPropertyNode *node)
void update(double dt) override
A dynamically-placed model using properties.
SGPropertyNode_ptr pitch_deg_node
SGPropertyNode_ptr roll_deg_node
SGPropertyNode_ptr lon_deg_node
SGPropertyNode_ptr heading_deg_node
SGPropertyNode_ptr loaded_node
SGPropertyNode_ptr lat_deg_node
SGPropertyNode_ptr elev_ft_node