(add-point* root p d)
Associates point with data in tree, recursively creates all required intermediate nodes.
Associates point with data in tree, recursively creates all required intermediate nodes.
(delete-point* root p)
Removes point from tree (if found) and prunes any resulting empty nodes. Returns given node (root).
Removes point from tree (if found) and prunes any resulting empty nodes. Returns given node (root).
(lazy-select-with q isec? inside?)
Same as select-with
, only produces a lazy sequence of points.
Same as `select-with`, only produces a lazy sequence of points.
(octree {[x y z] :p [w h d] :size})
(octree [x y z] size)
(octree x y z size)
(octree x y z w h d)
Create a new octree root node with the given XYZ position & dimensions.
Create a new octree root node with the given XYZ position & dimensions.
(path-for-point root p)
Returns depth-first seq of nodes for given point.
Returns depth-first seq of nodes for given point.
(child-for-point _ p)
(child-index-for-point _ p)
(get-children _)
(make-child-for-point _ p d add-point?)
(set-child _ i c)
(set-children _ c)
(set-point _ p d)
(split-node _)
(quadtree {[x y] :p [w h] :size})
(quadtree [x y] size)
(quadtree x y size)
(quadtree x y w h)
Create a new quadtree root node with the given XY position & dimensions.
Create a new quadtree root node with the given XY position & dimensions.
(select-with q isec? inside?)
(select-with q isec? inside? acc)
Produces a vector of points in the tree within a given region. Uses two predicate fns to logically define the query region:
isec?
: single-arg fn to check if the bounds of a tree node
intersect the query region
inside?
: single-arg fn to check if a point lies within the region.
Produces a vector of points in the tree within a given region. Uses two predicate fns to logically define the query region: `isec?` : single-arg fn to check if the bounds of a tree node intersect the query region `inside?`: single-arg fn to check if a point lies within the region.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close