X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Ftrack.h;h=eaf8de217c8c267bf7e2d831da8002aab4a5c878;hb=2bb6ce8ada216c0b2caa48f4639d03f2c581098e;hp=008b81dd4a169c46429e17f4f972f7cb14322eac;hpb=e5cd9e4fbc577036a0385c985b6b65df8218d0a2;p=r2c2.git diff --git a/source/libmarklin/track.h b/source/libmarklin/track.h index 008b81d..eaf8de2 100644 --- a/source/libmarklin/track.h +++ b/source/libmarklin/track.h @@ -16,6 +16,7 @@ Distributed under the GPL namespace Marklin { +class Block; class Layout; class TrackType; @@ -35,6 +36,7 @@ public: private: Layout &layout; const TrackType &type; + Block *block; Point pos; float rot; float slope; @@ -53,6 +55,8 @@ public: Layout &get_layout() const { return layout; } const TrackType &get_type() const { return type; } + void set_block(Block *); + Block &get_block() const; void set_position(const Point &); void set_rotation(float); void set_slope(float); @@ -70,7 +74,7 @@ public: void set_active_path(unsigned); unsigned get_active_path() const { return active_path; } - int get_endpoint_by_link(const Track &) const; + int get_endpoint_by_link(Track &) const; Point get_endpoint_position(unsigned) const; float get_endpoint_direction(unsigned) const; bool snap_to(Track &, bool); @@ -79,7 +83,6 @@ public: void break_links(); const std::vector &get_links() const { return links; } Track *get_link(unsigned) const; - unsigned traverse(unsigned, unsigned) const; TrackPoint get_point(unsigned, unsigned, float) const; TrackPoint get_point(unsigned, float) const;