RhinoListPoint3dKNeighbors Method |
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.
Namespace:
Rhino.Collections
Assembly:
RhinoCommon (in RhinoCommon.dll)
Since: 6.0
Syntax public static IEnumerable<int[]> Point3dKNeighbors(
IEnumerable<Point3d> hayPoints,
IEnumerable<Point3d> needlePoints,
int amount
)
Public Shared Function Point3dKNeighbors (
hayPoints As IEnumerable(Of Point3d),
needlePoints As IEnumerable(Of Point3d),
amount As Integer
) As IEnumerable(Of Integer())
Parameters
- hayPoints
- Type: System.Collections.GenericIEnumerablePoint3d
A point cloud to be searched. - needlePoints
- Type: System.Collections.GenericIEnumerablePoint3d
Points to search for. - amount
- Type: SystemInt32
The required amount of closest neighbors to find.
Return Value
Type:
IEnumerableInt32An enumerable of arrays of indices; each array contains the indices for each of the needlePts.
See Also