PVD/modules/functional/ball_query.py

18 lines
671 B
Python
Raw Permalink Normal View History

2021-10-19 20:54:46 +00:00
from modules.functional.backend import _backend
2023-04-11 09:12:58 +00:00
__all__ = ["ball_query"]
2021-10-19 20:54:46 +00:00
def ball_query(centers_coords, points_coords, radius, num_neighbors):
2023-04-11 09:12:58 +00:00
"""
:param centers_coords: coordinates of centers, FloatTensor[B, 3, M]
:param points_coords: coordinates of points, FloatTensor[B, 3, N]
:param radius: float, radius of ball query
:param num_neighbors: int, maximum number of neighbors
:return:
neighbor_indices: indices of neighbors, IntTensor[B, M, U]
"""
centers_coords = centers_coords.contiguous()
points_coords = points_coords.contiguous()
return _backend.ball_query(centers_coords, points_coords, radius, num_neighbors)