volumepostoindex
expression function
Converts world space coordinates to volume voxel coordinates.
See also: volumeindextopos, volumesample
Usage
volumepostoindex(surface_node, prim_id, x, y, z, axis)
This function will return the voxel closest to the given worldspace coordinated. The axis selects which coordinate is returned.
surface_node is the full path of the surface node. The prim_id is the primitive number of the volume primitive within the surface node.
Returns 0 if out of bound values are specified, or the given primitive is not a volume.
axis controls which component of the world space position is returned:
-
axis = 0: X-axis
-
axis = 1: Y-axis
-
axis = 2: Z-axis
Examples
volumepostoindex("/obj/geo1/isooffset1", 0, 3, 4, 5, 0)