]> git.tdb.fi Git - r2c2.git/blob - source/3d/layout.h
21686de5f9c8bbc4a19e1fdc21acffd2276b4267
[r2c2.git] / source / 3d / layout.h
1 /* $Id$
2
3 This file is part of the MSP Märklin suite
4 Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef MARKLIN3D_LAYOUT_H_
9 #define MARKLIN3D_LAYOUT_H_
10
11 #include "libmarklin/layout.h"
12 #include "catalogue.h"
13 #include "track.h"
14
15 namespace Marklin {
16
17 class Layout3D
18 {
19 private:
20         Layout &layout;
21         Catalogue3D catalogue;
22         std::list<Track3D *> tracks;
23         unsigned quality;
24
25 public:
26         Layout3D(Layout &);
27         ~Layout3D();
28
29         const Catalogue3D &get_catalogue() const { return catalogue; }
30         void set_quality(unsigned);
31         const std::list<Track3D *> &get_tracks() const { return tracks; }
32         void render(bool =false) const;
33         Track3D &get_track(const Track &) const;
34         Track3D *pick_track(float, float, float) const;
35 private:
36         void track_added(Track &);
37         void track_removed(Track &);
38 };
39
40 } // namespace Marklin
41
42 #endif
43