Struct kdbush::KDBush [] [src]

pub struct KDBush { /* fields omitted */ }

A very fast static spatial index for 2D points based on a flat KD-tree

Methods

impl KDBush
[src]

Creates an index from the given points

Arguments

  • points - Input points reader
  • node_size - Size of the KD-tree node, 64 by default. Higher means faster indexing but slower search, and vise versa

Finds all items within the given bounding box

Arguments

  • minx, miny, maxx, maxy - Bounding box
  • visitor - Result reader

Finds all items within a given radius from the query point

Arguments

  • qx, qy - Query point
  • r - Radius
  • visitor - Result reader