MCPcopy Create free account
hub / github.com/comaps/comaps / SplitEdge

Function SplitEdge

libs/routing/road_graph.cpp:30–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28}
29
30void SplitEdge(Edge const & ab, geometry::PointWithAltitude const & p, vector<Edge> & edges)
31{
32 auto const & a = ab.GetStartJunction();
33 auto const & b = ab.GetEndJunction();
34
35 // No need to split the edge by its endpoints.
36 if (a.GetPoint() == p.GetPoint() || b.GetPoint() == p.GetPoint())
37 return;
38
39 edges.push_back(Edge::MakeFake(a, p, ab));
40 edges.push_back(Edge::MakeFake(p, b, ab));
41}
42} // namespace
43
44// Edge ------------------------------------------------------------------------

Callers 1

AddFakeEdgesMethod · 0.85

Calls 2

GetPointMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected