Refactoring _Coordinate class
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
|
||||
EdgeBasedGraphFactory::EdgeBasedGraphFactory(
|
||||
int nodes, std::vector<ImportEdge> & inputEdges,
|
||||
std::vector<NodeID> & bn,
|
||||
std::vector<NodeID> & tl,
|
||||
std::vector<NodeID> & barrier_node_list,
|
||||
std::vector<NodeID> & traffic_light_node_list,
|
||||
std::vector<TurnRestriction> & input_restrictions_list,
|
||||
std::vector<NodeInfo> & inputNodeInfoList,
|
||||
SpeedProfileProperties speedProfile
|
||||
@@ -54,8 +54,15 @@ EdgeBasedGraphFactory::EdgeBasedGraphFactory(
|
||||
_restrictionBucketVector.at(index).push_back(std::make_pair(restriction.toNode, restriction.flags.isOnly));
|
||||
}
|
||||
|
||||
_barrierNodes.insert(bn.begin(), bn.end());
|
||||
_trafficLights.insert(tl.begin(), tl.end());
|
||||
_barrierNodes.insert(
|
||||
barrier_node_list.begin(),
|
||||
barrier_node_list.end()
|
||||
);
|
||||
|
||||
_trafficLights.insert(
|
||||
traffic_light_node_list.begin(),
|
||||
traffic_light_node_list.end()
|
||||
);
|
||||
|
||||
DeallocatingVector< _NodeBasedEdge > edges;
|
||||
_NodeBasedEdge edge;
|
||||
|
||||
@@ -75,8 +75,8 @@ public:
|
||||
return id == other.id;
|
||||
}
|
||||
|
||||
inline _Coordinate Centroid() const {
|
||||
_Coordinate centroid;
|
||||
inline FixedPointCoordinate Centroid() const {
|
||||
FixedPointCoordinate centroid;
|
||||
//The coordinates of the midpoint are given by:
|
||||
//x = (x1 + x2) /2 and y = (y1 + y2) /2.
|
||||
centroid.lon = (std::min(lon1, lon2) + std::max(lon1, lon2))/2;
|
||||
@@ -87,6 +87,7 @@ public:
|
||||
inline bool isIgnored() const {
|
||||
return ignoreInGrid;
|
||||
}
|
||||
|
||||
NodeID id;
|
||||
int lat1;
|
||||
int lat2;
|
||||
|
||||
Reference in New Issue
Block a user