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<Object *, Object3D *> ObjectMap;
25 Catalogue3D catalogue;
27 std::set<Utility3D *> utilities;
28 Msp::GL::InstanceScene scene;
29 Msp::GL::SimpleScene ep_scene;
30 Msp::GL::InstanceScene path_scene;
32 Msp::GL::Lighting lighting;
38 Layout &get_layout() const { return layout; }
39 Catalogue3D &get_catalogue() { return catalogue; }
40 const Catalogue3D &get_catalogue() const { return catalogue; }
43 Object3D &get_3d(Object &) const;
44 const ObjectMap &get_all() const { return objects; }
45 void remove(Object3D &);
48 typename TypeMap3D<T>::Type3D &get_3d(T &o) const
49 { return dynamic_cast<typename TypeMap3D<T>::Type3D &>(get_3d(static_cast<Object &>(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::Light &get_sun() const { return sun; }
58 const Msp::GL::Lighting &get_lighting() const { return lighting; }
63 void object_added(Object &);
64 void object_removed(Object &);