point<float> start;
point<float> end;
bool reversed;
+ int length;
+ // each integer represents an index into our list of paths
std::set<int> path_ids;
- Segment() : start(0.0, 0.0), end(0.0, 0.0) {}
- Segment(float x1, float y1, float x2, float y2, bool isRC)
- : start(x1, y1), end(x2, y2), reversed(isRC) {}
+ Segment() : start(0.0, 0.0), end(0.0, 0.0), reversed(false), length(0) {}
+ Segment(float x1, float y1, float x2, float y2, bool isRC, int length_)
+ : start(x1, y1), end(x2, y2), reversed(isRC), length(length_) {}
};
//! data structure holding our line segments
* it's indexed by the pair x1, x2 (the two x coordinates between
* the two tracks
*/
- typedef std::pair<int, int> segment_key;
+ typedef std::pair<int, int> segment_key;
typedef std::map<segment_key, Segment> pair_segment_map;
typedef std::vector<pair_segment_map> path_segment_map_vector;
path_segment_map_vector path_segments;