An efficient algorithm for the nearest neighbourhood search for point clouds