FlightGear next
|
Manage a list of user-specified models. More...
#include <modelmgr.hxx>
Inherits SGSubsystem.
Classes | |
struct | Instance |
A dynamically-placed model using properties. More... | |
Public Member Functions | |
FGModelMgr () | |
virtual | ~FGModelMgr () |
void | bind () override |
void | init () override |
void | shutdown () override |
void | unbind () override |
void | update (double dt) override |
virtual void | add_model (SGPropertyNode *node) |
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. | |
Static Public Member Functions | |
static const char * | staticSubsystemClassId () |
Manage a list of user-specified models.
Definition at line 25 of file modelmgr.hxx.
FGModelMgr::FGModelMgr | ( | ) |
Definition at line 86 of file modelmgr.cxx.
|
virtual |
Definition at line 90 of file modelmgr.cxx.
|
virtual |
Add an instance of a dynamic model to the manager.
NOTE: pointer ownership is transferred to the model manager!
The caller is responsible for setting up the Instance structure as required. The model manager will continuously update the location and orientation of the model based on the current values of the properties.
Definition at line 310 of file modelmgr.cxx.
|
virtual |
Definition at line 121 of file modelmgr.cxx.
|
override |
Definition at line 232 of file modelmgr.cxx.
FGModelMgr::Instance * FGModelMgr::findInstanceByNodePath | ( | const std::string & | nodePath | ) | const |
Finds an instance in the model manager from a given node path in the property tree.
A possible path could be "models/model[0]"
NOTE: the manager will delete the instance as well.
Definition at line 329 of file modelmgr.cxx.
|
override |
Definition at line 95 of file modelmgr.cxx.
|
virtual |
Remove an instance of a dynamic model from the manager.
NOTE: the manager will delete the instance as well.
Definition at line 316 of file modelmgr.cxx.
|
override |
Definition at line 103 of file modelmgr.cxx.
|
inlinestatic |
Definition at line 70 of file modelmgr.hxx.
|
override |
Definition at line 241 of file modelmgr.cxx.
|
override |
Definition at line 264 of file modelmgr.cxx.