struct Endpoint
{
Vector pos;
- float dir; // Direction outwards from the endpoint
+ Angle dir; // Direction outwards from the endpoint
unsigned paths;
- Endpoint(float, float, float, unsigned);
+ Endpoint(float, float, const Angle &, unsigned);
bool has_path(unsigned p) const { return paths&(1<<p); }
bool has_common_paths(const Endpoint &e) const { return paths&e.paths; }
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:
void collect_endpoints();