vpSeti(3)

πŸ’– vpSeti β€” the "set the value of an option" bestie πŸ’–

okay so welcome to the vpSeti and vpSetd page from the VolPack Library Functions Manual, and no cap this is the duo that sets option values in your rendering context. one of them does ints, one of them does doubles, and both of them are literally just here to tweak the vibe of your context. let's go πŸ¦‹


✨ NAME ✨

vpSeti, vpSetd β€” set the value of an option

no fr that's it, that's the whole job. two little functions, one big purpose πŸ’…


🌸 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;

look at them. matching outfits. one takes an int value, one takes a double value, and honestly? iconic. πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • vpc β€” the VolPack context, and bestie you get this one from vpCreateContext. it's the whole universe your options live in.
  • option β€” a constant that says which option we're setting. it's giving "pick a card, any card" but the cards are all very specific and documented below.
  • value β€” the new value for that option. the glow-up, if you will. ✨

πŸ’œ DESCRIPTION πŸ’œ

okay so these functions set the values of integer-valued or double-valued options in a rendering context. and because the universe loves a good split, the options divide into two groups: the ones you set with vpSeti (ints) and the ones you set with vpSetd (doubles).

🌈 the integer options β€” set with vpSeti

  • VP_CONCAT_MODE β€” chooses whether transformation matrices get premultiplied or postmultiplied. if value is VP_CONCAT_LEFT then they're premultiplied. if value is VP_CONCAT_RIGHT then they're postmultiplied. Default: VP_CONCAT_RIGHT. (right-coded default, we respect it πŸ’…)
  • 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, regardless of the current viewing direction. legal values are VP_X_AXIS, VP_Y_AXIS or VP_Z_AXIS. set the value to VP_NO_AXIS to let VolPack choose the optimal axis automatically (that's the default). this option is normally used only for debugging, so like… it's a backstage-pass situation, not a main-character move. 🎭
  • VP_TRACE_SHADOW_K β€” when pixel tracing is enabled (see vpTracePixel(3)) AND shadows are enabled (that's the VP_SHADOW option to vpEnable(3)), this option is used to choose 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 that affects the traced image pixel at the indicated slice. very specific, very detective energy πŸ”

πŸ¦‹ the double options β€” 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, when a pixel's opacity reaches this threshold, no more voxels are composited into the pixel. to maximize performance, the value should be as low as possible without adversely affecting 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 then the voxel is discarded before rendering. to maximize performance, the value should be as high as possible without adversely affecting 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 "we ate and left no crumbs" outcome 🫢

but sometimes things go wrong, and here's what you might get back:

  • VPERROR_BAD_OPTION β€” the option argument is invalid. not a real option bestie, try again 😭
  • VPERROR_BAD_VALUE β€” the value argument is invalid or out of range. out of pocket, out of bounds 🚫
fr fr check your option constant and your range before you send it, because these two errors are the whole entire mood-ruiner.

πŸ”₯ SEE ALSO πŸ”₯

VolPack(3), vpCreateContext(3), vpGeti(3)


and that's the page!! ✨ this whole thing lives in the VolPack library, and it's the vpSeti(3) entry of the Library Functions Manual β€” so if you ever need to cite it, that's the whole vibe. mwah, go set some options, bestie πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from