MIST pointInPolygon

From DCS World Wiki - Hoggitworld.com


mist.pointInPolygon

Added with: Mist 1.0
Description
Returns true or false depending on if point is inside of a polygon defined by the points in the table poly.
Syntax
boolean mist.pointInPolygon(table point ,table poly , number maxAlt )
Valid Input Values:
point= vec2/vec3

poly= vec2/vec3 points indexed numerically

[1] = { 
x = number, 
y = number, 
z = number or nil (nil if you’re using Vec2), 
},

maxAlt= maximum altitude in meters in which it will check.

Return value:
boolean
Return example:
true
Usage Examples:

do

--code needed 

end

Notes:
Related Functions
makeUnitTable, getRandPointInCircle, getRandomPointInZone, getRandomPointInPoly, isTerrainValid, terrainHeightDiff, getUnitsInZones, getUnitsInMovingZones, pointInPolygon, getUnitsInPolygon, getDeadMapObjsInZones, getDeadMapObjsInPolygonZone, getUnitsLOS, random, randomizeNumTable, getAvgPoint, getQFE, getWindBearingAndVel, getPathLength, getPathInSegments, getPointAtDistanceOnPath, projectPoint, getGroupsByAttribute, , getUnitsByAttribute, mapValue,

Scripting Engine

MIST Root Page