RTree.Point3dKNeighbors Method

RTreePoint3dKNeighbors Method

Finds a certain amout of points in a list of 3D points that are the k-closest to a test point.

Namespace:  Rhino.Geometry
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public static IEnumerable<int[]> Point3dKNeighbors(
	IEnumerable<Point3d> hayPoints,
	IEnumerable<Point3d> needlePts,
	int amount
)
Public Shared Function Point3dKNeighbors ( 
	hayPoints As IEnumerable(Of Point3d),
	needlePts As IEnumerable(Of Point3d),
	amount As Integer
) As IEnumerable(Of Integer())

Parameters

hayPoints
Type: System.Collections.GenericIEnumerablePoint3d
A series of points.
needlePts
Type: System.Collections.GenericIEnumerablePoint3d
Points to search for.
amount
Type: SystemInt32
The required amount of closest neighbors to find.

Return Value

Type: IEnumerableInt32
An enumerable of arrays of indices; each array contains the indices for each of the needlePts.
Version Information

Rhino for Windows

Supported in: 6.8
See Also