warp.volume_world_to_index#
- warp.volume_world_to_index(id: uint64, xyz: vec3f) vec3f#
Kernel
Python
Differentiable
Transform the point
xyzfrom world space to the volume’s index space (voxel coordinates) using the inverse of the volume’s affine index-to-world transform.Applies the full affine map, including translation; the result may be passed as the
uvwargument of the volume sampling built-ins such asvolume_sample(). For direction vectors, usevolume_world_to_index_dir()instead.- Parameters:
id – The
idof awarp.Volume.xyz – Point in world space.
- Returns:
The transformed point in index space with
float32precision.
See
volume_index_to_world()for a usage example.
- warp.volume_world_to_index(id: uint64, xyz: vec3d) vec3d
Kernel
Python
Differentiable
Transform the point
xyzfrom world space to the volume’s index space (voxel coordinates) using the inverse of the volume’s affine index-to-world transform (float64 precision).The
float64overload ofvolume_world_to_index(). Behavior and usage match the defaultfloat32overload; see it for details and a usage example.