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)
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.