warp.volume\_store ================== .. function:: warp._src.lang.volume_store(id: uint64, i: int32, j: int32, k: int32, value: Any) -> None .. hlist:: :columns: 8 * Kernel Store ``value`` at the voxel with integer index-space coordinates ``i``, ``j``, ``k``. ``value`` must match the volume's stored value type, and the coordinate must have leaf-level storage. Allocate leaf topology with :meth:`warp.Volume.allocate_by_tiles` before storing. The call does not allocate storage or activate voxels. This function is not differentiable. :param id: The ``id`` of a :class:`warp.Volume` to modify. :param i: Voxel coordinate along the first index-space axis. :param j: Voxel coordinate along the second index-space axis. :param k: Voxel coordinate along the third index-space axis. :param value: Value to write; its type must match the volume's stored type. .. rubric:: Example .. testcode:: @wp.kernel def store(vid: wp.uint64): wp.volume_store(vid, 1, 2, 3, 4.0) @wp.kernel def lookup(vid: wp.uint64, out: wp.array[wp.float32]): out[0] = wp.volume_lookup(vid, 1, 2, 3, dtype=float) volume = wp.Volume.load_from_numpy(np.zeros((2, 2, 2), dtype=np.float32), voxel_size=1.0, bg_value=0.0) out = wp.zeros(1, dtype=wp.float32) wp.launch(store, dim=1, inputs=[volume.id]) wp.launch(lookup, dim=1, inputs=[volume.id], outputs=[out]) print(round(float(out.numpy()[0]), 1)) .. testoutput:: 4.0