NAME

cxPickHitFaceGet - extract detailed hit information about a picked face

#include <cx/Pick.h>


cxErrorCode cxPickHitFaceGet(
cxPick *pick,
int n,
long *nvertices,
long index[],
float point[],
float normal[])
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)
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.

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

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: Mon Nov 6 16:33:39 GMT 2000 [ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1999