Scroll to navigation

vpTranspose(3) Library Functions Manual vpTranspose(3)

NAME

vpTranspose - transpose a volume

SYNOPSIS

#include <volpack.h>

vpResult

vpTranspose(vpc, axis)

vpContext *vpc;
int axis;

ARGUMENTS

VolPack context from vpCreateContext.
Axis which should have the smallest stride after transposing (VP_X_AXIS, VP_Y_AXIS or VP_Z_AXIS).

DESCRIPTION

vpTranspose is used to transpose the 3D voxel array to optimize the memory stride for a particular principal viewing axis. The intended way to use this function is to set the viewing transformation, call vpGeti with the VP_VIEW_AXIS argument to find the corresponding viewing axis, and then call vpTranspose with that axis. Transposing the data changes the arrangement of the data stored in the 3D voxel array. The voxel stride state variables are updated to reflect this change, so the viewing transformation does not need to be changed after transposing. If the volume is already transposed for the requested axis then it returns immediately without modifying the voxel array.

This function is useful only for rendering large 3D voxel arrays. This function has no affect on the preclassified volume data.

STATE VARIABLES

Relevant variables may be retrieved with the following state variable codes (see vpGeti(3)): VP_VIEW_AXIS, VP_VOXEL_XSTRIDE, VP_VOXEL_YSTRIDE, VP_VOXEL_ZSTRIDE.

ERRORS

The normal return value is VP_OK. The following error return values are possible:

The axis argument is invalid.
The 3D voxel array is missing or invalid.
The voxel fields are incorrectly specified.

SEE ALSO

VolPack(3), vpCreateContext(3)

VolPack