NAME

cxPickHitFaceGet - extract detailed hit information about a picked face

C SPECIFICATION

#include <cx/Pick.h>


cxErrorCode cxPickHitFaceGet(
cxPick *pick,
int n,
long *nvertices,
long index[],
float point[],
float normal[])

FORTRAN SPECIFICATION

integer function cxPickHitFaceGet(pick,n,nvertices,index,point,normal)
integer pick
integer n
integer nvertices
integer index(nvertices)
integer point(3, nvertices)
integer normal(3, nvertices)

PARAMETERS

pick
Pick structure to interrogate.
n
Index of the requested hit in the pick structure.
nvertices
Number of vertices in the intersected face.
index
Indices of the vertices of the face.
point
Vertices of the face.
normal
Normals at the vertices of the face.

FUNCTION RETURN VALUE

The return value for this function is an integer error code.

DESCRIPTION

This function extracts detail hit information about a face (polygon). The indices of the vertices are returned in index. The coordinates of the vertices are returned in point. If this object has vertex normals, they are returned in normal.

Enough storage for the indices, vertices, and normals must be provided. When this function is called from C or C++, if NULL is passed for any requested field, that field is not returned. The function can therefore be called twice, once to get the number of vertices and a second time with arrays allocated to the correct size. From Fortran, an array large enough to hold the maximum number of vertices must be used.

The function returns cx_err_none on success. A nonzero value is returned in case of an error. This will usually be because the hit is not of the proper object type.

The user can tell the function not to get information on a particular field by passing a NULL pointer value. You need not create dummy variables in the calling routine which calls cxPickHitFaceGet, because the request is simply ignored when the pointer comes in NULL.


Last modified: May 25 15:25 1999
[ Documentation Home ]

© The Numerical Algorithms Group Ltd, Oxford UK. 1999