X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Flayout.h;h=c5169bd6f07ae4c201ff45e25c68a4b9121b0de3;hb=f8873062b146028c07f55ad625d2767e45133c27;hp=df414f2578b0cc5f85ffe7a88f01f1ffb4e87ad3;hpb=806bc53176e8ed216ba5db95bde5878832332393;p=r2c2.git diff --git a/source/3d/layout.h b/source/3d/layout.h index df414f2..c5169bd 100644 --- a/source/3d/layout.h +++ b/source/3d/layout.h @@ -8,10 +8,12 @@ #include #include "libr2c2/layout.h" #include "catalogue.h" +#include "typemap.h" namespace R2C2 { class Object3D; +class Utility3D; class Layout3D: public sigc::trackable { @@ -22,6 +24,7 @@ private: Layout &layout; Catalogue3D catalogue; ObjectMap objects; + std::set utilities; Msp::GL::InstanceScene scene; Msp::GL::SimpleScene ep_scene; Msp::GL::InstanceScene path_scene; @@ -35,22 +38,27 @@ public: Layout &get_layout() const { return layout; } Catalogue3D &get_catalogue() { return catalogue; } const Catalogue3D &get_catalogue() const { return catalogue; } - void get_bounds(Vector &, Vector &) const; void add(Object3D &); - Object3D &get(Object &) const; + Object3D &get_3d(Object &) const; const ObjectMap &get_all() const { return objects; } void remove(Object3D &); template - T &get(Object &o) const - { return dynamic_cast(get(o)); } + typename TypeMap3D::Type3D &get_3d(T &o) const + { return dynamic_cast::Type3D &>(get_3d(static_cast(o))); } + + void add(Utility3D &); + void remove(Utility3D &); Msp::GL::Scene &get_scene() { return scene; } Msp::GL::Scene &get_endpoint_scene() { return ep_scene; } Msp::GL::Scene &get_path_scene() { return path_scene; } + const Msp::GL::Light &get_sun() const { return sun; } const Msp::GL::Lighting &get_lighting() const { return lighting; } + void tick(); + private: void object_added(Object &); void object_removed(Object &);