.\" Copyright (c) 1994 The Board of Trustees of The Leland Stanford .\" Junior University. All rights reserved. .\" .\" Permission to use, copy, modify and distribute this software and its .\" documentation for any purpose is hereby granted without fee, provided .\" that the above copyright notice and this permission notice appear in .\" all copies of this software and that you do not sell the software. .\" Commercial licensing is available by contacting the author. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTY OF ANY KIND, .\" EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY .\" WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. .\" .\" Author: .\" Phil Lacroute .\" Computer Systems Laboratory .\" Electrical Engineering Dept. .\" Stanford University .\" .\" $Date: 1994/12/31 19:49:53 $ .\" $Revision: 1.1 $ .\" .\" Macros .\" .FS -- function start .\" is return type of function .\" name and arguments follow on next line .de FS .PD 0v .PP \\$1 .HP 8 .. .\" .FA -- function arguments .\" one argument declaration follows on next line .de FA .IP " " 4 .. .\" .FE -- function end .\" end of function declaration .de FE .PD .. .\" .DS -- display start .de DS .IP " " 4 .. .\" .DE -- display done .de DE .LP .. .TH vpGeti 3 "" VolPack .SH NAME vpGeti, vpGetd, vpGetp \- get the value of an option .SH SYNOPSIS #include .sp .FS vpResult \fBvpGeti(\fIvpc, option, iptr\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIoption;\fR .FA int *\fIiptr;\fR .FE .sp .FS vpResult \fBvpGetd(\fIvpc, option, dptr\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIoption;\fR .FA double *\fIdptr;\fR .FE .sp .FS vpResult \fBvpGetp(\fIvpc, option, pptr\fB)\fR .FA vpContext *\fIvpc;\fR .FA int \fIoption;\fR .FA void *\fIpptr;\fR .FE .SH ARGUMENTS .IP \fIvpc\fR VolPack context from \fBvpCreateContext.\fR .IP \fIoption\fR Constant that specifies the option to be retrieved. .IP \fIiptr\fR Location to store an integer result. .IP \fIdptr\fR Location to store a double result. .IP \fIpptr\fR Location to store a pointer result. .SH DESCRIPTION These functions are used the get the values of integer-, double- or pointer-valued state variables in a rendering context. The following list summarizes the integer-valued options that can be retrieved with \fBvpGeti\fR. The value of the option is stored in the location given by \fIiptr;\fR the return value of \fBvpGeti\fR is not the value of the option. Unless otherwise noted, the result is a single integer and \fIiptr\fR should point to a single integer location. .IP VP_XLEN Get the length of the X dimension of the volume in voxels. .IP VP_YLEN Get the length of the Y dimension of the volume in voxels. .IP VP_ZLEN Get the length of the Y dimension of the volume in voxels. .IP VP_BYTES_PER_VOXEL Get the size of a voxel in bytes. .IP VP_VOXEL_FIELD_COUNT Get the number of fields in a voxel. .IP VP_SHADE_FIELD_COUNT Get the number of fields in a voxel used as parameters for shading the voxel. .IP VP_FIELD_SIZES Get the size of each voxel field in bytes. \fIiptr\fR must point to an array of integers containing one entry for each voxel field (use VP_VOXEL_FIELD_COUNT to determine the number of fields). .IP VP_FIELD_OFFSETS Get the byte offset from the beginning of a voxel for each voxel field. \fIiptr\fR must point to an array of integers containing one entry for each voxel field (use VP_VOXEL_FIELD_COUNT to determine the number of fields). .IP VP_FIELD_MAXES Get the maximum value of the quantity stored in each voxel field. \fIiptr\fR must point to an array of integers containing one entry for each voxel field (use VP_VOXEL_FIELD_COUNT to determine the number of fields). .IP VP_VOXEL_DATA_SIZE Get the size (in bytes) of the 3D voxel array. .IP VP_VOXEL_XSTRIDE Get the stride (in bytes) for the X dimension of the 3D voxel array. .IP VP_VOXEL_YSTRIDE Get the stride (in bytes) for the Y dimension of the 3D voxel array. .IP VP_VOXEL_ZSTRIDE Get the stride (in bytes) for the Z dimension of the 3D voxel array. .IP VP_CLASSIFY_FIELD_COUNT Get the number of fields in a voxel used as parameters for classifying the voxel (the number of arguments to the opacity transfer function). .IP VP_CLASSIFY_FIELDS Get the field numbers for the arguments to the opacity transfer function. \fIiptr\fR must point to an array of integers containing one entry for each argument (use VP_CLASSIFY_FIELD_COUNT to determine the number of arguments). .IP VP_CLASSIFY_TABLE_SIZES Get the size (in bytes) of each lookup table used for the opacity transfer function. \fIiptr\fR must point to an array of integers containing one entry for each lookup table (use VP_CLASSIFY_FIELD_COUNT to determine the number of lookup tables, which equals the number of arguments to the opacity transfer function). .IP VP_COLOR_CHANNELS Get the number of color channels that the current shading lookup tables or shading callback function will produce. .IP VP_SHADE_COLOR_SIZE Get the size of the shading lookup table for color values (see vpSetLookupShader(3)). .IP VP_SHADE_WEIGHT_SIZE Get the size of the shading lookup table for weight values (see vpSetLookupShader(3)). .IP VP_MATERIAL_COUNT Get the number of material types used by the current lookup shader (see vpSetLookupShader(3)). .IP VP_SHADE_COLOR_FIELD Get the field number used for indexing the shading lookup table for color values (see vpSetLookupShader(3)). .IP VP_SHADE_WEIGHT_FIELD Get the field number used for indexing the shading lookup table for weight values (see vpSetLookupShader(3)). .IP VP_LIGHT0 .PD 0 .IP VP_LIGHT1 .IP VP_LIGHT2 .IP VP_LIGHT3 .IP VP_LIGHT4 .IP VP_LIGHT5 The retrieved value is nonzero if the corresponding light is enabled, or 0 if it is disabled. .PD .IP VP_LIGHT_BOTH_SIDES The retrieved value is nonzero if two-sided lighting is enabled (see vpSetLight(3)), or 0 if it is disabled. .IP VP_REVERSE_SURFACE_SIDES The retrieved value is nonzero if the definitions of interior and exterior surfaces have been reversed (see vpSetMaterial(3)), or 0 if they have not. .IP VP_DEPTH_CUE The retrieved value is nonzero if depth cueing is enabled, or 0 if it is disabled. .IP VP_DEPTH_CUE_TABLE_SIZE Get the current number of entries in the depth cueing table (see vpSetDepthCueing(3)). .IP VP_DEPTH_CUE_SIZE_HINT Get the current hint for the number of entries in the depth cueing table (see vpSetDepthCueing(3)). .IP VP_CURRENT_MATRIX Get the identifier for the current transformation matrix (VP_MODEL, VP_VIEW or VP_PROJECT). .IP VP_CONCAT_MODE Get the identifier for the current matrix concatenation mode (VP_CONCAT_LEFT or VP_CONCAT_RIGHT). .IP VP_IMAGE_WIDTH Get the width (in pixels) of the output image array. .IP VP_IMAGE_HEIGHT Get the height (in pixels) of the output image array. .IP VP_IMAGE_SCAN_SIZE Get the number bytes per scanline in the output image array. .IP VP_VIEW_AXIS Get the identifier for the current major viewing axis in the object coordinate system (VP_X_AXIS, VP_Y_AXIS or VP_Z_AXIS). The axis depends on the viewing transformation. .IP VP_INTERMEDIATE_WIDTH Get the width (in pixels) of the intermediate image required to render the current volume with the current viewing transformation (see vpRenderRawVolume(3)). .IP VP_INTERMEDIATE_HEIGHT Get the height (in pixels) of the intermediate image required to render the current volume with the current viewing transformation (see vpRenderRawVolume(3)). .IP VP_INTERMEDIATE_COLOR Get the number of color channels in the intermediate image (see vpRenderRawVolume(3)). .IP VP_INT_WIDTH_HINT Get the current hint for the width (in pixels) of the intermediate image (see vpRenderRawVolume(3)). .IP VP_INT_HEIGHT_HINT Get the current hint for the height (in pixels) of the intermediate image (see vpRenderRawVolume(3)). .IP VP_VIEW_X_AXIS .PD 0 .IP VP_VIEW_Y_AXIS .IP VP_VIEW_Z_AXIS The retrieved value is non-zero if computing a preclassified volume for the corresponding major viewing axis is enabled (see vpClassifyVolume(3)). .PD .IP VP_VIEW_X_SIZE .PD 0 .IP VP_VIEW_Y_SIZE .IP VP_VIEW_Z_SIZE Get the size (in bytes) of the preclassified volume for the corresponding major viewing axis. .PD .IP VP_MMOCTREE_THRESHOLDS Get the current min-max octree range thresholds. \fIiptr\fR must point to an array of integers containing one entry for each threshold (use VP_CLASSIFY_FIELD_COUNT to determine the number of thresholds, which equals the number of arguments to the opacity transfer function). .IP VP_MMOCTREE_SIZE Get the size (in bytes) of the min-max octree. .IP VP_SHADOW The retrieved value is nonzero if shadows are enabled (see vpSetShadowLookupShader(3)). .IP VP_SHADOW_LIGHT Get the constant (e.g. VP_LIGHT0) associated with the current shadow light (see vpSetShadowLookupShader(3)). .IP VP_SHADOW_WIDTH_HINT Get the current hint for the width (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)). .IP VP_SHADOW_HEIGHT_HINT Get the current hint for the height (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)). .IP VP_SHADOW_COLOR_SIZE Get the size of the shading lookup table for shadowed color values (see vpSetShadowLookupShader(3)). .IP VP_SHADOW_BIAS Get the current shadow bias value (see vpSetShadowLookupShader(3)). .IP VP_PIXEL_TYPE Get the current image pixel type (see vpSetImage(3)). .IP VP_CLAMP_SHADE_TABLE The retrieved value is nonzero if clamping is enabled for shade table entries, or 0 if it is disabled (see vpShadeTable(3)). .IP VP_COMPOSITE_ORDER This value is used for debugging only. It returns 1 if the current major viewing axis (VP_VIEW_AXIS) points in the same direction as the viewing direction, or -1 if they point in opposite directions. .PP The following list summarizes the double-valued options that can be retrieved with \fBvpGetd\fR. The result is always a single double and \fIdptr\fR should point to a single double location. .IP VP_MIN_VOXEL_OPACITY Get the minimum opacity threshold (see vpSeti(3)). .IP VP_DEPTH_CUE_FRONT Get the front depth cueing factor (see vpSetDepthCueing(3)). .IP VP_DEPTH_CUE_DENSITY Get the depth cueing density (see vpSetDepthCueing(3)). .IP VP_DEPTH_CUE_QUANTIZATION Get the depth cueing quantization (see vpSetDepthCueing(3)). .IP VP_MAX_RAY_OPACITY Get the maximum opacity threshold (see vpSeti(3)). .PP The following list summarizes the pointer-valued options that can be retrieved with \fBvpGetp\fR. Unless otherwise noted, the result is a single pointer and \fIpptr\fR should point to a single pointer location. .IP VP_VOXEL_DATA Get a pointer to the 3D voxel array. .IP VP_CLASSIFY_TABLES Get pointers to each of the lookup tables for the opacity transfer function. \fIpptr\fR must point to an array of pointers containing one entry for each table (use VP_CLASSIFY_FIELD_COUNT to determine the number of tables, which is equal to the number of arguments to the opacity transfer function). .IP VP_SHADE_FUNC Get the shading callback function (see vpSetLookupShader(3)). .IP VP_SHADE_COLOR_TABLE Get a pointer to the shading lookup table for colors (see vpSetLookupShader(3)). .IP VP_SHADE_WEIGHT_TABLE Get a pointer to the shading lookup table for weights (see vpSetLookupShader(3)). .IP VP_IMAGE Get a pointer to the output image array (see vpSetImage(3)). .IP VP_LOG_ALLOC_FUNC Get a pointer to the memory allocator logging function (see vpSetCallback(3)). .IP VP_LOG_FREE_FUNC Get a pointer to the memory deallocator logging function (see vpSetCallback(3)). .IP VP_STATUS_FUNC Get a pointer to the status reporting function (see vpSetCallback(3)). .IP VP_READ_FUNC Get a pointer to the file I/O read function (see vpSetCallback(3)). .IP VP_WRITE_FUNC Get a pointer to the file I/O write function (see vpSetCallback(3)). .IP VP_MMAP_FUNC Get a pointer to the file I/O memory mapping function (see vpSetCallback(3)). .IP VP_CLIENT_DATA Get a pointer to the client data (see vpSetClientData(3)). .IP VP_SHADOW_COLOR_TABLE Get a pointer to the shading lookup table for shadowed color values (see vpSetShadowLookupShader(3)). .SH ERRORS The normal return value is VP_OK. The following error return values are possible: .IP VPERROR_BAD_OPTION The \fIoption\fR argument is invalid. .IP VPERROR_SINGULAR One of the current view transformation matrices is singular. (Only possible for options that depend on the current view transformation). .SH SEE ALSO VolPack(3), vpCreateContext(3), vpSeti(3)