SpatialTree
Declaration
public partial class SpatialTreeConstructors
public SpatialTree(int approximateQuadSize)
Summary
Parameters
| Name | Type | Summary |
|---|---|---|
| approximateQuadSize | int | Defines the size of a quad. The actual size will be less than or equal to this number. |
Methods
| Name | Type | Summary |
|---|---|---|
| Clear | void | - |
| DrawGizmos | void | Visualizes the quad-tree in the editor's scene view. |
| GetElement | bool | Returns the grid node at the specified location if exists. |
| Insert | bool | Inserts the provided elements to the tree. |
| Query | IEnumerable<GridNode> | - |
| Remove | HashSet<Vector2Int> | Removes the provided elements from the tree. |
Creates a new spatial tree instance.
A spatial tree consists of a grid of quads, which themselves can subdivide.