vpGeti(3)

NAME
vpGeti, vpGetd, vpGetp, vpGetCallbackp - get the value of an option

SYNOPSIS
#include <volpack.h>

vpGeti(vpc, option, iptr) vpContext *vpc; int option; int *iptr;

vpGetd(vpc, option, dptr) vpContext *vpc; int option; double *dptr;

vpGetp(vpc, option, pptr) vpContext *vpc; int option; void *pptr;

vpGetCallbackp(vpc, option, pptr) vpContext *vpc; int option; void (**fptr)();

ARGUMENTS

vpc VolPack context from vpCreateContext.

option
    Constant that specifies the option to be retrieved.

iptr
    Location to store an integer result.

dptr
    Location to store a double result.

pptr
    Location to store a pointer result.

fptr
    Location to store a function pointer result.

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 vpGeti. The value of the option is stored in the location given by iptr; the return value of vpGeti is not the value of the option. Unless otherwise noted, the result is a single integer and iptr should point to a single integer location.

VP_XLEN
    Get the length of the X dimension of the volume in voxels.

VP_YLEN
    Get the length of the Y dimension of the volume in voxels.

VP_ZLEN
    Get the length of the Y dimension of the volume in voxels.

VP_BYTES_PER_VOXEL
    Get the size of a voxel in bytes.

VP_VOXEL_FIELD_COUNT
    Get the number of fields in a voxel.

VP_SHADE_FIELD_COUNT
    Get the number of fields in a voxel used as parameters for shading the voxel.

VP_FIELD_SIZES
    Get the size of each voxel field in bytes. iptr 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).

VP_FIELD_OFFSETS
    Get the byte offset from the beginning of a voxel for each voxel field. iptr 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).

VP_FIELD_MAXES
    Get the maximum value of the quantity stored in each voxel field. iptr 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).

VP_VOXEL_DATA_SIZE
    Get the size (in bytes) of the 3D voxel array.

VP_VOXEL_XSTRIDE
    Get the stride (in bytes) for the X dimension of the 3D voxel array.

VP_VOXEL_YSTRIDE
    Get the stride (in bytes) for the Y dimension of the 3D voxel array.

VP_VOXEL_ZSTRIDE
    Get the stride (in bytes) for the Z dimension of the 3D voxel array.

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).

VP_CLASSIFY_FIELDS
    Get the field numbers for the arguments to the opacity transfer function. iptr must point to an array of integers containing one entry for each argument (use VP_CLASSIFY_FIELD_COUNT to determine the number of arguments).

VP_CLASSIFY_TABLE_SIZES
    Get the size (in bytes) of each lookup table used for the opacity transfer function. iptr 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).

VP_COLOR_CHANNELS
    Get the number of color channels that the current shading lookup tables or shading callback function will produce.

VP_SHADE_COLOR_SIZE
    Get the size of the shading lookup table for color values (see vpSetLookupShader(3)).

VP_SHADE_WEIGHT_SIZE
    Get the size of the shading lookup table for weight values (see vpSetLookupShader(3)).

VP_MATERIAL_COUNT
    Get the number of material types used by the current lookup shader (see vpSetLookupShader(3)).

VP_SHADE_COLOR_FIELD
    Get the field number used for indexing the shading lookup table for color values (see vpSetLookupShader(3)).

VP_SHADE_WEIGHT_FIELD
    Get the field number used for indexing the shading lookup table for weight values (see vpSetLookupShader(3)).

VP_LIGHT0
VP_LIGHT1
VP_LIGHT2
VP_LIGHT3
VP_LIGHT4
VP_LIGHT5
    The retrieved value is nonzero if the corresponding light is enabled, or 0 if it is disabled.

VP_LIGHT_BOTH_SIDES
    The retrieved value is nonzero if two-sided lighting is enabled (see vpSetLight(3)), or 0 if it is disabled.

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.

VP_DEPTH_CUE
    The retrieved value is nonzero if depth cueing is enabled, or 0 if it is disabled.

VP_DEPTH_CUE_TABLE_SIZE
    Get the current number of entries in the depth cueing table (see vpSetDepthCueing(3)).

VP_DEPTH_CUE_SIZE_HINT
    Get the current hint for the number of entries in the depth cueing table (see vpSetDepthCueing(3)).

VP_CURRENT_MATRIX
    Get the identifier for the current transformation matrix (VP_MODEL, VP_VIEW or VP_PROJECT).

VP_CONCAT_MODE
    Get the identifier for the current matrix concatenation mode (VP_CONCAT_LEFT or VP_CONCAT_RIGHT).

VP_IMAGE_WIDTH
    Get the width (in pixels) of the output image array.

VP_IMAGE_HEIGHT
    Get the height (in pixels) of the output image array.

