vpGeti(3)
โจ vpGeti(3) โ get the value of an option โจ
okay bestie, so this is from the Library Functions Manual and it's literally your getter squad for VolPack rendering contexts. We're talking vpGeti, vpGetd, and vpGetp โ three functions that let you peek at integer, double, and pointer state variables. It's giving "tell me what my context is thinking" energy. ๐
๐ธ NAME ๐ธ
vpGeti, vpGetd, vpGetp โ get the value of an option. That's it. That's the whole vibe. ๐
๐ฆ 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. It's your main character, the whole rendering setup. ๐optionโ Constant that specifies the option to be retrieved. Like, which setting are we snooping on? ๐iptrโ Location to store an integer result. Bestie, the int goes here. ๐dptrโ Location to store a double result. The double goes here. โจpptrโ Location to store a pointer result. The pointer goes here. ๐ซถ
๐ DESCRIPTION ๐
These functions are used to get the values of integer-, double- or pointer-valued state variables in a rendering context. So like, they're the read-only besties to your vpSet* functions. No cap. ๐ง
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 โ it's a vpResult, okay? Unless otherwise noted, the result is a single integer and iptr should point to a single integer location.
๐งฎ Integer-valued options (for vpGeti) ๐งฎ
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.
๐ง Double-valued options (for 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)).
๐ Pointer-valued options (for 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)).
โจ OPTIONS โจ
okay bestie, so these are the option arguments you can pass to vpGeti to get all sorts of pointers and stuff. each one is a whole vibe, let's go:
VP_IMAGEโ grabs you a pointer to the output image array, no cap (peepvpSetImage(3)for the tea).VP_LOG_ALLOC_FUNCโ gets a pointer to the memory allocator logging function, periodt (seevpSetCallback(3)).VP_LOG_FREE_FUNCโ gets a pointer to the memory deallocator logging function, fr fr (seevpSetCallback(3)).VP_STATUS_FUNCโ gets a pointer to the status reporting function, lowkey useful (seevpSetCallback(3)).VP_READ_FUNCโ gets a pointer to the file I/O read function, iykyk (seevpSetCallback(3)).VP_WRITE_FUNCโ gets a pointer to the file I/O write function, slay (seevpSetCallback(3)).VP_MMAP_FUNCโ gets a pointer to the file I/O memory mapping function, highkey important (seevpSetCallback(3)).VP_CLIENT_DATAโ gets a pointer to the client data, bestie (seevpSetClientData(3)).VP_SHADOW_COLOR_TABLEโ gets a pointer to the shading lookup table for shadowed color values, iconic (seevpSetShadowLookupShader(3)).
๐ญ ERRORS ๐ญ
so like, the normal return value is VP_OK, that's the good ending. but sometimes things go sideways and you get these error return values:
VPERROR_BAD_OPTIONโ the option argument is invalid, oop ๐VPERROR_SINGULARโ one of the current view transformation matrices is singular. (Only possible for options that depend on the current view transformation). that's giving math meltdown, not the vibe.
๐ SEE ALSO ๐
that's the whole page, bestie! brought to you by VolPack, manual page vpGeti(3). now go slay some graphics ๐ โจ
๐ฆ where this page comes from
- debian bookworm: libvolpack1-dev 1.0b3-9 ยท BSD-3-Clause
- debian trixie: libvolpack1-dev 1.0b3-10 ยท BSD-3-Clause
- ubuntu jammy: libvolpack1-dev 1.0b3-9 ยท BSD-3-Clause
- ubuntu noble: libvolpack1-dev 1.0b3-9.1 ยท BSD-3-Clause
- ubuntu questing: libvolpack1-dev 1.0b3-11
- ubuntu resolute: libvolpack1-dev 1.0b3-11build1 ยท BSD-3-Clause
- ubuntu stonking: libvolpack1-dev 1.0b3-11build1 ยท BSD-3-Clause
- Copyright (c) 1994 The Board of Trustees of The Leland Stanford
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms