POINT_IN_POLYGON
Name
POINT_IN_POLYGON
Purpose
This function will determine whether the supplied point is contained
within the supplied general polygon
Category
Graphics.
Calling Sequence
Result = POINT_IN_POLYGON( point, polygon )
Inputs
point
A vector containing the (x,y) coordinates for the point being checked
polygon
A structure describing the polygon that contains the following tags
NV number of vertices in the polygon
V 2xNV array containing the indivudual vertices of the polygon
Keyword Parameters
None
Result
A boolean status flag indicating whether the provided point is contained
within the polygonal boundary specified; 1 indicates the point is contained
in the boundary, 0 indicates it does not.
Side Effects
None
Requires
None
Modification History
Written by: Carl Salvaggio
October, 2003 Original code
May, 2004 Fixed bug when polygon data was not a floating
point data type
Disclaimer
This source code is provided "as is" and without warranties as to performance
or merchantability. The author and/or distributors of this source code may
have made statements about this source code. Any such statements do not
constitute warranties and shall not be relied on by the user in deciding
whether to use this source code.
This source code is provided without any express or implied warranties
whatsoever. Because of the diversity of conditions and hardware under which
this source code may be used, no warranty of fitness for a particular purpose
is offered. The user is advised to test the source code thoroughly before
relying on it. The user must assume the entire risk of using the source code.