VP_IMAGE_SCAN_SIZE
    Get the number bytes per scanline in the output image array.

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.

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)).

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)).

VP_INTERMEDIATE_COLOR
    Get the number of color channels in the intermediate image (see vpRenderRawVolume(3)).

VP_INT_WIDTH_HINT
    Get the current hint for the width (in pixels) of the intermediate image (see vpRenderRawVolume(3)).

VP_INT_HEIGHT_HINT
    Get the current hint for the height (in pixels) of the intermediate image (see vpRenderRawVolume(3)).

VP_VIEW_X_AXIS
VP_VIEW_Y_AXIS
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)).

VP_VIEW_X_SIZE
VP_VIEW_Y_SIZE
VP_VIEW_Z_SIZE
    Get the size (in bytes) of the preclassified volume for the corresponding major viewing axis.

VP_MMOCTREE_THRESHOLDS
    Get the current min-max octree range thresholds. iptr 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).

VP_MMOCTREE_SIZE
    Get the size (in bytes) of the min-max octree.

VP_SHADOW
    The retrieved value is nonzero if shadows are enabled (see vpSetShadowLookupShader(3)).

VP_SHADOW_LIGHT
    Get the constant (e.g. VP_LIGHT0) associated with the current shadow light (see vpSetShadowLookupShader(3)).

VP_SHADOW_WIDTH_HINT
    Get the current hint for the width (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)).

VP_SHADOW_HEIGHT_HINT
    Get the current hint for the height (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)).

VP_SHADOW_COLOR_SIZE
    Get the size of the shading lookup table for shadowed color values (see vpSetShadowLookupShader(3)).

VP_SHADOW_BIAS
    Get the current shadow bias value (see vpSetShadowLookupShader(3)).

VP_PIXEL_TYPE
    Get the current image pixel type (see vpSetImage(3)).

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)).

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.

The following list summarizes the double-valued options that can be retrieved with vpGetd. The result is always a single double and dptr should point to a single double location.

VP_MIN_VOXEL_OPACITY
    Get the minimum opacity threshold (see vpSeti(3)).

VP_DEPTH_CUE_FRONT
    Get the front depth cueing factor (see vpSetDepthCueing(3)).

VP_DEPTH_CUE_DENSITY
    Get the depth cueing density (see vpSetDepthCueing(3)).

VP_DEPTH_CUE_QUANTIZATION
    Get the depth cueing quantization (see vpSetDepthCueing(3)).

VP_MAX_RAY_OPACITY
    Get the maximum opacity threshold (see vpSeti(3)).

The following list summarizes the pointer-valued options that can be retrieved with vpGetp. Unless otherwise noted, the result is a single pointer and pptr should point to a single pointer location.

VP_VOXEL_DATA
    Get a pointer to the 3D voxel array.

VP_CLASSIFY_TABLES
    Get pointers to each of the lookup tables for the opacity transfer function. pptr 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).

VP_SHADE_COLOR_TABLE
    Get a pointer to the shading lookup table for colors (see vpSetLookupShader(3)).

VP_SHADE_WEIGHT_TABLE
    Get a pointer to the shading lookup table for weights (see vpSetLookupShader(3)).

VP_IMAGE
    Get a pointer to the output image array (see vpSetImage(3)).

VP_CLIENT_DATA
    Get a pointer to the client data (see vpSetClientData(3)).

VP_SHADOW_COLOR_TABLE
    Get a pointer to the shading lookup table for shadowed color values (see vpSetShadowLookupShader(3)).

The following list summarizes the function pointer-valued options that can be retrieved with vpGetCallbackp. Unless otherwise noted, the result is a single pointer and fptr should point to a single pointer location.

VP_SHADE_FUNC
    Get the shading callback function (see vpSetLookupShader(3)).

VP_LOG_ALLOC_FUNC
    Get a pointer to the memory allocator logging function (see vpSetCallback(3)).

VP_LOG_FREE_FUNC
    Get a pointer to the memory deallocator logging function (see vpSetCallback(3)).

VP_READ_FUNC
    Get a pointer to the file I/O read function (see vpSetCallback(3)).

VP_WRITE_FUNC
    Get a pointer to the file I/O write function (see vpSetCallback(3)).

VP_MMAP_FUNC
    Get a pointer to the file I/O memory mapping function (see vpSetCallback(3)).

ERRORS
The normal return value is VP_OK. The following error return values are possible:

VPERROR_BAD_OPTION
    The option argument is invalid.

VPERROR_SINGULAR
    One of the current view transformation matrices is singular. (Only possible for options that depend on the current view transformation).

SEE ALSO
VolPack(3), vpCreateContext(3), vpSeti(3)