Documentation ΒΆ
Index ΒΆ
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
This section is empty.
Types ΒΆ
type Bounds ΒΆ
Bounds - A bounding box with a x,y origin and width and height
func (*Bounds) Intersects ΒΆ
Intersects - Checks if a Bounds object intersects with another Bounds
type Quadtree ΒΆ
type Quadtree struct { Bounds Bounds MaxObjects int // Maximum objects a node can hold before splitting into 4 subnodes MaxLevels int // Total max levels inside root Quadtree Level int // Depth level, required for subnodes Objects []Bounds Nodes []Quadtree Total int }
Quadtree - The quadtree data structure
func (*Quadtree) Insert ΒΆ
Insert - Insert the object into the node. If the node exceeds the capacity, it will split and add all objects to their corresponding subnodes.
func (*Quadtree) RetrieveIntersections ΒΆ
RetrieveIntersections - Bring back all the bounds in a Quadtree that intersect with a provided bounds
func (*Quadtree) RetrievePoints ΒΆ
RetrievePoints - Return all points that collide
func (*Quadtree) TotalNodes ΒΆ
TotalNodes - Retrieve the total number of sub-Quadtrees in a Quadtree
Click to show internal directories.
Click to hide internal directories.