X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Flayout.h;h=2e56ea63bd0195ea8ede83b3219f6f8dde1392f3;hb=bc8ac89bbe774bb133b758416182aa18e5e0a5a5;hp=208ddacacba28254f267b6d121e44190f0f15d46;hpb=449fb5de95ddb2ac9da4bd72a1c12150505d5549;p=r2c2.git diff --git a/source/3d/layout.h b/source/3d/layout.h index 208ddac..2e56ea6 100644 --- a/source/3d/layout.h +++ b/source/3d/layout.h @@ -1,15 +1,18 @@ /* $Id$ This file is part of the MSP Märklin suite -Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa +Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ #ifndef MARKLIN3D_LAYOUT_H_ #define MARKLIN3D_LAYOUT_H_ +#include #include "libmarklin/layout.h" +#include "catalogue.h" #include "track.h" +#include "train.h" namespace Marklin { @@ -17,21 +20,36 @@ class Layout3D { private: Layout &layout; + Catalogue3D catalogue; std::list tracks; - unsigned quality; + std::list trains; + Msp::GL::Scene scene; + Msp::GL::Scene ep_scene; public: Layout3D(Layout &); ~Layout3D(); - void set_quality(unsigned); + const Catalogue3D &get_catalogue() const { return catalogue; } + + void add_track(Track3D &); + void remove_track(Track3D &); const std::list &get_tracks() const { return tracks; } - void render(bool =false) const; Track3D &get_track(const Track &) const; Track3D *pick_track(float, float, float) const; + + void set_traffic_manager(TrafficManager &); + void add_train(Train3D &); + void remove_train(Train3D &); + Train3D &get_train(const Train &) const; + + Msp::GL::Scene &get_scene() { return scene; } + Msp::GL::Scene &get_endpoint_scene() { return ep_scene; } + private: void track_added(Track &); void track_removed(Track &); + void train_added(Train &); }; } // namespace Marklin