inPolygon: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " *\|= * " to " ") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments( \("local" or "global"\))?|Effects|Multiplayer Effects( \("local" or "global"\))?|Multiplayer Exe...) |
||
Line 1: | Line 1: | ||
{{Command | {{Command | ||
| arma3 | | arma3 | ||
|1.54 | |1.54 | ||
|gr1= Positions | |gr1= Positions | ||
| Checks whether position is inside given polygon | | Checks whether position is inside given polygon | ||
| position '''inPolygon''' polygon | | position '''inPolygon''' polygon | ||
|p1= position: [[Array]] - format [[Position3D]] | |p1= position: [[Array]] - format [[Position3D]] | ||
|p2= polygon: [[Array]] - array of [[Position3D]] positions in format: [position1, position2...., positionN] | |p2= polygon: [[Array]] - array of [[Position3D]] positions in format: [position1, position2...., positionN] | ||
| [[Boolean]] | | [[Boolean]] | ||
|x1= <code>_isInside = [100,100,0] [[inPolygon]] [[0,0,0],[1000,1000,0],[1000,0,0]];</code> | |x1= <code>_isInside = [100,100,0] [[inPolygon]] [[0,0,0],[1000,1000,0],[1000,0,0]];</code> | ||
|[[in]], [[inArea]], [[drawPolygon]] | |[[in]], [[inArea]], [[drawPolygon]] | ||
}} | }} |
Revision as of 00:40, 18 January 2021
Description
- Description:
- Checks whether position is inside given polygon
- Groups:
- Positions
Syntax
- Syntax:
- position inPolygon polygon
- Parameters:
- position: Array - format Position3D
- polygon: Array - array of Position3D positions in format: [position1, position2...., positionN]
- Return Value:
- Boolean
Examples
- Example 1:
_isInside = [100,100,0] inPolygon [[0,0,0],[1000,1000,0],[1000,0,0]];
Additional Information
- See also:
- ininAreadrawPolygon
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note