SpatialTree
Description
- Derived from
-
SpatialTreeBase<TBounds> abstract
- Extended by
-
SpatialOctree abstract
SpatialQuadtree abstract
A generic tree data structure for storing spatial entities.
Public / Methods
Distance
2 overloads
Finds the smallest distance from the given point to any spatial entity in the tree.
Finds the smallest distance from the given point to any spatial entity in the tree.
Public / Attributes
EntityCount
Returns the number of spatial entities that are present in the tree nodes.
The entity count may be higher than the number of calls to Add, because the same spatial entity may be present in multiple tree nodes.
Protected / Attributes
nodeChildren
Child pointers per tree node.
This array is indexed as follows:
children[idx * childCount + n] := n-th child
where idx
is the tree node index and n
is the child node ordinal.
nodeFirst
First spatial entity per tree node.
If a tree node idx
has no spatial entities, nodeFirst[idx]
will be -1
. If nodeFirst[idx]
is greater than or equal to zero, the node is a leaf.
- See also