X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Ftracktype.h;h=902a2f6ddd561df38ecb1c84dbdfbb0fb3d2c79b;hb=45ec6f645ff2c303700711e96421c75acf33db1a;hp=582f77ae25b1a506bbd49b28c6fec8cfea3f57e7;hpb=e990eb02d42cc4b9ff679b947a6911f79472f8f5;p=r2c2.git diff --git a/source/libmarklin/tracktype.h b/source/libmarklin/tracktype.h index 582f77a..902a2f6 100644 --- a/source/libmarklin/tracktype.h +++ b/source/libmarklin/tracktype.h @@ -9,7 +9,7 @@ Distributed under the GPL #define LIBMARKLIN_TRACKTYPE_H_ #include -#include "endpoint.h" +#include "geometry.h" #include "trackpart.h" namespace Marklin { @@ -17,6 +17,15 @@ namespace Marklin { class TrackType { public: + struct Endpoint + { + Point pos; + float dir; // Direction outwards from the endpoint + unsigned paths; + + Endpoint(float, float, float, unsigned); + }; + class Loader: public Msp::DataFile::BasicLoader { public: @@ -44,6 +53,7 @@ public: unsigned get_paths() const; unsigned get_n_paths() const; bool is_turnout() const; + bool is_dead_end() const; bool is_double_address() const { return double_address; } const std::vector &get_parts() const { return parts; } const std::vector &get_endpoints() const { return endpoints; }