Versions in this module Expand all Collapse all v1 v1.2.0 Feb 1, 2023 Changes in this version type Point + func (p Point) Copy() Point v1.1.0 Feb 14, 2020 Changes in this version type Rect + func NewRectFromPoints(minPoint, maxPoint Point) (r *Rect, err error) + func (r *Rect) Size() float64 v1.0.0 Oct 10, 2019 Changes in this version + type Comparator func(obj1, obj2 Spatial) (equal bool) + type DimError struct + Actual int + Expected int + func (err DimError) Error() string + type DistError float64 + func (err DistError) Error() string + type Filter func(results []Spatial, object Spatial) (refuse, abort bool) + func LimitFilter(limit int) Filter + type Point []float64 + func (p Point) ToRect(tol float64) *Rect + type Rect struct + func NewRect(p Point, lengths []float64) (r *Rect, err error) + func (r *Rect) Equal(other *Rect) bool + func (r *Rect) LengthsCoord(i int) float64 + func (r *Rect) PointCoord(i int) float64 + func (r *Rect) String() string + type Rtree struct + Dim int + MaxChildren int + MinChildren int + func NewTree(dim, min, max int, objs ...Spatial) *Rtree + func (tree *Rtree) Delete(obj Spatial) bool + func (tree *Rtree) DeleteWithComparator(obj Spatial, cmp Comparator) bool + func (tree *Rtree) Depth() int + func (tree *Rtree) GetAllBoundingBoxes() []*Rect + func (tree *Rtree) Insert(obj Spatial) + func (tree *Rtree) NearestNeighbor(p Point) Spatial + func (tree *Rtree) NearestNeighbors(k int, p Point, filters ...Filter) []Spatial + func (tree *Rtree) SearchIntersect(bb *Rect, filters ...Filter) []Spatial + func (tree *Rtree) SearchIntersectWithLimit(k int, bb *Rect) []Spatial + func (tree *Rtree) Size() int + func (tree *Rtree) String() string + type Spatial interface + Bounds func() *Rect