MIST polyInPoly

From DCS World Wiki - Hoggitworld.com
Revision as of 22:05, 11 February 2022 by Grimes (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Added with: Mist 4.5
Determines whether or not the first passed polygon is inside of the second passed polygon.

Optional full entry requires the entire shape to be inside of the other shape to return true.

boolean mist.shape.polyInPoly(table polygon1 ,table polygon2 , boolean full )
Valid Input Values:
Poly: table of 3 points or more.
Return value:
Return example:
true or false
Usage Examples:
The following would display a message if polygon s1 is completely inside the polygon of s2
  local s1= mist.getGroupPoints('somePoly1')
  local s2= mist.getGroupPoints('somePoly2')
  if mist.shape.circleInPoly(s1, s2, true) == true then
    trigger.action.outText("Look I couldnt actually think of a sample that would be short and made sense for two polygons to intersect.", 20)
Related Functions
insideShape, circleInCircle, circleInPoly, polyInPoly, polyInCircle, getPointOnSegment, segmentIntersect

Scripting Engine

MIST Root Page