Constructors
KdTree
#Create a new kD tree.
Parameters:
| parentSet (ISampleSet) | Sample set associated with this tree. |
| maximumCount (int) | Maximum number of samples per spatial region. |
| maximumDepth (int) | Maximum number of hierarchical subdivisions. |
Properties
Methods
AddToRhino
#Adds the first 3 dimensions of this tree to Rhino. This is for debugging purposes.
Parameters:
| doc (RhinoDoc) | Doc to add to. |
Returns: List of objects ids that were added.
Find
#Find the closest point.
Parameters:
| location (PointN) | Location to search from. |
| minimumQuadrance (double) | Points whose quadrance is less than this value will be omitted from the search. |
| maximumQuadrance (double) | Points whose quadrance is greater than this value will be omitted from the search. |
| indexFilter (HashSet<int>) | Optional collection of indices to ignore during the search. |
Returns: Index to closest point.
FindMultiple
#Find the element(s) closest to a search point.
Parameters:
| location (PointN) | Search location. |
| maximumCount (int) | Maximum number of points to include in the result. |
| minimumQuadrance (double) | Points whose quadrance is less than this value will be omitted from the search. |
| maximumQuadrance (double) | Points whose quadrance is greater than this value will be omitted from the search. |
| indexFilter (HashSet<int>) | Collection of indices to omit from the search. |
Returns: Search results.
FindMultiple
#public KdTreeSearchResults FindMultiple(PointN location, int maximumCount, double minimumQuadrance, double maximumQuadrance)
Find the element(s) closest to a search point.
Parameters:
| location (PointN) | Search location. |
| maximumCount (int) | Maximum number of points to include in the result. |
| minimumQuadrance (double) | Points whose quadrance is less than this value will be omitted from the search. |
| maximumQuadrance (double) | Points whose quadrance is greater than this value will be omitted from the search. |
Returns: Search results.
LeafMeans
#Return all leaf means.
Parameters:
| precedence (KdMeanSelectionPrecedence) | Enumeration order. |
| type (KdMeanType) | Mean type. |
Returns: Sorted collection of leaf means.
MergeLeaves
#Reduce the leaf count of this tree to a specific target.
Parameters:
| leafTarget (int) | Target count. |
| precedence (KdLeafMergePrecedence) | Merging precedence. |
Returns: Reduced tree.
Pull
#Pull a collection of points onto the points.