X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Ftrack.h;h=f3d89815b72cb2a0a9338d583f02c2f4806396cf;hb=e9653dffd0026fb3c02c91a4c0feca688a86c721;hp=34d484c9f67bc487b3fc15b4afcf9778b6dd0be7;hpb=9ddcd066e37e4c72685817c042c30897786ece05;p=r2c2.git diff --git a/source/libmarklin/track.h b/source/libmarklin/track.h index 34d484c..f3d8981 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);