warp.mesh_query_ray_anyhit#

warp.mesh_query_ray_anyhit(
id: uint64,
start: vec3f,
dir: vec3f,
max_t: float32,
root: int32,
) bool#
  • Kernel

Check for any ray hit on the warp.Mesh with identifier id.

The root parameter can be obtained using the mesh_get_group_root() function when creating a grouped mesh. When root is a valid (>=0) value, the traversal will be confined to the subtree starting from the root. If root is -1 (default), traversal starts at the mesh’s global root.

Parameters:
  • id – The mesh identifier

  • start – The start point of the ray

  • dir – The ray direction (should be normalized)

  • max_t – The maximum distance along the ray to check for intersections

  • root – The root node index for grouped BVH queries, or -1 for global root (optional, default: -1)