void pincr_spa_search3(
const Ppoint3 *ref_pt, /* search reference point */ Pfloat dist, /* search distance */ const Pelem_ref_list *sp, /* starting path list */ Pclip_ind clip_ind, /* modelling clip indicator */ Pint ceiling, /* search ceiling index */ const Pfilter_list *norm, /* normal filter list */ const Pfilter_list *inv, /* inverted filter list */ Pint length, /* length of application list */ Pint start, /* starting position */ Pint *error_ind, /* (out) error indicator */ Pelem_ref_list *fp, /* (out) found size */ Pint *total_length /* (out) length of list in GPHIGS */
)
typedef struct {
Pfloat x; /* x coordinate */
Pfloat y; /* y coordinate */
Pfloat z; /* z coordinate */
} Ppoint3;
typedef struct {
Pint num_elem_refs; /* no. of element references */
Pelem_ref *elem_refs; /* element references */
} Pelem_ref_list;
typedef enum {
PIND_NO_CLIP,
PIND_CLIP
} Pclip_ind;
typedef struct {
Pint num_filters; /* number of filters */
Pfilter *filters; /* filters */
} Pfilter_list;
typedef struct {
Pint struct_id; /* identifier for structure */
Pint elem_pos; /* position of element in structure */
} Pelem_ref;
typedef struct {
Pint_list incl_set; /* inclusion set */
Pint_list excl_set; /* exclusion set */
} Pfilter;
The search starts at the element following the position specified by the start path. The search is traversal. As with all traversals, the initial PHIGS traversal state list values are defined in the PHIGS description table . The search is successful if a graphic structure element is found which verifies the search filters and of which part of the graphic description is found near the reference point. If the modelling clipping indicator is PIND_NO_CLIP, modelling clipping is not carried out during the incremental search. If it is set to PIND_CLIP, modelling clipping is carried out. If the search distance is less than or equal to 0, the graphic elements must intersect the reference point. The full access path to the element is returned as 0.
The search threshold index indicates a structure in the start path. The traversal starts when the end of this structure is reached. A zero path is returned when the traversal ends by reaching the search threshold. If the threshold index is 1, the structure at the head of the start path is the threshold and therefore the search is carried out without a threshold.
The search is incremental due to the fact that having found a first element by its path, the incremental search continues from this path.
The filters operate on primitive eligibility by comparison with the current name set of the PHIGS traversal state list in the same way as for invisibility, highlighting and picking. These filters are organized in two lists: normal list and inverted list. A structure element can be searched for if it is accepted by all the normal list filters and rejected by all the inverted list filters. If the normal list is empty, all the elements are considered as having satisfied the acceptance criterion. If the inverted list is empty, all the structure elements are considered as having satisfied the rejection criterion.