coords

package
v0.9.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Coords

type Coords[V orb.Pointer] struct {
	ICoords[V]
	// contains filtered or unexported fields
}

func New

func New[V orb.Pointer]() *Coords[V]

func NewWithBounds

func NewWithBounds[V orb.Pointer](bounds orb.Bound) *Coords[V]

func (*Coords[V]) Add

func (p *Coords[V]) Add(point orb.Pointer) error

func (*Coords[V]) Closest

func (p *Coords[V]) Closest(x, y float64) V

func (*Coords[V]) Get

func (p *Coords[V]) Get(point orb.Pointer, fn quadtree.FilterFunc) V

func (*Coords[V]) Has

func (p *Coords[V]) Has(point orb.Pointer, fn quadtree.FilterFunc) bool

func (*Coords[V]) KNearest

func (p *Coords[V]) KNearest(point orb.Pointer, max int, fn quadtree.FilterFunc, maxDistance float64) []orb.Pointer

func (*Coords[V]) Remove

func (p *Coords[V]) Remove(point orb.Pointer, fn quadtree.FilterFunc) bool

func (*Coords[V]) Replace

func (p *Coords[V]) Replace(point orb.Pointer, fn quadtree.FilterFunc, equalFn CoordsEqualFn) error

type CoordsEqualFn

type CoordsEqualFn = func(orb.Pointer, orb.Pointer) bool

CoordsEqualFn must return true if both points are equal

type CoordsRO

type CoordsRO[V orb.Pointer] struct {
	ICoords[V]
	// contains filtered or unexported fields
}

func NewReadOnly

func NewReadOnly[V orb.Pointer](points []V) (*CoordsRO[V], error)

func (*CoordsRO[V]) Closest

func (p *CoordsRO[V]) Closest(x, y float64) V

func (*CoordsRO[V]) Get

func (p *CoordsRO[V]) Get(point orb.Pointer, fn quadtree.FilterFunc) V

func (*CoordsRO[V]) Has

func (p *CoordsRO[V]) Has(point orb.Pointer, fn quadtree.FilterFunc) bool

func (*CoordsRO[V]) KNearest

func (p *CoordsRO[V]) KNearest(point orb.Pointer, max int, fn quadtree.FilterFunc, maxDistance float64) []orb.Pointer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL