summaryrefslogtreecommitdiff
path: root/xc/unsupported/doc/PHIGS/man3/p038
blob: e240d28a8733a4185f635dcbb4e2380da3695379 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
.\"##
.\" $XConsortium: p038,v 5.2 91/08/16 14:55:43 hersh Exp $
.\"##
.\"## 
$XMCOPY
.\"## Copyright (c) 1990, 1991 by Sun Microsystems, Inc. 
.\"## 
.\"##                         All Rights Reserved
.\"## 
.\"## Permission to use, copy, modify, and distribute this software and its 
.\"## documentation for any purpose and without fee is hereby granted, 
.\"## provided that the above copyright notice appear in all copies and that
.\"## both that copyright notice and this permission notice appear in 
.\"## supporting documentation, and that the name of Sun Microsystems,
.\"## not be used in advertising or publicity 
.\"## pertaining to distribution of the software without specific, written 
.\"## prior permission.  
.\"## 
.\"## SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 
.\"## INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
.\"## EVENT SHALL SUN MICROSYSTEMS BE LIABLE FOR ANY SPECIAL, INDIRECT OR
.\"## CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
.\"## USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
.\"## OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
.\"## PERFORMANCE OF THIS SOFTWARE.
.TH "ELEMENT SEARCH" 3P "29 February 1991"
.SH NAME
ELEMENT SEARCH \- search for next matching element in specified structure
.IX "Searching" "ELEMENT SEARCH"
.SH SYNOPSIS
.SS C Syntax
.ft B
.ta 1.25i 3i
.nf
void
pelem_search  (  struct_id, start_el, dir, incl, excl, error_ind, status, found_el  )
Pint	struct_id;	\fIstructure identifier\fP
Pint	start_el;	\fIstarting element pointer\fP
Psearch_dir	dir;	\fIsearch direction\fP
Pelem_type_list	*incl;	\fIelement incl. list\fP
Pelem_type_list	*excl;	\fIelement excl. list\fP
Pint	*error_ind;	\fI\s-2OUT\s+2 error indicator\fP
Psearch_status	*status;	\fI\s-2OUT\s+2 search status\fP
Pint	*found_el;	\fI\s-2OUT\s+2 found element pointer\fP
.fi
.ft R
.SS Required PHIGS Operating States
(PHOP, *, *, *)
.SH DESCRIPTION
.SS Purpose
\s-2ELEMENT SEARCH\s+2
searches the specified structure
for the next element matching the search criteria.
The search starts at the specified element (or the limit of the structure)
and proceeds in the direction specified.
The search terminates if an element is found,
or if the opposite limit of the structure is reached.
.LP
The search criteria is based on element types.
An element satisfies the criteria if
its element type is in the inclusion set,
and \fInot\fP  in the exclusion set.
.SS C Input Parameters
.IP \fIstruct_id\fP
Identifier of the structure 
to search.
.IP \fIstart_el\fP
Position in the specified structure of the first element 
tested against the search criteria.
.IP \fIdir\fP
Search direction.
Psearch_dir is an enumerated type defined in phigs.h to have the following 
values:
.nf
.ta .5i
.sp
	PDIR_BACKWARD
 	PDIR_FORWARD
