vpSeti(3)
β¨ vpSeti(3) β¨ β bestie, we're setting option values today π
okay so real quick: this is the vpSeti(3) page from the Library Functions Manual, and it's genuinely one of the most useful little gremlins in VolPack. let's get into it π«Ά
πΈ NAME πΈ
vpSeti, vpSetd β set the value of an option
no cap, that's literally the whole job. you got an option? you got a value? you're about to be so set. β¨
π SYNOPSIS π
#include <volpack.h>
vpResult
vpSeti(vpc, option, value)
vpContext *vpc;
int option;
int value;
vpResult
vpSetd(vpc, option, value)
vpContext *vpc;
int option;
double value;
π¦ ARGUMENTS π¦
vpcβ your VolPack context, the one you got fromvpCreateContext. it's the main character fr.optionβ a constant that says which option we're setting. pick your fighter πvalueβ the new value for that option. glow up time.
π DESCRIPTION π
so these two functions are how you set integer-valued or double-valued options inside a rendering context. that's it, that's the vibe. one of them takes ints, one of them takes doubles, and yes you have to use the right one, bestie, i'm sorry π
the ints: things you set with vpSeti π
VP_CONCAT_MODEβ chooses whether transformation matrices get premultiplied or postmultiplied. if value isVP_CONCAT_LEFTthen matrices are premultiplied. if value isVP_CONCAT_RIGHTthen matrices are postmultiplied. Default:VP_CONCAT_RIGHT.VP_DEPTH_CUE_SIZE_HINTβ sets the suggested number of entries in the depth cueing lookup table. seevpSetDepthCueing(3). Default: noneVP_INT_WIDTH_HINTβ sets the suggested width (in pixels) of the intermediate image work buffer. seevpRenderRawVolume(3). Default: noneVP_INT_HEIGHT_HINTβ sets the suggested height (in pixels) of the intermediate image work buffer. seevpRenderRawVolume(3). Default: noneVP_SHADOW_LIGHTβ gets the current shadow light (seevpSetShadowLookupShader(3)). legal values areVP_LIGHT0,VP_LIGHT1, ...,VP_LIGHT5. Default:VP_LIGHT0VP_SHADOW_WIDTH_HINTβ sets the suggested width (in pixels) of the shadow buffer (seevpSetShadowLookupShader(3)). Default: noneVP_SHADOW_HEIGHT_HINTβ sets the suggested height (in pixels) of the shadow buffer (seevpSetShadowLookupShader(3)). Default: noneVP_SHADOW_BIASβ sets the current shadow bias value (seevpSetShadowLookupShader(3)). the value is an integral distance in units of voxels. Default: 4VP_AXIS_OVERRIDEβ forces the rendering routine to composite along a particular principle viewing axis, no matter what the current viewing direction is. legal values areVP_X_AXIS,VP_Y_AXISorVP_Z_AXIS. set the value toVP_NO_AXISand VolPack will pick the optimal axis for you automatically (which is the default). this option is normally only used for debugging.VP_TRACE_SHADOW_Kβ when pixel tracing is on (seevpTracePixel(3)) and shadows are enabled (that's theVP_SHADOWoption tovpEnable(3)), this option picks one shadow buffer pixel to trace. the value must be a voxel slice number. the shadow buffer pixel that gets traced is the shadow pixel affecting the traced image pixel at the indicated slice.
the doubles: things you set with vpSetd π
VP_DEPTH_CUE_QUANTIZATIONβ sets the difference in depth between two adjacent entries in the depth cueing lookup table (seevpSetDepthCueing(3)). must be greater than0.0and less than1.0. Default: 1/255VP_MAX_RAY_OPACITYβ sets the maximum opacity threshold. during rendering, once a pixel's opacity hits this threshold, no more voxels get composited into that pixel. to maximize performance, keep the value as low as possible without messing up your image quality. must be in the range0.0-1.0(1.0is the default and0.95is the suggested value). Default: 1.0VP_MIN_VOXEL_OPACITYβ sets the minimum opacity threshold. during classification, if a voxel's opacity is less than or equal to this threshold, the voxel gets discarded before rendering. to maximize performance, keep the value as high as possible without messing up your image quality. must be in the range0.0-1.0(0.0is the default and0.05is the suggested value). Default: 0.0
π ERRORS π
the normal return value is VP_OK β that's the slay outcome π
these are the error return values that can pop up:
VPERROR_BAD_OPTIONβ the option argument is invalid. not a real one, bestie.VPERROR_BAD_VALUEβ the value argument is invalid or out of range. it's giving unhinged number.
π SEE ALSO π
VolPack(3), vpCreateContext(3), vpGeti(3)
π reminder:VP_AXIS_OVERRIDEis for debugging, not for your whole personality. andVP_MAX_RAY_OPACITY/VP_MIN_VOXEL_OPACITYhave real ranges (0.0-1.0) β go outside them and you're gettingVPERROR_BAD_VALUE. periodt.
okay that's the whole page, you understood it perfectly, i'm obsessed with you π β¨
this has been VolPack, vpSeti(3), from the Library Functions Manual β mwah, bye bestie π«ΆπΈ
π¦ 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