@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
19 lines • 1.08 kB
TypeScript
/**
* Build a binary radix tree over the given leaves and Morton codes.
*
* @param {BVH} bvh
* @param {number[]|Uint32Array} leaf_nodes
* Pre-allocated leaf node IDs, ordered to match `sorted_morton_codes`
* (i.e. leaf_nodes[i]'s code is sorted_morton_codes[i]).
* @param {number[]|Uint32Array} sorted_morton_codes
* Morton codes in non-decreasing order. May contain duplicates.
* @param {number} leaf_count
* Number of leaves (must equal the length of `leaf_nodes` and
* `sorted_morton_codes` that the function will actually look at).
* @param {number[]|Uint32Array} internal_nodes
* Pre-allocated internal node IDs, of length at least `leaf_count - 1`.
* Ignored when leaf_count < 2.
* @returns {number} The root node id, or NULL_NODE if leaf_count is 0.
*/
export function ebvh_build_hierarchy_radix(bvh: BVH, leaf_nodes: number[] | Uint32Array, sorted_morton_codes: number[] | Uint32Array, leaf_count: number, internal_nodes: number[] | Uint32Array): number;
//# sourceMappingURL=ebvh_build_hierarchy_radix.d.ts.map