RhinoList
Provides helper methods to work with RhinoList<T> and other collections.
Methods
public static IEnumerable<int[]> Point2dKNeighbors(IEnumerable<Point2d> hayPoints, IEnumerable<Point2d> needlePoints, int amount)
Finds a certain amour of points in a list of single-precision 2D points that are the k-closest to a test point. This method searches needlePoints by computing all distances from each point cloud point and keeping a "short list".
Parameters:
| hayPoints (IEnumerable<Point2d>) | A point cloud to be searched. |
| needlePoints (IEnumerable<Point2d>) | Points to search for. |
| amount (int) | The required amount of closest neighbors to find. |
Returns: An enumerable of arrays of indices; each array contains the indices for each of the needlePts.
public static IEnumerable<int[]> Point2fKNeighbors(IEnumerable<Point2f> hayPoints, IEnumerable<Point2f> needlePoints, int amount)
Finds a certain amour of points in a list of single-precision 2D points that are the k-closest to a test point. This method searches needlePoints by computing all distances from each point cloud point and keeping a "short list".
Parameters:
| hayPoints (IEnumerable<Point2f>) | A point cloud to be searched. |
| needlePoints (IEnumerable<Point2f>) | Points to search for. |
| amount (int) | The required amount of closest neighbors to find. |
Returns: An enumerable of arrays of indices; each array contains the indices for each of the needlePts.
public static IEnumerable<int[]> Point3dKNeighbors(IEnumerable<Point3d> hayPoints, IEnumerable<Point3d> needlePoints, int amount)
Finds a certain amour of points in a list of 3D points that are the k-closest to a test point. This method searches needlePoints by computing all distances from each point cloud point and keeping a "short list". See RTree KNeighbors for alternatives.
Parameters:
| hayPoints (IEnumerable<Point3d>) | A point cloud to be searched. |
| needlePoints (IEnumerable<Point3d>) | Points to search for. |
| amount (int) | The required amount of closest neighbors to find. |
Returns: An enumerable of arrays of indices; each array contains the indices for each of the needlePts.
public static IEnumerable<int[]> Point3fKNeighbors(IEnumerable<Point3f> hayPoints, IEnumerable<Point3f> needlePoints, int amount)
Finds a certain amour of points in a list of single-precision 3D points that are the k-closest to a test point. This method searches needlePoints by computing all distances from each point cloud point and keeping a "short list".
Parameters:
| hayPoints (IEnumerable<Point3f>) | A point cloud to be searched. |
| needlePoints (IEnumerable<Point3f>) | Points to search for. |
| amount (int) | The required amount of closest neighbors to find. |
Returns: An enumerable of arrays of indices; each array contains the indices for each of the needlePts.
public static IEnumerable<int[]> PointCloudKNeighbors(PointCloud pointcloud, IEnumerable<Point3d> needlePoints, int amount)
Finds a certain amount of points in a list of 3D points that are the k-closest to a test point. This method searches needlePoints by computing all distances from each point cloud point and keeping a short list.
Parameters:
| pointcloud (PointCloud) | A point cloud to be searched. |
| needlePoints (IEnumerable<Point3d>) | Points to search for. |
| amount (int) | The required amount of closest neighbors to find. |
Returns: An enumerable of arrays of indices; each array contains the indices for each of the needlePts.