X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibmarklin%2Ftrackpart.h;h=0411d72ab3ee2d649851656dea18c6efd2dcb8a7;hb=02c9a9779954d993cb73fe5f7a72b0847e87f633;hp=092e586999bc75a26a7ba4c3f354157ac7509912;hpb=52cbe8d99669f843f8f75c51128e2748584dd03a;p=r2c2.git diff --git a/source/libmarklin/trackpart.h b/source/libmarklin/trackpart.h index 092e586..0411d72 100644 --- a/source/libmarklin/trackpart.h +++ b/source/libmarklin/trackpart.h @@ -1,36 +1,41 @@ +/* $Id$ + +This file is part of the MSP Märklin suite +Copyright © 2006-2009 Mikkosoft Productions, Mikko Rasa +Distributed under the GPL +*/ + #ifndef MARKLIN_TRACKPART_H_ #define MARKLIN_TRACKPART_H_ #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; - unsigned route; - bool dead_end; + Point pos; + float dir; + float length; + float radius; + unsigned path; + bool dead_end; TrackPart(); - void collect_endpoints(std::vector &); + + void collect_endpoints(std::vector &) const; + Point get_point(float) const; }; } // namespace Marklin