Table of Contents

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

InitialRect BoundingRect

The expected extent of the objects to be inserted

Fields

DirectMode

public bool DirectMode

Field Value

bool

InitialCenter

public GeoPoint2D InitialCenter

Field Value

GeoPoint2D

InitialSize

public double InitialSize

Field Value

double

MaxDeepth

public int MaxDeepth

Field Value

int

MaxListLen

public int MaxListLen

Field Value

int

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

BoundingRect

Methods

AddObject(IQuadTreeInsertable)

public void AddObject(IQuadTreeInsertable ObjectToAdd)

Parameters

ObjectToAdd IQuadTreeInsertable

Compact()

public void Compact()

DebugPrint()

public void DebugPrint()

GetEnumerator()

public IEnumerator GetEnumerator()

Returns

IEnumerator

GetObjectsCloseTo(IQuadTreeInsertable)

public ICollection GetObjectsCloseTo(IQuadTreeInsertable CloseToThis)

Parameters

CloseToThis IQuadTreeInsertable

Returns

ICollection

GetObjectsFromRect(BoundingRect)

public ICollection GetObjectsFromRect(BoundingRect r)

Parameters

r BoundingRect

Returns

ICollection

GetObjectsInsideRect(BoundingRect)

public ICollection GetObjectsInsideRect(BoundingRect r)

Parameters

r BoundingRect

Returns

ICollection

RemoveObject(IQuadTreeInsertable)

public void RemoveObject(IQuadTreeInsertable ObjectToRemove)

Parameters

ObjectToRemove IQuadTreeInsertable