1vpGeti(3)                  Library Functions Manual                  vpGeti(3)
2
3
4

NAME

6       vpGeti, vpGetd, vpGetp - get the value of an option
7

SYNOPSIS

9       #include <volpack.h>
10
11       vpResult
12       vpGeti(vpc, option, iptr)
13           vpContext *vpc;
14           int option;
15           int *iptr;
16
17       vpResult
18       vpGetd(vpc, option, dptr)
19           vpContext *vpc;
20           int option;
21           double *dptr;
22
23       vpResult
24       vpGetp(vpc, option, pptr)
25           vpContext *vpc;
26           int option;
27           void *pptr;
28

ARGUMENTS

30       vpc    VolPack context from vpCreateContext.
31
32       option Constant that specifies the option to be retrieved.
33
34       iptr   Location to store an integer result.
35
36       dptr   Location to store a double result.
37
38       pptr   Location to store a pointer result.
39

DESCRIPTION

41       These  functions  are  used  the get the values of integer-, double- or
42       pointer-valued state variables in a rendering context.   The  following
43       list  summarizes  the integer-valued options that can be retrieved with
44       vpGeti.  The value of the option is stored in  the  location  given  by
45       iptr;  the  return  value  of  vpGeti  is  not the value of the option.
46       Unless otherwise noted, the result is a single integer and iptr  should
47       point to a single integer location.
48
49       VP_XLEN
50              Get the length of the X dimension of the volume in voxels.
51
52       VP_YLEN
53              Get the length of the Y dimension of the volume in voxels.
54
55       VP_ZLEN
56              Get the length of the Y dimension of the volume in voxels.
57
58       VP_BYTES_PER_VOXEL
59              Get the size of a voxel in bytes.
60
61       VP_VOXEL_FIELD_COUNT
62              Get the number of fields in a voxel.
63
64       VP_SHADE_FIELD_COUNT
65              Get the number of fields in a voxel used as parameters for shad‐
66              ing the voxel.
67
68       VP_FIELD_SIZES
69              Get the size of each voxel field in bytes.  iptr must  point  to
70              an  array  of integers containing one entry for each voxel field
71              (use VP_VOXEL_FIELD_COUNT to determine the number of fields).
72
73       VP_FIELD_OFFSETS
74              Get the byte offset from the beginning of a voxel for each voxel
75              field.   iptr  must point to an array of integers containing one
76              entry for each voxel field (use VP_VOXEL_FIELD_COUNT  to  deter‐
77              mine the number of fields).
78
79       VP_FIELD_MAXES
80              Get  the  maximum  value  of  the  quantity stored in each voxel
81              field.  iptr must point to an array of integers  containing  one
82              entry  for  each voxel field (use VP_VOXEL_FIELD_COUNT to deter‐
83              mine the number of fields).
84
85       VP_VOXEL_DATA_SIZE
86              Get the size (in bytes) of the 3D voxel array.
87
88       VP_VOXEL_XSTRIDE
89              Get the stride (in bytes) for the X dimension of  the  3D  voxel
90              array.
91
92       VP_VOXEL_YSTRIDE
93              Get  the  stride  (in bytes) for the Y dimension of the 3D voxel
94              array.
95
96       VP_VOXEL_ZSTRIDE
97              Get the stride (in bytes) for the Z dimension of  the  3D  voxel
98              array.
99
100       VP_CLASSIFY_FIELD_COUNT
101              Get the number of fields in a voxel used as parameters for clas‐
102              sifying the voxel (the number of arguments to the opacity trans‐
103              fer function).
104
105       VP_CLASSIFY_FIELDS
106              Get  the field numbers for the arguments to the opacity transfer
107              function.  iptr must point to an array  of  integers  containing
108              one  entry  for  each  argument  (use VP_CLASSIFY_FIELD_COUNT to
109              determine the number of arguments).
110
111       VP_CLASSIFY_TABLE_SIZES
112              Get the size (in bytes) of each lookup table used for the  opac‐
113              ity  transfer function.  iptr must point to an array of integers
114              containing  one  entry  for  each  lookup  table  (use  VP_CLAS‐
115              SIFY_FIELD_COUNT to determine the number of lookup tables, which
116              equals the number of arguments to  the  opacity  transfer  func‐
117              tion).
118
119       VP_COLOR_CHANNELS
120              Get the number of color channels that the current shading lookup
121              tables or shading callback function will produce.
122
123       VP_SHADE_COLOR_SIZE
124              Get the size of the shading lookup table for color  values  (see
125              vpSetLookupShader(3)).
126
127       VP_SHADE_WEIGHT_SIZE
128              Get  the size of the shading lookup table for weight values (see
129              vpSetLookupShader(3)).
130
131       VP_MATERIAL_COUNT
132              Get the number of material types  used  by  the  current  lookup
133              shader (see vpSetLookupShader(3)).
134
135       VP_SHADE_COLOR_FIELD
136              Get  the field number used for indexing the shading lookup table
137              for color values (see vpSetLookupShader(3)).
138
139       VP_SHADE_WEIGHT_FIELD
140              Get the field number used for indexing the shading lookup  table
141              for weight values (see vpSetLookupShader(3)).
142
143       VP_LIGHT0
144       VP_LIGHT1
145       VP_LIGHT2
146       VP_LIGHT3
147       VP_LIGHT4
148       VP_LIGHT5
149              The  retrieved  value  is  nonzero if the corresponding light is
150              enabled, or 0 if it is disabled.
151
152       VP_LIGHT_BOTH_SIDES
153              The retrieved value is nonzero if two-sided lighting is  enabled
154              (see vpSetLight(3)), or 0 if it is disabled.
155
156       VP_REVERSE_SURFACE_SIDES
157              The  retrieved  value  is nonzero if the definitions of interior
158              and exterior surfaces have been reversed (see vpSetMaterial(3)),
159              or 0 if they have not.
160
161       VP_DEPTH_CUE
162              The  retrieved value is nonzero if depth cueing is enabled, or 0
163              if it is disabled.
164
165       VP_DEPTH_CUE_TABLE_SIZE
166              Get the current number of entries in the depth cueing table (see
167              vpSetDepthCueing(3)).
168
169       VP_DEPTH_CUE_SIZE_HINT
170              Get the current hint for the number of entries in the depth cue‐
171              ing table (see vpSetDepthCueing(3)).
172
173       VP_CURRENT_MATRIX
174              Get  the  identifier  for  the  current  transformation   matrix
175              (VP_MODEL, VP_VIEW or VP_PROJECT).
176
177       VP_CONCAT_MODE
178              Get  the  identifier  for  the current matrix concatenation mode
179              (VP_CONCAT_LEFT or VP_CONCAT_RIGHT).
180
181       VP_IMAGE_WIDTH
182              Get the width (in pixels) of the output image array.
183
184       VP_IMAGE_HEIGHT
185              Get the height (in pixels) of the output image array.
186
187       VP_IMAGE_SCAN_SIZE
188              Get the number bytes per scanline in the output image array.
189
190       VP_VIEW_AXIS
191              Get the identifier for the current major  viewing  axis  in  the
192              object  coordinate  system  (VP_X_AXIS, VP_Y_AXIS or VP_Z_AXIS).
193              The axis depends on the viewing transformation.
194
195       VP_INTERMEDIATE_WIDTH
196              Get the width (in pixels) of the intermediate image required  to
197              render  the  current volume with the current viewing transforma‐
198              tion (see vpRenderRawVolume(3)).
199
200       VP_INTERMEDIATE_HEIGHT
201              Get the height (in pixels) of the intermediate image required to
202              render  the  current volume with the current viewing transforma‐
203              tion (see vpRenderRawVolume(3)).
204
205       VP_INTERMEDIATE_COLOR
206              Get the number of color channels in the intermediate image  (see
207              vpRenderRawVolume(3)).
208
209       VP_INT_WIDTH_HINT
210              Get the current hint for the width (in pixels) of the intermedi‐
211              ate image (see vpRenderRawVolume(3)).
212
213       VP_INT_HEIGHT_HINT
214              Get the current hint for the height (in pixels) of the  interme‐
215              diate image (see vpRenderRawVolume(3)).
216
217       VP_VIEW_X_AXIS
218       VP_VIEW_Y_AXIS
219       VP_VIEW_Z_AXIS
220              The  retrieved  value  is  non-zero if computing a preclassified
221              volume for the corresponding major viewing axis is enabled  (see
222              vpClassifyVolume(3)).
223
224       VP_VIEW_X_SIZE
225       VP_VIEW_Y_SIZE
226       VP_VIEW_Z_SIZE
227              Get the size (in bytes) of the preclassified volume for the cor‐
228              responding major viewing axis.
229
230       VP_MMOCTREE_THRESHOLDS
231              Get the current min-max  octree  range  thresholds.   iptr  must
232              point  to  an  array  of  integers containing one entry for each
233              threshold (use VP_CLASSIFY_FIELD_COUNT to determine  the  number
234              of thresholds, which equals the number of arguments to the opac‐
235              ity transfer function).
236
237       VP_MMOCTREE_SIZE
238              Get the size (in bytes) of the min-max octree.
239
240       VP_SHADOW
241              The retrieved value is  nonzero  if  shadows  are  enabled  (see
242              vpSetShadowLookupShader(3)).
243
244       VP_SHADOW_LIGHT
245              Get  the  constant  (e.g. VP_LIGHT0) associated with the current
246              shadow light (see vpSetShadowLookupShader(3)).
247
248       VP_SHADOW_WIDTH_HINT
249              Get the current hint for the width (in  pixels)  of  the  shadow
250              buffer (see vpSetShadowLookupShader(3)).
251
252       VP_SHADOW_HEIGHT_HINT
253              Get  the  current  hint for the height (in pixels) of the shadow
254              buffer (see vpSetShadowLookupShader(3)).
255
256       VP_SHADOW_COLOR_SIZE
257              Get the size of the shading lookup table for shadowed color val‐
258              ues (see vpSetShadowLookupShader(3)).
259
260       VP_SHADOW_BIAS
261              Get  the  current  shadow  bias  value  (see  vpSetShadowLookup‐
262              Shader(3)).
263
264       VP_PIXEL_TYPE
265              Get the current image pixel type (see vpSetImage(3)).
266
267       VP_CLAMP_SHADE_TABLE
268              The retrieved value is nonzero if clamping is enabled for  shade
269              table entries, or 0 if it is disabled (see vpShadeTable(3)).
270
271       VP_COMPOSITE_ORDER
272              This value is used for debugging only.  It returns 1 if the cur‐
273              rent major viewing axis (VP_VIEW_AXIS) points in the same direc‐
274              tion  as  the viewing direction, or -1 if they point in opposite
275              directions.
276
277       The following list summarizes the double-valued  options  that  can  be
278       retrieved  with  vpGetd.  The result is always a single double and dptr
279       should point to a single double location.
280
281       VP_MIN_VOXEL_OPACITY
282              Get the minimum opacity threshold (see vpSeti(3)).
283
284       VP_DEPTH_CUE_FRONT
285              Get the front depth cueing factor (see vpSetDepthCueing(3)).
286
287       VP_DEPTH_CUE_DENSITY
288              Get the depth cueing density (see vpSetDepthCueing(3)).
289
290       VP_DEPTH_CUE_QUANTIZATION
291              Get the depth cueing quantization (see vpSetDepthCueing(3)).
292
293       VP_MAX_RAY_OPACITY
294              Get the maximum opacity threshold (see vpSeti(3)).
295
296       The following list summarizes the pointer-valued options  that  can  be
297       retrieved  with vpGetp.  Unless otherwise noted, the result is a single
298       pointer and pptr should point to a single pointer location.
299
300       VP_VOXEL_DATA
301              Get a pointer to the 3D voxel array.
302
303       VP_CLASSIFY_TABLES
304              Get pointers to each of the lookup tables for the opacity trans‐
305              fer  function.  pptr must point to an array of pointers contain‐
306              ing one entry for each  table  (use  VP_CLASSIFY_FIELD_COUNT  to
307              determine  the number of tables, which is equal to the number of
308              arguments to the opacity transfer function).
309
310       VP_SHADE_FUNC
311              Get the shading callback function (see vpSetLookupShader(3)).
312
313       VP_SHADE_COLOR_TABLE
314              Get a pointer to the shading lookup table for colors (see vpSet‐
315              LookupShader(3)).
316
317       VP_SHADE_WEIGHT_TABLE
318              Get  a  pointer  to  the  shading  lookup table for weights (see
319              vpSetLookupShader(3)).
320
321       VP_IMAGE
322              Get a pointer to the output image array (see vpSetImage(3)).
323
324       VP_LOG_ALLOC_FUNC
325              Get a pointer to the  memory  allocator  logging  function  (see
326              vpSetCallback(3)).
327
328       VP_LOG_FREE_FUNC
329              Get  a  pointer  to the memory deallocator logging function (see
330              vpSetCallback(3)).
331
332       VP_STATUS_FUNC
333              Get a pointer to the status reporting function  (see  vpSetCall‐
334              back(3)).
335
336       VP_READ_FUNC
337              Get  a  pointer  to  the  file I/O read function (see vpSetCall‐
338              back(3)).
339
340       VP_WRITE_FUNC
341              Get a pointer to the file I/O  write  function  (see  vpSetCall‐
342              back(3)).
343
344       VP_MMAP_FUNC
345              Get  a  pointer  to  the  file  I/O memory mapping function (see
346              vpSetCallback(3)).
347
348       VP_CLIENT_DATA
349              Get a pointer to the client data (see vpSetClientData(3)).
350
351       VP_SHADOW_COLOR_TABLE
352              Get a pointer to the shading lookup  table  for  shadowed  color
353              values (see vpSetShadowLookupShader(3)).
354

ERRORS

356       The  normal  return  value is VP_OK.  The following error return values
357       are possible:
358
359       VPERROR_BAD_OPTION
360              The option argument is invalid.
361
362       VPERROR_SINGULAR
363              One of the current view  transformation  matrices  is  singular.
364              (Only  possible  for  options  that  depend  on the current view
365              transformation).
366

SEE ALSO

368       VolPack(3), vpCreateContext(3), vpSeti(3)
369
370
371
372VolPack                                                              vpGeti(3)
Impressum