X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Flayout.h;h=1e189bd1ce0eedd88a0541672e9d58f60e6f6efc;hb=a993f204ba2cd282637814caec3ab115040fc0cc;hp=d1ec7c49f457b472b52adc1359f776ac8a156423;hpb=949b13aae247fa53579ec1cda9142ccc8755acde;p=r2c2.git diff --git a/source/3d/layout.h b/source/3d/layout.h index d1ec7c4..1e189bd 100644 --- a/source/3d/layout.h +++ b/source/3d/layout.h @@ -1,21 +1,17 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #ifndef R2C2_3D_LAYOUT_H_ #define R2C2_3D_LAYOUT_H_ #include #include +#include +#include #include #include "libr2c2/layout.h" #include "catalogue.h" namespace R2C2 { +class Signal3D; class Track3D; class Vehicle3D; @@ -24,41 +20,53 @@ class Layout3D: public sigc::trackable public: typedef std::map TrackMap; typedef std::map VehicleMap; + typedef std::map SignalMap; private: Layout &layout; Catalogue3D catalogue; TrackMap tracks; VehicleMap vehicles; + SignalMap signals; Msp::GL::InstanceScene scene; Msp::GL::SimpleScene ep_scene; Msp::GL::InstanceScene path_scene; + Msp::GL::Light sun; + Msp::GL::Lighting lighting; public: Layout3D(Layout &); ~Layout3D(); + Layout &get_layout() const { return layout; } const Catalogue3D &get_catalogue() const { return catalogue; } + void get_bounds(Vector &, Vector &) const; void add_track(Track3D &); void remove_track(Track3D &); const TrackMap &get_tracks() const { return tracks; } Track3D &get_track(Track &) const; - Track3D *pick_track(float, float, float) const; void add_vehicle(Vehicle3D &); void remove_vehicle(Vehicle3D &); Vehicle3D &get_vehicle(Vehicle &) const; + void add_signal(Signal3D &); + void remove_signal(Signal3D &); + Signal3D &get_signal(Signal &) const; + 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::Lighting &get_lighting() const { return lighting; } private: void track_added(Track &); void track_removed(Track &); void vehicle_added(Vehicle &); void vehicle_removed(Vehicle &); + void signal_added(Signal &); + void signal_removed(Signal &); }; } // namespace R2C2