Class QuadTree
- Namespace
- CADability
- Assembly
- CADability.dll
A QuadTree of 2-dimensional objects that implement IQuadTreeInsertable. This Class might change in future, so the use of this class is deprecated
public class QuadTree : IEnumerable
- Inheritance
-
QuadTree
- Implements
- Inherited Members
Constructors
QuadTree()
public QuadTree()
QuadTree(BoundingRect)
Creates a new quadtree whose initial extent is given. The root square is chosen a little larger than the rectangle and its center is shifted by a tiny amount, so that horizontal or vertical lines do not come to lie exactly on the inner edges of the quadtree. The tree grows when objects outside of the initial extent are added.
public QuadTree(BoundingRect InitialRect)
Parameters
InitialRectBoundingRectThe expected extent of the objects to be inserted
Fields
DirectMode
public bool DirectMode
Field Value
InitialCenter
public GeoPoint2D InitialCenter
Field Value
InitialSize
public double InitialSize
Field Value
MaxDeepth
public int MaxDeepth
Field Value
MaxListLen
public int MaxListLen
Field Value
Properties
Size
Returns a BoundingRect that contains all objects in this QuadTree and is between the exact extent and the linear double of this extent.
public BoundingRect Size { get; }
Property Value
Methods
AddObject(IQuadTreeInsertable)
public void AddObject(IQuadTreeInsertable ObjectToAdd)
Parameters
ObjectToAddIQuadTreeInsertable
Compact()
public void Compact()
DebugPrint()
public void DebugPrint()
GetEnumerator()
public IEnumerator GetEnumerator()
Returns
GetObjectsCloseTo(IQuadTreeInsertable)
public ICollection GetObjectsCloseTo(IQuadTreeInsertable CloseToThis)
Parameters
CloseToThisIQuadTreeInsertable
Returns
GetObjectsFromRect(BoundingRect)
public ICollection GetObjectsFromRect(BoundingRect r)
Parameters
Returns
GetObjectsInsideRect(BoundingRect)
public ICollection GetObjectsInsideRect(BoundingRect r)
Parameters
Returns
RemoveObject(IQuadTreeInsertable)
public void RemoveObject(IQuadTreeInsertable ObjectToRemove)
Parameters
ObjectToRemoveIQuadTreeInsertable