daabbt

package
v0.0.0-...-19fadcf Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Based of https://github.com/asim/quadtree/blob/master/quadtree.go

Index

Constants

This section is empty.

Variables

View Source
var (
	Capacity = 8
	MaxDepth = 6
)

Functions

This section is empty.

Types

type Bounded

type Bounded interface {
	Bounds() f32.Rectangle
}

type Filter

type Filter func(f32.Point) bool

type Node

type Node struct {
	// contains filtered or unexported fields
}

func NewTree

func NewTree(dims f32.Rectangle) *Node

func (*Node) Draw

func (n *Node) Draw(gtx layout.Context)

func (*Node) Insert

func (n *Node) Insert(v Bounded) bool

func (*Node) KNearest

func (n *Node) KNearest(point f32.Point, k int, fn Filter) []Bounded

func (*Node) Remove

func (n *Node) Remove(b Bounded) bool

Jump to

Keyboard shortcuts

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