]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/trackpart.h
Make use of the geometry part of libmspmath
[r2c2.git] / source / libr2c2 / trackpart.h
index 9143ff84f32761ef1ee1d0e2989de7078369e5a3..9a17663aae1446884d4ebb97b79b6cbc348fc34d 100644 (file)
@@ -26,9 +26,11 @@ private:
        unsigned path;
        bool dead_end;
        TrackPart *links[2];
+       Shape *shape;
 
 public:
        TrackPart();
+       ~TrackPart();
 
        float get_length() const;
        bool is_curved() const { return radius; }
@@ -38,7 +40,8 @@ public:
        bool is_dead_end() const { return dead_end; }
        void check_link(TrackPart &);
        TrackPart *get_link(unsigned) const;
-       bool collide_ray(const Vector &, const Vector &, float) const;
+       void create_shape();
+       const Shape &get_shape() const { return *shape; }
 };
 
 } // namespace R2C2