Difference between revisions of "MIST polyInPoly"

From DCS World Wiki - Hoggitworld.com
(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...")
(No difference)

Revision as of 22:04, 11 February 2022


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