]> git.tdb.fi Git - r2c2.git/blobdiff - source/3d/layout.h
Follow the same path until another is significantly better
[r2c2.git] / source / 3d / layout.h
index d5aad2634fbbe2343f4f2d38027347b531957f2b..c5169bd6f07ae4c201ff45e25c68a4b9121b0de3 100644 (file)
@@ -8,6 +8,7 @@
 #include <msp/gl/simplescene.h>
 #include "libr2c2/layout.h"
 #include "catalogue.h"
+#include "typemap.h"
 
 namespace R2C2 {
 
@@ -37,16 +38,15 @@ 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<typename T>
-       T &get(Object &o) const
-       { return dynamic_cast<T &>(get(o)); }
+       typename TypeMap3D<T>::Type3D &get_3d(T &o) const
+       { return dynamic_cast<typename TypeMap3D<T>::Type3D &>(get_3d(static_cast<Object &>(o))); }
 
        void add(Utility3D &);
        void remove(Utility3D &);
@@ -54,8 +54,11 @@ public:
        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 &);