Big Restructuring / Cleanup

This commit is contained in:
Patrick Niklaus
2016-03-01 22:30:31 +01:00
parent adb8d0e845
commit b08b360f38
40 changed files with 419 additions and 511 deletions
+3 -1
View File
@@ -58,7 +58,9 @@ double bearing(const Coordinate first_coordinate, const Coordinate second_coordi
// Get angle of line segment (A,C)->(C,B)
double computeAngle(const Coordinate first, const Coordinate second, const Coordinate third);
Coordinate interpolateLinear( double factor, const Coordinate from, const Coordinate to );
// factor in [0,1]. Returns point along the straight line between from and to. 0 returns from, 1
// returns to
Coordinate interpolateLinear(double factor, const Coordinate from, const Coordinate to);
namespace mercator
{
+7 -5
View File
@@ -4,7 +4,7 @@
#include "util/dynamic_graph.hpp"
#include "extractor/node_based_edge.hpp"
#include "util/graph_utils.hpp"
#include "engine/guidance/classification_data.hpp"
#include "extractor/guidance/classification_data.hpp"
#include <tbb/parallel_sort.h>
@@ -46,13 +46,15 @@ struct NodeBasedEdgeData
bool roundabout : 1;
bool startpoint : 1;
extractor::TravelMode travel_mode : 4;
engine::guidance::RoadClassificationData road_classification;
extractor::guidance::RoadClassificationData road_classification;
bool IsCompatibleTo(const NodeBasedEdgeData &other) const
{
//TODO roundabout/startpoint/access_restricted should all be part of this??
return (reversed == other.reversed) && (name_id == other.name_id) &&
(travel_mode == other.travel_mode && road_classification == other.road_classification);
return (name_id == other.name_id) && (reversed == other.reversed) &&
(roundabout == other.roundabout) && (startpoint == other.startpoint) &&
(access_restricted == other.access_restricted) &&
(travel_mode == other.travel_mode) &&
(road_classification == other.road_classification);
}
};