X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftrack.h;h=4dbfa2db87eabd56c12616f759adebdef1f4ca2c;hb=1d240350c24138e173eac660d31d56c7b8503b09;hp=326c2e28e3d65fe479c4ddc1c2e694a79deae5e3;hpb=d15ac13f2e170f155b4bbd124df48400c339b644;p=r2c2.git diff --git a/source/libr2c2/track.h b/source/libr2c2/track.h index 326c2e2..4dbfa2d 100644 --- a/source/libr2c2/track.h +++ b/source/libr2c2/track.h @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include "geometry.h" namespace R2C2 { @@ -16,7 +16,7 @@ class TrackType; class Track: public sigc::trackable { public: - class Loader: public Msp::DataFile::BasicLoader + class Loader: public Msp::DataFile::ObjectLoader { public: Loader(Track &); @@ -41,6 +41,7 @@ private: unsigned sensor_id; std::vector links; unsigned active_path; + bool path_changing; Track(const Track &); Track &operator=(const Track &); @@ -69,6 +70,7 @@ public: unsigned get_sensor_id() const { return sensor_id; } void set_active_path(unsigned); unsigned get_active_path() const { return active_path; } + bool is_path_changing() const { return path_changing; } int get_endpoint_by_link(Track &) const; Vector get_endpoint_position(unsigned) const; @@ -81,6 +83,7 @@ public: Track *get_link(unsigned) const; TrackPoint get_point(unsigned, unsigned, float) const; TrackPoint get_point(unsigned, float) const; + TrackPoint get_nearest_point(const Vector &) const; bool collide_ray(const Vector &, const Vector &);