]> git.tdb.fi Git - r2c2.git/blob - source/3d/track.h
Fix a problem with estimated remaining distance in route planner
[r2c2.git] / source / 3d / track.h
1 #ifndef R2C2_3D_TRACK_H_
2 #define R2C2_3D_TRACK_H_
3
4 #include <list>
5 #include <sigc++/trackable.h>
6 #include <msp/gl/matrix.h>
7 #include <msp/gl/objectinstance.h>
8 #include "libr2c2/track.h"
9 #include "libr2c2/trackpart.h"
10 #include "object.h"
11
12 namespace R2C2 {
13
14 class Endpoint3D;
15 class Path3D;
16 class TrackType3D;
17
18 class Track3D: public Object3D, public Msp::GL::ObjectInstance
19 {
20 private:
21         Track &track;
22         const TrackType3D &type;
23         std::vector<Endpoint3D *> endpoints;
24
25 public:
26         Track3D(Layout3D &, Track &);
27         ~Track3D();
28
29         Layout3D &get_layout() const { return layout; }
30         Track &get_track() const { return track; }
31         const TrackType3D &get_type() const { return type; }
32
33         virtual Vector get_node() const;
34         virtual bool is_visible() const { return true; }
35
36         virtual void setup_render(Msp::GL::Renderer &, const Msp::GL::Tag &) const;
37 private:
38         void link_changed(unsigned, Track *);
39 };
40
41 } // namespace R2C2
42
43 #endif