13 #ifdef VOXTREES_SOURCE
16 #define VOX_DENSE_LEAF 2
17 #define VOX_LEAF_MASK 3
18 #define VOX_OVERFLOW 4
19 #define VOX_LEAFP(node) (!(node) || ((node)->flags & VOX_LEAF_MASK))
20 #define VOX_FULLP(node) ((node))
32 unsigned int dots_num;
Global parameters used by the library.
Structure representing a box.
Definition: voxvision.h:80
Voxel tree/node data structure.
VOX_EXPORT void vox_bounding_box(const struct vox_node *tree, struct vox_box *box)
Get the bounding box for voxels in the tree.
VOX_EXPORT struct vox_node * vox_rebuild_tree(const struct vox_node *tree)
Rebuild a tree.
VOX_EXPORT struct vox_node * vox_make_tree(vox_dot set[], size_t n)
Turn a set of voxels into a tree.
VOX_EXPORT void vox_set_voxel_size(float x, float y, float z)
Set global voxel size.
VOX_EXPORT int vox_delete_voxel(struct vox_node **tree_ptr, vox_dot voxel)
Delete a voxel from the tree on the fly.
VOX_EXPORT int vox_delete_voxel_coord(struct vox_node **tree_ptr, float x, float y, float z)
Delete a voxel from the tree on the fly.
VOX_EXPORT struct vox_node * vox_make_dense_leaf(const struct vox_box *box)
Create a cuboid tree.
VOX_EXPORT void vox_destroy_tree(struct vox_node *tree)
Free resources used by a tree.
VOX_EXPORT void vox_dump_tree(const struct vox_node *tree)
Dump a tree to standard output stream.
VOX_EXPORT size_t vox_voxels_in_tree(const struct vox_node *tree)
Return number of voxels in the tree.
VOX_EXPORT int vox_insert_voxel_coord(struct vox_node **tree_ptr, float x, float y, float z)
Insert a voxel in the tree on the fly.
VOX_EXPORT int vox_insert_voxel(struct vox_node **tree_ptr, vox_dot voxel)
Insert a voxel in the tree on the fly.