warp.HashGrid#
- class warp.HashGrid(*args, **kwargs)[source]#
- __init__(dim_x, dim_y, dim_z, device=None)[source]#
Class representing a hash grid object for accelerated point queries.
- id#
Unique identifier for this mesh object, can be passed to kernels.
- device#
Device this object lives on, all buffers must live on the same device.
Methods
__init__(dim_x, dim_y, dim_z[, device])Class representing a hash grid object for accelerated point queries.
build(points, radius)Updates the hash grid data structure.
reserve(num_points)- build(points, radius)[source]#
Updates the hash grid data structure.
This method rebuilds the underlying datastructure and should be called any time the set of points changes.
- Parameters:
points (
warp.array) – Array of points of typewarp.vec3radius (float) – The cell size to use for bucketing points, cells are cubes with edges of this width. For best performance the radius used to construct the grid should match closely to the radius used when performing queries.