inPolygon: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " *\|= * " to " ")
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|Comments=
{{Command


| arma3 |Game name=
| arma3


|1.54|Game version=
|1.54


|gr1= Positions |GROUP1=
|gr1= Positions


| Checks whether position is inside given polygon |DESCRIPTION=
| Checks whether position is inside given polygon


| position '''inPolygon''' polygon |SYNTAX=
| position '''inPolygon''' polygon
|p1= position: [[Array]] - format [[Position3D]] |PARAMETER1=
|p1= position: [[Array]] - format [[Position3D]]
|p2= polygon: [[Array]] - array of [[Position3D]] positions in format: [position1, position2...., positionN] |PARAMETER2=
|p2= polygon: [[Array]] - array of [[Position3D]] positions in format: [position1, position2...., positionN]


| [[Boolean]] |RETURNVALUE=
| [[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]] |SEEALSO=
|[[in]], [[inArea]], [[drawPolygon]]


}}
}}

Revision as of 00:40, 18 January 2021

Hover & click on the images for description

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

Notes

Bottom Section