coords

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 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 added in v0.8.13

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 added in v0.8.20

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 added in v0.8.20

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

type CoordsEqualFn added in v0.8.20

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

CoordsEqualFn must return true if both points are equal

type CoordsRO added in v0.8.20

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

func NewReadOnly added in v0.8.20

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

func (*CoordsRO[V]) Closest added in v0.8.20

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

func (*CoordsRO[V]) Get added in v0.8.20

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

func (*CoordsRO[V]) Has added in v0.8.20

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

func (*CoordsRO[V]) KNearest added in v0.8.20

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

type ICoords added in v0.8.13

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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