(cell-index stride stride-z x y z)
Returns the index for the cell at xyz with stride
and stride-z
.
Returns the index for the cell at xyz with `stride` and `stride-z`.
(depth-at tree v)
(depth-at tree max-depth v)
(depth-at tree offset dim idx depth max-depth branches v)
Returns max defined tree depth at given position.
Returns max defined tree depth at given position.
(max-depth dim prec)
Returns max tree depth for the given size and min requested precision (voxel size).
Returns max tree depth for the given size and min requested precision (voxel size).
(node-offset [x y z :as p] d)
(node-offset [x y z] d b)
Computes the position of a child node id
Computes the position of a child node id
(select-cells tree min-depth)
(select-cells data offset dim idx depth config branches acc)
(set-at tree v)
(set-at tree offset dim idx depth max-depth branches v)
Marks voxel at given position as set. Updates tree at all levels.
Marks voxel at given position as set. Updates tree at all levels.
(size-at-depth dim depth)
Returns node size at depth for given tree bounds.
Returns node size at depth for given tree bounds.
Returns a lazy-seq of bit ids used in x
.
Only checks 8bit range (0 - 255).
Returns a lazy-seq of bit ids used in `x`. Only checks 8bit range (0 - 255).
(voxel-cell {:keys [size stride stride-z]} idx)
Returns the cell coordinate for the given index
and tree
configuration as vec3 (the latter obtained via
voxel-config-at-depth
).
Returns the cell coordinate for the given `index` and tree configuration as vec3 (the latter obtained via `voxel-config-at-depth`).
(voxel-config-at-depth {:keys [dim max-depth] :as tree} min-depth)
Returns a map of configuration settings for the given tree
and
depth
. Depth will be clamped at tree's max-depth.
Returns a map of configuration settings for the given `tree` and `depth`. Depth will be clamped at tree's max-depth.
(voxel-coord config idx)
Returns the actual world space coordinate for the given index
and
tree configuration (the latter obtained via
voxel-config-at-depth
).
Returns the actual world space coordinate for the given `index` and tree configuration (the latter obtained via `voxel-config-at-depth`).
(voxeltree dim prec)
Creates a new voxel tree structure with the given root node dimension and min precision.
Creates a new voxel tree structure with the given root node dimension and min precision.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close