Scroll to navigation

vpGeti(3) Library Functions Manual vpGeti(3)

NAME

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

SYNOPSIS

#include <volpack.h>

vpResult

vpGeti(vpc, option, iptr)

vpContext *vpc;
int option;
int *iptr;

vpResult

vpGetd(vpc, option, dptr)

vpContext *vpc;
int option;
double *dptr;

vpResult

vpGetp(vpc, option, pptr)

vpContext *vpc;
int option;
void *pptr;

ARGUMENTS

VolPack context from vpCreateContext.
Constant that specifies the option to be retrieved.
Location to store an integer result.
Location to store a double result.
Location to store a 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.

Get the length of the X dimension of the volume in voxels.
Get the length of the Y dimension of the volume in voxels.
Get the length of the Y dimension of the volume in voxels.
Get the size of a voxel in bytes.
Get the number of fields in a voxel.
Get the number of fields in a voxel used as parameters for shading the voxel.
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).
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).
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).
Get the size (in bytes) of the 3D voxel array.
Get the stride (in bytes) for the X dimension of the 3D voxel array.
Get the stride (in bytes) for the Y dimension of the 3D voxel array.
Get the stride (in bytes) for the Z dimension of the 3D voxel array.
Get the number of fields in a voxel used as parameters for classifying the voxel (the number of arguments to the opacity transfer function).
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).
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).
Get the number of color channels that the current shading lookup tables or shading callback function will produce.
Get the size of the shading lookup table for color values (see vpSetLookupShader(3)).
Get the size of the shading lookup table for weight values (see vpSetLookupShader(3)).
Get the number of material types used by the current lookup shader (see vpSetLookupShader(3)).
Get the field number used for indexing the shading lookup table for color values (see vpSetLookupShader(3)).
Get the field number used for indexing the shading lookup table for weight values (see vpSetLookupShader(3)).
The retrieved value is nonzero if the corresponding light is enabled, or 0 if it is disabled.
The retrieved value is nonzero if two-sided lighting is enabled (see vpSetLight(3)), or 0 if it is disabled.
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.
The retrieved value is nonzero if depth cueing is enabled, or 0 if it is disabled.
Get the current number of entries in the depth cueing table (see vpSetDepthCueing(3)).
Get the current hint for the number of entries in the depth cueing table (see vpSetDepthCueing(3)).
Get the identifier for the current transformation matrix (VP_MODEL, VP_VIEW or VP_PROJECT).
Get the identifier for the current matrix concatenation mode (VP_CONCAT_LEFT or VP_CONCAT_RIGHT).
Get the width (in pixels) of the output image array.
Get the height (in pixels) of the output image array.
Get the number bytes per scanline in the output image array.
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.
Get the width (in pixels) of the intermediate image required to render the current volume with the current viewing transformation (see vpRenderRawVolume(3)).
Get the height (in pixels) of the intermediate image required to render the current volume with the current viewing transformation (see vpRenderRawVolume(3)).
Get the number of color channels in the intermediate image (see vpRenderRawVolume(3)).
Get the current hint for the width (in pixels) of the intermediate image (see vpRenderRawVolume(3)).
Get the current hint for the height (in pixels) of the intermediate image (see vpRenderRawVolume(3)).
The retrieved value is non-zero if computing a preclassified volume for the corresponding major viewing axis is enabled (see vpClassifyVolume(3)).
Get the size (in bytes) of the preclassified volume for the corresponding major viewing axis.
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).
Get the size (in bytes) of the min-max octree.
The retrieved value is nonzero if shadows are enabled (see vpSetShadowLookupShader(3)).
Get the constant (e.g. VP_LIGHT0) associated with the current shadow light (see vpSetShadowLookupShader(3)).
Get the current hint for the width (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)).
Get the current hint for the height (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)).
Get the size of the shading lookup table for shadowed color values (see vpSetShadowLookupShader(3)).
Get the current shadow bias value (see vpSetShadowLookupShader(3)).
Get the current image pixel type (see vpSetImage(3)).
The retrieved value is nonzero if clamping is enabled for shade table entries, or 0 if it is disabled (see vpShadeTable(3)).
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.

Get the minimum opacity threshold (see vpSeti(3)).
Get the front depth cueing factor (see vpSetDepthCueing(3)).
Get the depth cueing density (see vpSetDepthCueing(3)).
Get the depth cueing quantization (see vpSetDepthCueing(3)).
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.

Get a pointer to the 3D voxel array.
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).
Get the shading callback function (see vpSetLookupShader(3)).
Get a pointer to the shading lookup table for colors (see vpSetLookupShader(3)).
Get a pointer to the shading lookup table for weights (see vpSetLookupShader(3)).
Get a pointer to the output image array (see vpSetImage(3)).
Get a pointer to the memory allocator logging function (see vpSetCallback(3)).
Get a pointer to the memory deallocator logging function (see vpSetCallback(3)).
Get a pointer to the status reporting function (see vpSetCallback(3)).
Get a pointer to the file I/O read function (see vpSetCallback(3)).
Get a pointer to the file I/O write function (see vpSetCallback(3)).
Get a pointer to the file I/O memory mapping function (see vpSetCallback(3)).
Get a pointer to the client data (see vpSetClientData(3)).
Get a pointer to the shading lookup table for shadowed color values (see vpSetShadowLookupShader(3)).

ERRORS

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

The option argument is invalid.
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)

VolPack