Skip to content

Commit

Permalink
Fix BVH ray query docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mmacklin authored Sep 2, 2024
1 parent 14556ff commit 1770c2c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/modules/runtime.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1135,11 +1135,11 @@ An example of performing a ray traversal on the data structure is as follows:
bounds_intersected: wp.array(dtype=wp.bool),
):
query = wp.bvh_query_ray(bvh_id, start, dir)
bounds_nr = wp.int32(0)
index = wp.int32(0)
while wp.bvh_query_next(query, bounds_nr):
# The ray intersects the volume with index bounds_nr
bounds_intersected[bounds_nr] = True
while wp.bvh_query_next(query, index):
# The ray intersects the bounds of the item at this index
bounds_intersected[index] = True
bounds_intersected = wp.zeros(shape=(num_bounds), dtype=wp.bool, device="cuda:0")
Expand Down

0 comments on commit 1770c2c

Please sign in to comment.