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

Method polyIntersectsPoly

source/base/StarWorldGeometry.cpp:296–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294}
295
296bool WorldGeometry::polyIntersectsPoly(PolyF const& polyA, PolyF const& polyB) const {
297 for (auto a : splitPoly(polyA)) {
298 for (auto b : splitPoly(polyB)) {
299 if (b.intersects(a))
300 return true;
301 }
302 }
303
304 return false;
305}
306
307bool WorldGeometry::rectIntersectsCircle(RectF const& rect, Vec2F const& center, float radius) const {
308 if (rect.contains(center))

Callers 4

tickMasterMethod · 0.80
intersectsWithPolyMethod · 0.80
entityQueryImplFunction · 0.80
TESTFunction · 0.80

Calls 1

intersectsMethod · 0.45

Tested by 1

TESTFunction · 0.64