X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Flayout.h;h=6dbdb7bcb62ebd760c970a35c7b0a376d0d4b289;hb=495c54e187ddbb7514c983e1829a69d82ccad5f3;hp=54269bc8b42e1d43e32bb56a9e41591a5d313a89;hpb=f4ffb776aa0d4f51c058d27fb0f51449c05302c3;p=r2c2.git diff --git a/source/3d/layout.h b/source/3d/layout.h index 54269bc..6dbdb7b 100644 --- a/source/3d/layout.h +++ b/source/3d/layout.h @@ -1,20 +1,24 @@ /* $Id$ -This file is part of the MSP Märklin suite -Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa +This file is part of R²C² +Copyright © 2006-2011 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ -#ifndef MARKLIN3D_LAYOUT_H_ -#define MARKLIN3D_LAYOUT_H_ +#ifndef R2C2_3D_LAYOUT_H_ +#define R2C2_3D_LAYOUT_H_ #include -#include -#include "libmarklin/layout.h" +#include +#include +#include +#include +#include "libr2c2/layout.h" #include "catalogue.h" -namespace Marklin { +namespace R2C2 { +class Object3D; class Track3D; class Vehicle3D; @@ -29,21 +33,24 @@ private: Catalogue3D catalogue; TrackMap tracks; VehicleMap vehicles; - Msp::GL::Scene scene; - Msp::GL::Scene ep_scene; - Msp::GL::Scene path_scene; + 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 &); @@ -52,6 +59,7 @@ 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::Lighting &get_lighting() const { return lighting; } private: void track_added(Track &); @@ -60,7 +68,7 @@ private: void vehicle_removed(Vehicle &); }; -} // namespace Marklin +} // namespace R2C2 #endif