Class QuadTree
Class to compute 2 dimensional spatial searches by quad subdivision.
Inheritance
System.Object
QuadTree
Namespace: Paramdigma.Core.Spatial
Assembly: Paramdigma.Core.dll
Syntax
public class QuadTree : object
Constructors
| Improve this Doc View SourceQuadTree(Rectangle2d, Double)
Initializes a new instance of the QuadTree class.
Declaration
public QuadTree(Rectangle2d boundary, double threshold)
Parameters
Type | Name | Description |
---|---|---|
Rectangle2d | boundary | Boundary of this QuadTree. |
System.Double | threshold | Smallest allowed dimension. |
Fields
| Improve this Doc View SourceBoundary
Boundary of this QuadTree.
Declaration
public readonly Rectangle2d Boundary
Field Value
Type | Description |
---|---|
Rectangle2d |
Points
Gets or sets the list of points of this QuadTree.
Declaration
public readonly List<Point2d> Points
Field Value
Type | Description |
---|---|
List<Point2d> |
Methods
| Improve this Doc View SourceInsert(Point2d)
Insert a point in the QuadTree.
Declaration
public bool Insert(Point2d point)
Parameters
Type | Name | Description |
---|---|---|
Point2d | point | Point to insert. |
Returns
Type | Description |
---|---|
System.Boolean | True if point was inserted. |
QueryRange(Rectangle2d)
Query the QuadTree for all points contained in this range.
Declaration
public List<Point2d> QueryRange(Rectangle2d range)
Parameters
Type | Name | Description |
---|---|---|
Rectangle2d | range | Range to look for. |
Returns
Type | Description |
---|---|
List<Point2d> | Points contained in the range. |