Difference between revisions of "MIST insideShape"
From DCS World Wiki - Hoggitworld.com
(Created page with "{{Mission Scripting |fName= mist.shape.insideShape| |vNum = Mist 4.5 |desc= Determines whether or not the first passed shape is inside of the second passed shape. Optional...") |
(No difference)
|
Latest revision as of 21:49, 11 February 2022
mist.shape.insideShape
Added with: Mist 4.5 |
Description |
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. |
Syntax |
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: |
boolean |
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 end |
Notes: |
Related Functions |
insideShape, circleInCircle, circleInPoly, polyInPoly, polyInCircle, getPointOnSegment, segmentIntersect |