@@ -43,7 +43,9 @@ bool pointOnBoundary(const Point<T>& p, const Point<T>& p1, const Point<T>& p2)
|
||||
template <typename T>
|
||||
bool segmentIntersectSegment(const Point<T>& a, const Point<T>& b, const Point<T>& c, const Point<T>& d) {
|
||||
// a, b are end points for line segment1, c and d are end points for line segment2
|
||||
const auto perp = [](const Point<T>& v1, const Point<T>& v2) { return (v1.x * v2.y - v1.y * v2.x); };
|
||||
const auto perp = [](const Point<T>& v1, const Point<T>& v2) {
|
||||
return (v1.x * v2.y - v1.y * v2.x);
|
||||
};
|
||||
|
||||
// check if two segments are parallel or not
|
||||
// precondition is end point a, b is inside polygon, if line a->b is
|
||||
@@ -147,9 +149,7 @@ template bool segmentIntersectSegment(const Point<int64_t>& a,
|
||||
template bool rayIntersect(const Point<int64_t>& p, const Point<int64_t>& p1, const Point<int64_t>& p2);
|
||||
template bool pointOnBoundary(const Point<int64_t>& p, const Point<int64_t>& p1, const Point<int64_t>& p2);
|
||||
template bool lineIntersectPolygon(const Point<int64_t>& p1, const Point<int64_t>& p2, const Polygon<int64_t>& polygon);
|
||||
template bool pointWithinPolygon(const Point<int64_t>& point,
|
||||
const Polygon<int64_t>& polygon,
|
||||
bool trueOnBoundary);
|
||||
template bool pointWithinPolygon(const Point<int64_t>& point, const Polygon<int64_t>& polygon, bool trueOnBoundary);
|
||||
template bool pointWithinPolygons(const Point<int64_t>& point,
|
||||
const MultiPolygon<int64_t>& polygons,
|
||||
bool trueOnBoundary);
|
||||
@@ -162,8 +162,6 @@ template bool segmentIntersectSegment(const Point<double>& a,
|
||||
const Point<double>& b,
|
||||
const Point<double>& c,
|
||||
const Point<double>& d);
|
||||
template bool pointWithinPolygon(const Point<double>& point,
|
||||
const Polygon<double>& polygon,
|
||||
bool trueOnBoundary);
|
||||
template bool pointWithinPolygon(const Point<double>& point, const Polygon<double>& polygon, bool trueOnBoundary);
|
||||
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user