NAME

cxPickHitGet - get detailed information about a hit from a pick

C SPECIFICATION

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

FORTRAN SPECIFICATION

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

PARAMETERS

pick
Pick structure to interrogate.
n
Index of the hit.
id
Identifier of the generating module.
validInfo
Valid data flags.
point
3-space location of hit.
normal
Normal vector at hit.
color
Color (RGBA) of hit object.
label
Label of hit object.
localTransform
4x4 matrix of the locally applied transform.
globalTransform
4x4 matrix of the entire transform applied to hit object.
objectType
Object type in enumeration cxPickObject.

FUNCTION RETURN VALUE

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

DESCRIPTION

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.

SEE ALSO

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


Last modified: May 27 13:38 1999
[ Documentation Home ]

© The Numerical Algorithms Group Ltd, Oxford UK. 1999