vpGeti(3)
β¨ NAME β¨
okay so bestie, this is the manual page for vpGeti(3) from the Library Functions Manual β and it's literally the trio that answers βwhatβs the value of this option?β π
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 β¨
vpcβ VolPack context fromvpCreateContext.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.
β¨ DESCRIPTION β¨
These functions are used to get the values of integer-, double- or pointer-valued state variables in a rendering context. slay. π
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.iptrmust point to an array of integers containing one entry for each voxel field (useVP_VOXEL_FIELD_COUNTto determine the number of fields).VP_FIELD_OFFSETSβ Get the byte offset from the beginning of a voxel for each voxel field.iptrmust point to an array of integers containing one entry for each voxel field (useVP_VOXEL_FIELD_COUNTto determine the number of fields).VP_FIELD_MAXESβ Get the maximum value of the quantity stored in each voxel field.iptrmust point to an array of integers containing one entry for each voxel field (useVP_VOXEL_FIELD_COUNTto 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.iptrmust point to an array of integers containing one entry for each argument (useVP_CLASSIFY_FIELD_COUNTto determine the number of arguments).VP_CLASSIFY_TABLE_SIZESβ Get the size (in bytes) of each lookup table used for the opacity transfer function.iptrmust point to an array of integers containing one entry for each lookup table (useVP_CLASSIFY_FIELD_COUNTto 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 (seevpSetLookupShader(3)).VP_SHADE_WEIGHT_SIZEβ Get the size of the shading lookup table for weight values (seevpSetLookupShader(3)).VP_MATERIAL_COUNTβ Get the number of material types used by the current lookup shader (seevpSetLookupShader(3)).VP_SHADE_COLOR_FIELDβ Get the field number used for indexing the shading lookup table for color values (seevpSetLookupShader(3)).VP_SHADE_WEIGHT_FIELDβ Get the field number used for indexing the shading lookup table for weight values (seevpSetLookupShader(3)).VP_LIGHT0β The retrieved value is nonzero if the corresponding light is enabled, or 0 if it is disabled.VP_LIGHT1β The retrieved value is nonzero if the corresponding light is enabled, or 0 if it is disabled.VP_LIGHT2β The retrieved value is nonzero if the corresponding light is enabled, or 0 if it is disabled.VP_LIGHT3β The retrieved value is nonzero if the corresponding light is enabled, or 0 if it is disabled.VP_LIGHT4β The retrieved value is nonzero if the corresponding light is enabled, or 0 if it is disabled.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 (seevpSetLight(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 (seevpSetMaterial(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 (seevpSetDepthCueing(3)).VP_DEPTH_CUE_SIZE_HINTβ Get the current hint for the number of entries in the depth cueing table (seevpSetDepthCueing(3)).VP_CURRENT_MATRIXβ Get the identifier for the current transformation matrix (VP_MODEL,VP_VIEWorVP_PROJECT).VP_CONCAT_MODEβ Get the identifier for the current matrix concatenation mode (VP_CONCAT_LEFTorVP_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_AXISorVP_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 (seevpRenderRawVolume(3)).VP_INTERMEDIATE_HEIGHTβ Get the height (in pixels) of the intermediate image required to render the current volume with the current viewing transformation (seevpRenderRawVolume(3)).VP_INTERMEDIATE_COLORβ Get the number of color channels in the intermediate image (seevpRenderRawVolume(3)).VP_INT_WIDTH_HINTβ Get the current hint for the width (in pixels) of the intermediate image (seevpRenderRawVolume(3)).VP_INT_HEIGHT_HINTβ Get the current hint for the height (in pixels) of the intermediate image (seevpRenderRawVolume(3)).VP_VIEW_X_AXISβ The retrieved value is non-zero if computing a preclassified volume for the corresponding major viewing axis is enabled (seevpClassifyVolume(3)).VP_VIEW_Y_AXISβ The retrieved value is non-zero if computing a preclassified volume for the corresponding major viewing axis is enabled (seevpClassifyVolume(3)).VP_VIEW_Z_AXISβ The retrieved value is non-zero if computing a preclassified volume for the corresponding major viewing axis is enabled (seevpClassifyVolume(3)).VP_VIEW_X_SIZEβ Get the size (in bytes) of the preclassified volume for the corresponding major viewing axis.VP_VIEW_Y_SIZEβ Get the size (in bytes) of the preclassified volume for the corresponding major viewing axis.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.iptrmust point to an array of integers containing one entry for each threshold (useVP_CLASSIFY_FIELD_COUNTto 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 (seevpSetShadowLookupShader(3)).VP_SHADOW_LIGHTβ Get the constant (e.g.VP_LIGHT0) associated with the current shadow light (seevpSetShadowLookupShader(3)).VP_SHADOW_WIDTH_HINTβ Get the current hint for the width (in pixels) of the shadow buffer (seevpSetShadowLookupShader(3)).VP_SHADOW_HEIGHT_HINTβ Get the current hint for the height (in pixels) of the shadow buffer (seevpSetShadowLookupShader(3)).VP_SHADOW_COLOR_SIZEβ Get the size of the shading lookup table for shadowed color values (seevpSetShadowLookupShader(3)).VP_SHADOW_BIASβ Get the current shadow bias value (seevpSetShadowLookupShader(3)).VP_PIXEL_TYPEβ Get the current image pixel type (seevpSetImage(3)).VP_CLAMP_SHADE_TABLEβ The retrieved value is nonzero if clamping is enabled for shade table entries, or 0 if it is disabled (seevpShadeTable(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 (seevpSeti(3)).VP_DEPTH_CUE_FRONTβ Get the front depth cueing factor (seevpSetDepthCueing(3)).VP_DEPTH_CUE_DENSITYβ Get the depth cueing density (seevpSetDepthCueing(3)).VP_DEPTH_CUE_QUANTIZATIONβ Get the depth cueing quantization (seevpSetDepthCueing(3)).VP_MAX_RAY_OPACITYβ Get the maximum opacity threshold (seevpSeti(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.pptrmust point to an array of pointers containing one entry for each table (useVP_CLASSIFY_FIELD_COUNTto determine the number of tables, which is equal to the number of arguments to the opacity transfer function).VP_SHADE_FUNCβ Get the shading callback function (seevpSetLookupShader(3)).VP_SHADE_COLOR_TABLEβ Get a pointer to the shading lookup table for colors (seevpSetLookupShader(3)).VP_SHADE_WEIGHT_TABLEβ Get a pointer to the shading lookup table for weights (seevpSetLookupShader(3)).VP_IMAGEβ hands you a pointer to the output image array, okurrr (peepvpSetImage(3)for the deets) πVP_LOG_ALLOC_FUNCβ drops a pointer to the memory allocator logging function (seevpSetCallback(3)) β¨VP_LOG_FREE_FUNCβ gives you a pointer to the memory deallocator logging function (seevpSetCallback(3)) πVP_STATUS_FUNCβ pointer to the status reporting function, coming right up (seevpSetCallback(3)) π¦VP_READ_FUNCβ pointer to the file I/O read function (seevpSetCallback(3)) πΈVP_WRITE_FUNCβ pointer to the file I/O write function (seevpSetCallback(3)) πVP_MMAP_FUNCβ pointer to the file I/O memory mapping function (seevpSetCallback(3)) π«ΆVP_CLIENT_DATAβ pointer to the client data (seevpSetClientData(3)) πVP_SHADOW_COLOR_TABLEβ pointer to the shading lookup table for shadowed color values (seevpSetShadowLookupShader(3)) π₯
π ERRORS π
So the normal return value is VP_OK, bestie β that's the good timeline, the slay, the no-notes situation π
But sometimes it's giving chaos, and these error return values can show up instead:
VPERROR_BAD_OPTIONβ the option argument is invalid. Like, it just doesn't pass the vibe check, ngl πVPERROR_SINGULARβ one of the current view transformation matrices is singular π (this one's only possible for options that depend on the current view transformation, so like, specific queen behavior only)
π SEE ALSO π
VolPack(3), vpCreateContext(3), vpSeti(3) β go read those too, fr fr, they're the whole friend group π«Ά
and that's the whole page, babe π this iconic lil number is brought to you by VolPack, filed under vpGeti(3) β stan, bookmark it, live laugh love, periodt β¨π
π¦ where this page comes from
- fedora 43: volpack 1.0c7-35.fc43 Β· BSD-3-Clause
- fedora 43: volpack 1.0c7-35.fc43 Β· BSD-3-Clause
- fedora 44: volpack 1.0c7-36.fc44 Β· BSD-3-Clause
- fedora 44: volpack 1.0c7-36.fc44 Β· BSD-3-Clause
- Copyright (c) 1995-2008, Stanford University
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms