1 #ifndef R2C2_3D_LAYOUT_H_
2 #define R2C2_3D_LAYOUT_H_
4 #include <sigc++/trackable.h>
5 #include <msp/gl/instancescene.h>
6 #include <msp/gl/light.h>
7 #include <msp/gl/lighting.h>
8 #include <msp/gl/simplescene.h>
9 #include "libr2c2/layout.h"
10 #include "catalogue.h"
18 class Layout3D: public sigc::trackable
21 typedef std::map<Track *, Track3D *> TrackMap;
22 typedef std::map<Vehicle *, Vehicle3D *> VehicleMap;
26 Catalogue3D catalogue;
29 Msp::GL::InstanceScene scene;
30 Msp::GL::SimpleScene ep_scene;
31 Msp::GL::InstanceScene path_scene;
33 Msp::GL::Lighting lighting;
39 Layout &get_layout() const { return layout; }
40 const Catalogue3D &get_catalogue() const { return catalogue; }
41 void get_bounds(Vector &, Vector &) const;
43 void add_track(Track3D &);
44 void remove_track(Track3D &);
45 const TrackMap &get_tracks() const { return tracks; }
46 Track3D &get_track(Track &) const;
48 void add_vehicle(Vehicle3D &);
49 void remove_vehicle(Vehicle3D &);
50 Vehicle3D &get_vehicle(Vehicle &) const;
52 Msp::GL::Scene &get_scene() { return scene; }
53 Msp::GL::Scene &get_endpoint_scene() { return ep_scene; }
54 Msp::GL::Scene &get_path_scene() { return path_scene; }
55 const Msp::GL::Lighting &get_lighting() const { return lighting; }
58 void track_added(Track &);
59 void track_removed(Track &);
60 void vehicle_added(Vehicle &);
61 void vehicle_removed(Vehicle &);