MIST insideShape

From DCS World Wiki - Hoggitworld.com


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

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

Accepted shapes are circles and polygons.

This function is used as a master function to call the relevant "shameName in shapeName" function.

boolean mist.shape.insideShape(table shape1 ,table shape2 , 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 could determine if the SA-15's weapons range is within the radar coverage of an EWR by distance.
   local tor = Unit.getByName('sa15'):getPoint()
   tor.radius = 15000
   local ewr = Unit.getByName('ewr'):getPoint()
   tor.radius = 320000
   if mist.shape.inShape(tor, ewr) == true then
      -- Part of the Tor missile range is within the EWRs radar coverage
Related Functions
insideShape, circleInCircle, circleInPoly, polyInPoly, polyInCircle, getPointOnSegment, segmentIntersect

Scripting Engine

MIST Root Page