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 Variables

LeafArraySize
Public
LeafSize
Public

Private/Protected Members

Add (point, index, depth=0)
Private
arrayCache
Private Readonly
Build (index, nodes, start, end)
Private
CollectAndClear (index, buffer)
Private
comparers
Private Static Readonly
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
largeList
Private Readonly
MaxAllowedSize (numNodes, depth)
Private Static
numNodes
Private
Rebalance (index)
Private
Size (index)
Private
tree
Private