X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Ftrackpart.h;h=34605ca25461201781518d909aa533fd2cc832c5;hb=6109a2122226e1c71e9cc71e4c21036e99e43601;hp=5aa4b0c8b0a487084ba310c37341a21ed34b0c6c;hpb=3e9c210ddc036cd015228504cc0803c909e27f84;p=r2c2.git diff --git a/source/libmarklin/trackpart.h b/source/libmarklin/trackpart.h index 5aa4b0c..34605ca 100644 --- a/source/libmarklin/trackpart.h +++ b/source/libmarklin/trackpart.h @@ -1,7 +1,7 @@ /* $Id$ This file is part of the MSP Märklin suite -Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa +Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ @@ -10,35 +10,32 @@ Distributed under the GPL #include #include "endpoint.h" +#include "geometry.h" namespace Marklin { struct TrackPart { - class Loader: public Msp::DataFile::Loader + class Loader: public Msp::DataFile::BasicLoader { - private: - TrackPart ∂ - public: Loader(TrackPart &); - TrackPart &get_object() { return part; } private: virtual void finish(); - void start(float, float, float); }; - float x, y; - float dir; - float length; - float radius; + Point pos; + float dir; + float length; + float radius; unsigned route; - bool dead_end; + bool dead_end; TrackPart(); - void collect_endpoints(std::vector &); + void collect_endpoints(std::vector &) const; + Point get_point(float) const; }; } // namespace Marklin