vpStoreRawVolume(3)
πΎ vpStoreRawVolume(3) β like, the Library Functions Manual energy but make it cute
okay bestie, gather round, because this is the manual page for vpStoreRawVolume(3) and it is lowkey iconic πΈ
β¨ NAME β¨
vpStoreRawVolume, vpStoreMinMaxOctree, vpStoreClassifiedVolume, vpStoreContext β the four besties whose whole job is storing volume data structures to a file π
no cap, that's the entire vibe: you have a thing, you want it in a file, these are the girlies who do it.
π¦ SYNOPSIS π¦
#include <volpack.h>
vpResult
vpStoreRawVolume(vpc, fd)
vpContext *vpc;
int fd;
vpResult
vpStoreMinMaxOctree(vpc, fd)
vpContext *vpc;
int fd;
vpResult
vpStoreClassifiedVolume(vpc, fd)
vpContext *vpc;
int fd;
vpResult
vpStoreContext(vpc, fd)
vpContext *vpc;
int fd;
likeβ¦ they're quadruplets. same signature, same energy, different destinies β¨
π ARGUMENTS π
vpcβ your VolPack context, the one that came out ofvpCreateContext. she's the main character, everything lives inside her πfdβ a file descriptor fromopen(2), and it has to be open for writing. read-only? not the moment, bestie. π
π DESCRIPTION π
so here's the tea: these functions take volume data structures out of a rendering context and write them into files, in the exact format that the VolPack file reading routines can read back (peep vpLoadRawVolume(3) for that side of the story π«Ά). it's giving "save game", it's giving "so we can load this later", it's giving storage slay.
vpStoreRawVolumeβ creates a 3D voxel array file β¨ the file has info about the size of the volume and the layout of the voxels, plus the volume data itself. the whole package. she's thorough.vpStoreMinMaxOctreeβ creates a min-max octree file π³ again with the size info and voxel layout info, and then the octree itself riding along too.vpStoreClassifiedVolumeβ creates a preclassified volume data file π size info, voxel layout info, and the volume data itself. yes, same energy as the raw volume one, and no, we're not merging them, they're different functions and we respect that πvpStoreContextβ creates a rendering context file π this one holds all the rendering parameters β except volume data and callback functions, those two get left at home π β and it also stores the contents of any lookup tables for shading and classification. so basically the whole personality, minus the data and the callbacks.
also!! the function that actually does the writing can be swapped out by callingvpSetCallbackwith theVP_WRITE_FUNCoption π₯ so if you wanted to, say, implement a file-compression system, this is your doorway. not me hyping up custom I/O, but likeβ¦ it's right there.
β STATE VARIABLES β
the current file I/O parameters? retrievable. you just need these state variable codes (and yeah, go check vpGeti(3) for the how-to):
VP_WRITE_FUNC
π ERRORS π
the normal return value is VP_OK β that's the "we ate and left no crumbs" outcome π
but the following error return values are also possible, and bestie, we have to talk about them:
VPERROR_IOβ the file writing function returned an error value, and in that case the external variableerrnoshould contain an operating-system specific error code. or the file system is full π either way, rough.VPERROR_BAD_VOLUMEβ the volume dimensions are invalid, or there's no voxel data in the context. like, nothing to store. empty. ghosted.VPERROR_BAD_SIZEβ there's no min-max octree in the volume. and heads up, this one isvpStoreMinMaxOctreeonly. the other girlies don't care. π§VPERROR_BAD_VOXELβ the voxel fields in the rendering context have not been properly defined. define them. please. for me. π
πΈ SEE ALSO πΈ
okay that's the whole page, no notes, periodt π β¨
VolPack β vpStoreRawVolume(3) β mwah, that's a wrap, thanks for coming to my ted talk, love u, bye π«Άππ¦
π¦ 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