MIST polyInPoly

From DCS World Wiki - Hoggitworld.com
Revision as of 22:04, 11 February 2022 by Grimes (talk | contribs) (Created page with "{{Mission Scripting |fName= mist.shape.polyInPoly| |vNum = Mist 4.5 |desc= Determines whether or not the first passed polygon is inside of the second passed polygon. Optio...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


mist.shape.polyInPoly

Added with: Mist 4.5
Description
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.

Syntax
boolean mist.shape.polyInPoly(table polygon1 ,table polygon2 , boolean full )
Valid Input Values:
Poly: table of 3 points or more.
Return value:
boolean
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)
  end
Notes:
Related Functions
insideShape, circleInCircle, circleInPoly, polyInPoly, polyInCircle, getPointOnSegment, segmentIntersect

Scripting Engine

MIST Root Page