X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2F3d%2Ftrack.h;h=e55dc21245f146920115c4719acc63267bf54142;hb=f4ffb776aa0d4f51c058d27fb0f51449c05302c3;hp=cf994dd4526fb38a7b902040b130b1567712051a;hpb=47341c72a70e6cf9d8e963705a50197bbc20a87d;p=r2c2.git diff --git a/source/3d/track.h b/source/3d/track.h index cf994dd..e55dc21 100644 --- a/source/3d/track.h +++ b/source/3d/track.h @@ -9,27 +9,28 @@ Distributed under the GPL #define MARKLIN3D_TRACK_H_ #include -#include #include #include #include #include "libmarklin/track.h" #include "libmarklin/trackpart.h" +#include "object.h" namespace Marklin { class Endpoint3D; class Layout3D; +class Path3D; class TrackType3D; -class Track3D: public Msp::GL::Renderable +class Track3D: public Object3D, public Msp::GL::Renderable { private: Layout3D &layout; Track &track; const TrackType3D &type; std::vector endpoints; - Msp::GL::Color color; + Path3D *path; public: Track3D(Layout3D &, Track &); @@ -37,9 +38,14 @@ public: Layout3D &get_layout() const { return layout; } Track &get_track() const { return track; } - void set_color(const Msp::GL::Color &); + const TrackType3D &get_type() const { return type; } void get_bounds(float, Point &, Point &) const; + Path3D &get_path() { return *path; } + virtual Point get_node() const; + virtual bool is_visible() const { return true; } + + void apply_matrix() const; virtual void render(const Msp::GL::Tag &) const; };