.fi
.IP \fIincl\fP
A pointer to a Pelem_type_list structure containing
the list of element types in the inclusion set.
.IP
The Pelem_type_list structure and its sub-types are defined in phigs.h as:
.sp .4
.ta .5i +\w'Pelem_type_list 'u +\w'num_elem_types;    'u
.nf
typedef struct {
.sp .2
	Pint    	num_elem_types;	/* number of element types */
	Pelem_type	*elem_types;	/* list of element types */
.sp .2
} Pelem_type_list;
.fi
.IP
The Pelem_type enumeration lists all the supported element types. 
It is enumerated in phigs.h as follows:
.sp .4
.nf
.ta .5i
typedef enum {
.sp .2
    PELEM_ALL,
    PELEM_NIL,
    PELEM_POLYLINE3,
    PELEM_POLYLINE,
    PELEM_POLYMARKER3,
    PELEM_POLYMARKER,
    PELEM_TEXT3,
    PELEM_TEXT,
    PELEM_ANNO_TEXT_REL3,
    PELEM_ANNO_TEXT_REL,
    PELEM_FILL_AREA3,
    PELEM_FILL_AREA,
    PELEM_FILL_AREA_SET3,
    PELEM_FILL_AREA_SET,
    PELEM_CELL_ARRAY3,
    PELEM_CELL_ARRAY,
    PELEM_GDP3,
    PELEM_GDP,
    PELEM_LINE_IND,
    PELEM_MARKER_IND,
    PELEM_TEXT_IND,
    PELEM_INT_IND,
    PELEM_EDGE_IND,
    PELEM_LINETYPE,
    PELEM_LINEWIDTH,
    PELEM_LINE_COLR_IND,
    PELEM_MARKER_TYPE,
    PELEM_MARKER_SIZE,
    PELEM_MARKER_COLR_IND,
    PELEM_TEXT_FONT,
    PELEM_TEXT_PREC,
    PELEM_CHAR_EXPAN,
    PELEM_CHAR_SPACE,
    PELEM_TEXT_COLR_IND,
    PELEM_CHAR_HT,
    PELEM_CHAR_UP_VEC,
    PELEM_TEXT_PATH,
    PELEM_TEXT_ALIGN,
    PELEM_ANNO_CHAR_HT,
    PELEM_ANNO_CHAR_UP_VEC,
    PELEM_ANNO_PATH,
    PELEM_ANNO_ALIGN,
    PELEM_ANNO_STYLE,
    PELEM_INT_STYLE,
    PELEM_INT_STYLE_IND,
    PELEM_INT_COLR_IND,
    PELEM_EDGE_FLAG,
    PELEM_EDGETYPE,
    PELEM_EDGEWIDTH,
    PELEM_EDGE_COLR_IND,
    PELEM_PAT_SIZE,
    PELEM_PAT_REF_POINT_VECS,
    PELEM_PAT_REF_POINT,
    PELEM_ADD_NAMES_SET,
    PELEM_REMOVE_NAMES_SET,
    PELEM_INDIV_ASF,
    PELEM_HLHSR_ID,
    PELEM_LOCAL_MODEL_TRAN3,
    PELEM_LOCAL_MODEL_TRAN,
    PELEM_GLOBAL_MODEL_TRAN3,
    PELEM_GLOBAL_MODEL_TRAN,
    PELEM_MODEL_CLIP_VOL3,
    PELEM_MODEL_CLIP_VOL,
    PELEM_MODEL_CLIP_IND,
    PELEM_RESTORE_MODEL_CLIP_VOL,
    PELEM_VIEW_IND,
    PELEM_EXEC_STRUCT,
    PELEM_LABEL,
    PELEM_APPL_DATA,
    PELEM_GSE,
    PELEM_PICK_ID,
    PELEM_POLYLINE_SET3_DATA,
    PELEM_FILL_AREA_SET3_DATA,
    PELEM_TRI_STRIP3_DATA,
    PELEM_QUAD_MESH3_DATA,
    PELEM_SET_OF_FILL_AREA_SET3_DATA,
    PELEM_NUNI_BSP_CURVE,
    PELEM_NUNI_BSP_SURF,
    PELEM_CELL_ARRAY3_PLUS,
    PELEM_TEXT_COLR,
    PELEM_MARKER_COLR,
    PELEM_EDGE_COLR,
    PELEM_LINE_COLR,
    PELEM_CURVE_APPROX_CRIT,
    PELEM_LINE_SHAD_METH,
    PELEM_INT_COLR,
    PELEM_BACK_INT_COLR,
    PELEM_BACK_INT_STYLE,
    PELEM_BACK_INT_STYLE_IND,
    PELEM_REFL_PROPS,
    PELEM_BACK_REFL_PROPS,
    PELEM_INT_SHAD_METH,
    PELEM_BACK_INT_SHAD_METH,
    PELEM_INT_REFL_EQN,
    PELEM_BACK_INT_REFL_EQN,
    PELEM_SURF_APPROX_CRIT,
    PELEM_FACE_DISTING_MODE,
    PELEM_FACE_CULL_MODE,
    PELEM_LIGHT_SRC_STATE,
    PELEM_DCUE_IND,
    PEL_COLR_MAPPING_IND,
    PELEM_RENDERING_COLR_MODEL,
    PELEM_NUM_EL_TYPES
.sp .2
} Pelem_type;
.fi
.IP \fIexcl\fP
A pointer to a \fIPelem_type_list\fP structure containing
the list of element types in the exclusion set.  Pelem_type_list
is defined above. 
Excluding all element types will result in failure to find matching elements.
.SS C Output Parameters
.IP \fIerror_ind\fP
A pointer to the location to store the error number of any error
detected by this function.
.IP \fIstatus\fP
A pointer to the location to store the search status.
Psearch_status is an enumerated type defined in phigs.h to have
the following values:
.nf
.ta .5i
.sp
	PSEARCH_STATUS_FAILURE
	PSEARCH_STATUS_SUCCESS
.fi
.IP \fIfound_el\fP
A pointer to the location to store the position of the element found.
If status is \s-2PSEARCH_STATUS_FAILURE\s+2, \fIfound_el\fP is undefined.
.SS Execution
If the start element position is less than zero,
the search begins at element position zero,
whose element type is considered \s-2NIL\s+2.
If the start element position is greater than
the number of elements in the structure,
the search begins at the last element in the open structure.
Otherwise, the search starts at the specified element.
.LP
If this element satisfies the search criteria,
the element position is returned along with a status indicator of success.
Otherwise the next element in the direction specified is considered.
The search will continue until either an element fulfills the search
criteria or the far end of the structure is reached.  If the search is 
unsuccessful, then a status indicator of failure is returned.
.LP
The current element pointer and currently open structure (if any)
are not used, and are unaffected.
.SH ERRORS
.IP 002
Ignoring function, function requires state (\s-2PHOP, *, *, *\s+2)
.IP 201
Ignoring function, the specified structure does not exist
.SH SEE ALSO
.nf
.IP
.ta 0.5i
.SM "LABEL (3P)"
.SM "INQUIRE ELEMENT POINTER (3P)"
.SM "INCREMENTAL SPATIAL SEARCH (3P)"
.fi