vpSeti(3)

πŸ“¦ version 1.0c7, in fedora 43, fedora 44

✨ 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 from vpCreateContext. 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 is VP_CONCAT_LEFT then matrices are premultiplied. if value is VP_CONCAT_RIGHT then matrices are postmultiplied. Default: VP_CONCAT_RIGHT.
  • VP_DEPTH_CUE_SIZE_HINT β€” sets the suggested number of entries in the depth cueing lookup table. see vpSetDepthCueing(3). Default: none
  • VP_INT_WIDTH_HINT β€” sets the suggested width (in pixels) of the intermediate image work buffer. see vpRenderRawVolume(3). Default: none
  • VP_INT_HEIGHT_HINT β€” sets the suggested height (in pixels) of the intermediate image work buffer. see vpRenderRawVolume(3). Default: none
  • VP_SHADOW_LIGHT β€” gets the current shadow light (see vpSetShadowLookupShader(3)). legal values are VP_LIGHT0, VP_LIGHT1, ..., VP_LIGHT5. Default: VP_LIGHT0
  • VP_SHADOW_WIDTH_HINT β€” sets the suggested width (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)). Default: none
  • VP_SHADOW_HEIGHT_HINT β€” sets the suggested height (in pixels) of the shadow buffer (see vpSetShadowLookupShader(3)). Default: none
  • VP_SHADOW_BIAS β€” sets the current shadow bias value (see vpSetShadowLookupShader(3)). the value is an integral distance in units of voxels. Default: 4
  • VP_AXIS_OVERRIDE β€” forces the rendering routine to composite along a particular principle viewing axis, no matter what the current viewing direction is. legal values are VP_X_AXIS, VP_Y_AXIS or VP_Z_AXIS. set the value to VP_NO_AXIS and 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 (see vpTracePixel(3)) and shadows are enabled (that's the VP_SHADOW option to vpEnable(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 (see vpSetDepthCueing(3)). must be greater than 0.0 and less than 1.0. Default: 1/255
  • VP_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 range 0.0-1.0 (1.0 is the default and 0.95 is the suggested value). Default: 1.0
  • VP_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 range 0.0-1.0 (0.0 is the default and 0.05 is 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_OVERRIDE is for debugging, not for your whole personality. and VP_MAX_RAY_OPACITY / VP_MIN_VOXEL_OPACITY have real ranges (0.0-1.0) β€” go outside them and you're getting VPERROR_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