Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Quadtree ¶
type Quadtree struct {
// contains filtered or unexported fields
}
func New ¶
func New() *Quadtree
Create Returns a latitude-longitude Quadtree Note this creates a latlon quadtree. In Lat Lon, right > left and top > bottom TODO add CreateAndInsert func, for optimisation?
func (*Quadtree) Nearest ¶
Nearest returns the nearest object to the given coordinates, and whether an element was found. Returns false iff the tree is empty. TODO add NearestN - n nearest objs, e.g. in case no cache in the nearest cachegroup is available. TODO add NearestAll - all nearest objs with the same coords, e.g. so multiple cachegroups at the same coordinate can be round-robined
Click to show internal directories.
Click to hide internal directories.