]> git.tdb.fi Git - r2c2.git/blob - source/3d/track.h
Add an overlay to display aspects of tracks
[r2c2.git] / source / 3d / track.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_TRACK_H_
9 #define MARKLIN3D_TRACK_H_
10
11 #include <list>
12 #include <msp/gl/color.h>
13 #include <msp/gl/renderable.h>
14 #include <msp/gl/vertexarray.h>
15 #include <msp/gl/vertexarraybuilder.h>
16 #include "libmarklin/track.h"
17 #include "libmarklin/trackpart.h"
18
19 namespace Marklin {
20
21 class Endpoint3D;
22 class Layout3D;
23 class TrackType3D;
24
25 class Track3D: public Msp::GL::Renderable
26 {
27 private:
28         Layout3D &layout;
29         Track &track;
30         const TrackType3D &type;
31         std::vector<Endpoint3D *> endpoints;
32
33 public:
34         Track3D(Layout3D &, Track &);
35         ~Track3D();
36
37         Layout3D &get_layout() const { return layout; }
38         Track &get_track() const { return track; }
39         const TrackType3D &get_type() const { return type; }
40         void set_color(const Msp::GL::Color &) { }
41         void get_bounds(float, Point &, Point &) const;
42
43         virtual void render(const Msp::GL::Tag &) const;
44 };
45
46 } // namespace Marklin
47
48 #endif