Class PointKDTree

Public

Represents a collection of GraphNodes.

It allows for fast lookups of the closest node to a point.

Inner Types

Public Methods

Add (node)

Add the node to the tree.

Public
GetInRange (point, sqrRadius, buffer)

Add all nodes within a squared distance of the point to the buffer.

Public
GetNearest (point, constraint)

Closest node to the point which satisfies the constraint.

Public
GetNearestConnection (point, constraint, maximumSqrConnectionLength)

Closest node to the point which satisfies the constraint.

Public
PointKDTree ()
Public
Rebuild (nodes, start, end)

Rebuild the tree starting with all nodes in the array between index start (inclusive) and end (exclusive)

Public

Public Static Variables

LeafArraySize
Public Static
LeafSize
Public Static

Private/Protected Members

Add (point, index, depth=0)
Private
Build (index, nodes, start, end)
Private
CollectAndClear (index, buffer)
Private
EnsureSize (index)
Private
GetInRangeInternal (index, point, sqrRadius, buffer)
Private
GetNearestConnectionInternal (index, point, constraint, best, bestSqrDist, distanceThresholdOffset)
Private
GetNearestInternal (index, point, constraint, best, bestSqrDist)
Private
GetOrCreateList ()
Private
MaxAllowedSize (numNodes, depth)
Private Static
Rebalance (index)
Private
Size (index)
Private
arrayCache
Private Readonly
comparers
Private Static Readonly
largeList
Private Readonly
numNodes
Private
tree
Private