X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModel%2Fmodelmgr.hxx;h=0b1cf53435248d91511b2181c75682fd5962b229;hb=68c71d5787f2a0309e35c3e05939950113618cb7;hp=073598fb147bd2a7c8e10922cbda9d5f0016cfb3;hpb=dfc79a80353f95df4aab584c189d764ddae832b6;p=flightgear.git diff --git a/src/Model/modelmgr.hxx b/src/Model/modelmgr.hxx index 073598fb1..0b1cf5343 100644 --- a/src/Model/modelmgr.hxx +++ b/src/Model/modelmgr.hxx @@ -15,10 +15,9 @@ #include // for SG_USING_STD #include -SG_USING_STD(vector); +using std::vector; // Don't pull in headers, since we don't need them here. -class ssgSelector; class SGPropertyNode; class SGModelPlacement; @@ -48,12 +47,14 @@ public: Instance (); virtual ~Instance (); SGModelPlacement * model; + SGPropertyNode_ptr node; SGPropertyNode_ptr lon_deg_node; SGPropertyNode_ptr lat_deg_node; SGPropertyNode_ptr elev_ft_node; SGPropertyNode_ptr roll_deg_node; SGPropertyNode_ptr pitch_deg_node; SGPropertyNode_ptr heading_deg_node; + bool shadow; }; FGModelMgr (); @@ -86,13 +87,26 @@ public: */ virtual void remove_instance (Instance * instance); - virtual void draw (); private: + /** + * Listener class that adds models at runtime. + */ + class Listener : public SGPropertyChangeListener + { + public: + Listener(FGModelMgr *mgr) : _mgr(mgr) {} + virtual void childAdded (SGPropertyNode * parent, SGPropertyNode * child); + virtual void childRemoved (SGPropertyNode * parent, SGPropertyNode * child); - vector _instances; + private: + FGModelMgr * _mgr; + }; + + SGPropertyNode_ptr _models; + Listener * _listener; - ssgSharedPtr _selector; + vector _instances; };