3 This file is part of the MSP Märklin suite
4 Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
8 #ifndef MARKLIN3D_TRACK_H_
9 #define MARKLIN3D_TRACK_H_
12 #include <msp/gl/renderable.h>
13 #include <msp/gl/vertexarray.h>
14 #include <msp/gl/vertexarraybuilder.h>
15 #include "libmarklin/track.h"
16 #include "libmarklin/trackpart.h"
26 class Track3D: public Object3D, public Msp::GL::Renderable
31 const TrackType3D &type;
32 std::vector<Endpoint3D *> endpoints;
36 Track3D(Layout3D &, Track &);
39 Layout3D &get_layout() const { return layout; }
40 Track &get_track() const { return track; }
41 const TrackType3D &get_type() const { return type; }
42 void get_bounds(float, Point &, Point &) const;
43 Path3D &get_path() { return *path; }
45 virtual Point get_node() const;
46 virtual bool is_visible() const { return true; }
48 void apply_matrix() const;
49 virtual void render(const Msp::GL::Tag &) const;
52 } // namespace Marklin