X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftracktype.h;h=dd2a7c4ddf29f83c67d8bed648382d449412db46;hb=e621dd4120cb253417167b4295e436cee095ccb0;hp=7eb2bdc64d15bcfb4cbc853f14b23374583e1c1c;hpb=277e8e7e4230aa8867f507ace62476afe575cff1;p=r2c2.git diff --git a/source/libr2c2/tracktype.h b/source/libr2c2/tracktype.h index 7eb2bdc..dd2a7c4 100644 --- a/source/libr2c2/tracktype.h +++ b/source/libr2c2/tracktype.h @@ -1,14 +1,7 @@ -/* $Id$ - -This file is part of R²C² -Copyright © 2006-2011 Mikkosoft Productions, Mikko Rasa -Distributed under the GPL -*/ - #ifndef LIBR2C2_TRACKTYPE_H_ #define LIBR2C2_TRACKTYPE_H_ -#include +#include #include "articlenumber.h" #include "geometry.h" #include "trackpart.h" @@ -25,9 +18,12 @@ public: unsigned paths; Endpoint(float, float, float, unsigned); + + bool has_path(unsigned p) const { return paths&(1< + class Loader: public Msp::DataFile::ObjectLoader { private: bool state_bits_set; @@ -68,6 +64,7 @@ public: const std::vector &get_endpoints() const { return endpoints; } const Endpoint &get_endpoint(unsigned) const; TrackPoint get_point(unsigned, unsigned, float) const; + TrackPoint get_nearest_point(const Vector &) const; bool collide_ray(const Vector &, const Vector &, float) const; private: