Syntax
[C/C++:]
void gPolygonHit(int *ident, float x, float y, float radius);
[F90:]
subroutine gPolygonHit(ident, x, y, radius)
integer, intent(out) :: ident
real, intent(in) :: x,y,radius
Arguments
ident
Identifier of polygon whose boundary is nearest to hit centre
|
= -1, |
No polygon inside hit area |
x,y
Picture coordinates of hit centre
radius
Radius of hit area in current units
Description
The routine gPolygonHit() searches the polygon workspace for polygons that overlap the hit area. The identifier of the polygon whose boundary comes closest to the hit centre is returned in
ident. If no polygon boundaries extend inside the hit area
ident is set to -1. The hit area is a circular area of radius
radius whose centre is at
x,y in picture coordinates. The absolute value of
radius determines the hit radius.
If gSelectPolygons() has been called, only those polygons currently selected, will be examined.
See Also
gPolygonHit UsagegSelectPolygons