RhinoList.Point2fKNeighbors Method

RhinoListPoint2fKNeighbors Method

Finds a certain amout 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 pointcloud point and keeping a "short list".

Namespace:  Rhino.Collections
Assembly:  RhinoCommon (in RhinoCommon.dll)
Syntax
public static IEnumerable<int[]> Point2fKNeighbors(
	IEnumerable<Point2f> hayPoints,
	IEnumerable<Point2f> needlePoints,
	int amount
)
Public Shared Function Point2fKNeighbors ( 
	hayPoints As IEnumerable(Of Point2f),
	needlePoints As IEnumerable(Of Point2f),
	amount As Integer
) As IEnumerable(Of Integer())

Parameters

hayPoints
Type: System.Collections.GenericIEnumerablePoint2f
A point cloud to be searched.
needlePoints
Type: System.Collections.GenericIEnumerablePoint2f
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