Functions | |
int | Find_Next_Sample (int *key_count, HC_KEY *keys, int *offset1, int *offset2, int *offset3) |
HC_BOOLEAN Find_Next_Sample | ( | int * | key_count, |
HC_KEY * | keys, | ||
int * | offset1, | ||
int * | offset2, | ||
int * | offset3 | ||
) |
Allows you to inspect the next item in the list of items found by Collect_Area_Samples.
key_count | - The size of the keys array. Passed by reference always. Returned to user. |
keys | - The list of keys of the object, the owning segment, the "include" references, all the way back to the root segment, from low to high in the tree. Passed by reference always. Returned to user. |
offset1 | - Returned to user in an encoded fashion. See Details below. |
offset2 | - Returned to user in an encoded fashion. See Details below. |
offset3 | - Returned to user in an encoded fashion. See Details below. |
Similar to an iterator, Find_Next_Sample will return, one by one, the items found by a previous call to Collect_Area_Samples. One would typically loop through all the found objects. When no more items are available, the entire list of samples is discarded and Find_Next_Sample returns false.
If the current sample item is a shell/mesh, the offset parameters will indicate subentity information - an edge, face, or vertex. This is only relevant when you are interested in subentity selection information. The offset parameters are defined as follows:
If all are returned as non-negative numbers, then offset3 indicates a face, and the others are irrelevant
If offset1 and offset2 are non-negative and offset3 is negative, an edge is described by offset1 and offset2 vertex numbers
If offset1 is non-negative and offset2 and offset3 are negative, then offset1 describes a vertex
If offset1 is negative, and offset2 and offset3 are non-negative, this means offset2 is an isoline index and offset3 is irrelevant
If offset1 and offset2 are negative, and offset3 is non-negative, then offset3 describes the best face