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

Method polyContains

source/base/StarWorldGeometry.cpp:255–262  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255bool WorldGeometry::polyContains(PolyF const& poly, Vec2F const& pos) const {
256 auto wpos = xwrap(pos);
257 for (auto const& p : splitPoly(poly)) {
258 if (p.contains(wpos))
259 return true;
260 }
261 return false;
262}
263
264float WorldGeometry::polyOverlapArea(PolyF const& poly1, PolyF const& poly2) const {
265 float area = 0.0f;

Callers 1

TESTFunction · 0.45

Calls 1

containsMethod · 0.45

Tested by 1

TESTFunction · 0.36