/* $Id$
This file is part of R²C²
-Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa
+Copyright © 2006-2011 Mikkosoft Productions, Mikko Rasa
Distributed under the GPL
*/
public:
struct Endpoint
{
- Point pos;
+ Vector pos;
float dir; // Direction outwards from the endpoint
unsigned paths;
std::vector<Endpoint> endpoints;
unsigned state_bits;
unsigned autofit_preference;
+ std::string object;
public:
TrackType(const ArticleNumber &);
bool is_turnout() const;
bool is_dead_end() const;
unsigned get_autofit_preference() const { return autofit_preference; }
+ const std::string &get_object() const { return object; }
const std::vector<TrackPart> &get_parts() const { return parts; }
const std::vector<Endpoint> &get_endpoints() const { return endpoints; }
const Endpoint &get_endpoint(unsigned) const;
TrackPoint get_point(unsigned, unsigned, float) const;
+ bool collide_ray(const Vector &, const Vector &, float) const;
private:
void collect_endpoints();