MIST circleInPoly

From DCS World Wiki - Hoggitworld.com


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

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

boolean mist.shape.circleInPoly(table circle ,table polygon , boolean full )
Valid Input Values:
Circle: table with point and radius entries

Poly: table of 3 points or more.

Return value:
Return example:
true or false
Usage Examples:
The following would return true if an artillery unit with a range of 30km is able to fire on a point within a polygon defined by the group "village"
   local arty= Unit.getByName('arty'):getPoint()
   arty.radius = 30000
   local zone = mist.getGroupPoints('village')
   if mist.shape.circleInPoly(arty, zone ) == true then
     trigger.action.outText("The enemy artillery is now in range of that town we need to protect", 20)
Related Functions
insideShape, circleInCircle, circleInPoly, polyInPoly, polyInCircle, getPointOnSegment, segmentIntersect

Scripting Engine

MIST Root Page