cxPickHitGet - get detailed information about a hit from a pick

#include <cx/Pick.h>

cxErrorCode cxPickHitGet(
cxPick *pick,
int n,
long *id,
long *validInfo,
float point[3],
float normal[3],
float color[4],
char **label,
float localTransform[16],
float globalTransform[16],
int *objectType)
integer function cxPickHitGet(pick,n,id,validInfo,point,normal,color,label,localTransform,globalTransform,objectType)
integer pick
integer n
integer validInfo
real point(3)
real normal(3)
real color(4)
character*(*) label
real localTransform(16)
real globalTransform(16)
integer objectType
Pick structure to interrogate.
Index of the hit.
Identifier of the generating module.
Valid data flags.
3-space location of hit.
Normal vector at hit.
Color (RGBA) of hit object.
Label of hit object.
4x4 matrix of the locally applied transform.
4x4 matrix of the entire transform applied to hit object.
Object type in enumeration cxPickObject.

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

This function extracts information from a particular hit in a pick data structure. The pick structure can contain multiple hits, so the index of the requested hit is required. The fields where data is valid is indicated by the bits set in validInfo. Masks for the bits may be found in the enumeration cxPickValidFlag in <cx/Pick.h>. The function returns cx_err_none on success. The function returns a nonzero value if the hit requested does not exist.

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 cxPickHitGet, because the request is simply ignored when the pointer comes in NULL.

cxPickHitPointGet(3E), cxPickHitLineGet(3E), cxPickHitFaceGet(3E), cxPickHitConeGet(3E), cxPickHitCylinderGet(3E)

Last modified: Mon Nov 6 16:33:39 GMT 2000 [ Documentation Home ]
© The Numerical Algorithms Group Ltd, Oxford UK. 1999