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"
17 class Layout3D: public sigc::trackable
20 typedef std::map<Object *, Object3D *> ObjectMap;
24 Catalogue3D catalogue;
26 std::set<Utility3D *> utilities;
27 Msp::GL::InstanceScene scene;
28 Msp::GL::SimpleScene ep_scene;
29 Msp::GL::InstanceScene path_scene;
31 Msp::GL::Lighting lighting;
37 Layout &get_layout() const { return layout; }
38 Catalogue3D &get_catalogue() { return catalogue; }
39 const Catalogue3D &get_catalogue() const { return catalogue; }
40 void get_bounds(Vector &, Vector &) const;
43 Object3D &get(Object &) const;
44 const ObjectMap &get_all() const { return objects; }
45 void remove(Object3D &);
48 T &get(Object &o) const
49 { return dynamic_cast<T &>(get(o)); }
51 void add(Utility3D &);
52 void remove(Utility3D &);
54 Msp::GL::Scene &get_scene() { return scene; }
55 Msp::GL::Scene &get_endpoint_scene() { return ep_scene; }
56 Msp::GL::Scene &get_path_scene() { return path_scene; }
57 const Msp::GL::Lighting &get_lighting() const { return lighting; }
60 void object_added(Object &);
61 void object_removed(Object &);