MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / lineIntersectsPoly

Method lineIntersectsPoly

source/base/StarWorldGeometry.cpp:284–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282}
283
284bool WorldGeometry::lineIntersectsPoly(Line2F const& line, PolyF const& poly) const {
285 for (auto a : splitLine(line)) {
286 for (auto b : splitPoly(poly)) {
287 if (b.intersects(a)) {
288 return true;
289 }
290 }
291 }
292
293 return false;
294}
295
296bool WorldGeometry::polyIntersectsPoly(PolyF const& polyA, PolyF const& polyB) const {
297 for (auto a : splitPoly(polyA)) {

Callers 2

intersectsWithPolyMethod · 0.80
TESTFunction · 0.80

Calls 1

intersectsMethod · 0.45

Tested by 1

TESTFunction · 0.64