Represents a bounding volume tree using axis-aligned bounding boxes (AABBs).

Namespace: DigitalRune.Geometry.Partitioning
Assembly: DigitalRune.Geometry (in DigitalRune.Geometry.dll) Version: 1.9.0.0 (1.9.3.9490)

Syntax

C#
public class AabbTree<T> : BasePartition<T>, 
	ISupportClosestPointQueries<T>
Visual Basic
Public Class AabbTree(Of T) _
	Inherits BasePartition(Of T) _
	Implements ISupportClosestPointQueries(Of T)
Visual C++
generic<typename T>
public ref class AabbTree : public BasePartition<T>, 
	ISupportClosestPointQueries<T>

Type Parameters

T
The type of item in the spatial partition.

Remarks

AabbTree<(Of <(<'T>)>)> partitions are good for partitioning static models or spaces where items are not changed at runtime or when the changes are small or local. For example, an AabbTree<(Of <(<'T>)>)> is appropriate for managing large static triangle meshes efficiently. But they are not suitable for dynamic models or spaces where items are added/removed at runtime or when the large changes are applied to items.

Consider using the CompressedAabbTree instead of the AabbTree<(Of <(<'T>)>)> if items of type Int32 need to be stored. The CompressedAabbTree reduced the memory requirements considerably.

Special handling of self-overlaps in GetOverlaps(ISpatialPartition<(Of <<'(T>)>>)): If GetOverlaps(ISpatialPartition<(Of <<'(T>)>>)) is used to test an AABB tree against itself then overlaps of an item with itself are not returned; that means, each item A overlaps with itself but (A, A) is not returned. And if two different items overlap, only one overlap is returned, for example: If item A and item B overlap (A, B) or (B, A) is returned but not both.

Inheritance Hierarchy

System..::..Object
  DigitalRune.Geometry.Partitioning..::..BasePartition<(Of <(<'T>)>)>
    DigitalRune.Geometry.Partitioning..::..AabbTree<(Of <(<'T>)>)>

See Also