warp.volume_world_to_index#

warp.volume_world_to_index(id: uint64, xyz: vec3f) vec3f#
  • Kernel

  • Python

  • Differentiable

Transform the point xyz from 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 uvw argument of the volume sampling built-ins such as volume_sample(). For direction vectors, use volume_world_to_index_dir() instead.

Parameters:
  • id – The id of a warp.Volume.

  • xyz – Point in world space.

Returns:

The transformed point in index space with float32 precision.

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 xyz from 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 float64 overload of volume_world_to_index(). Behavior and usage match the default float32 overload; see it for details and a usage example.