Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormano-wii <germano.costa@ig.com.br>2019-09-12 18:26:03 +0300
committermano-wii <germano.costa@ig.com.br>2019-09-12 19:32:44 +0300
commitf9ef59ccc80d5bd3e0ad3aad74e535fc08747e5c (patch)
tree79fc54492474f1e90175b53662a83f766de60a92 /source/blender/blenlib/BLI_kdopbvh.h
parent5b2cebf49bc6e17fd75ab43e33387fc1b257d710 (diff)
BLIKdopBVH: New `BLI_bvhtree_overlap_ex` utility
Diffstat (limited to 'source/blender/blenlib/BLI_kdopbvh.h')
-rw-r--r--source/blender/blenlib/BLI_kdopbvh.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenlib/BLI_kdopbvh.h b/source/blender/blenlib/BLI_kdopbvh.h
index abfd561200c..078c5e27d28 100644
--- a/source/blender/blenlib/BLI_kdopbvh.h
+++ b/source/blender/blenlib/BLI_kdopbvh.h
@@ -89,6 +89,12 @@ typedef struct BVHTreeRayHit {
enum {
/* Use a priority queue to process nodes in the optimal order (for slow callbacks) */
+ BVH_OVERLAP_USE_THREADING = (1 << 0),
+ BVH_OVERLAP_RETURN_PAIRS = (1 << 1),
+ BVH_OVERLAP_BREAK_ON_FIRST = (1 << 2),
+};
+enum {
+ /* Use a priority queue to process nodes in the optimal order (for slow callbacks) */
BVH_NEAREST_OPTIMAL_ORDER = (1 << 0),
};
enum {
@@ -152,6 +158,14 @@ int BLI_bvhtree_overlap_thread_num(const BVHTree *tree);
/* collision/overlap: check two trees if they overlap,
* alloc's *overlap with length of the int return value */
+BVHTreeOverlap *BLI_bvhtree_overlap_ex(
+ const BVHTree *tree1,
+ const BVHTree *tree2,
+ uint *r_overlap_tot,
+ /* optional callback to test the overlap before adding (must be thread-safe!) */
+ BVHTree_OverlapCallback callback,
+ void *userdata,
+ int flag);
BVHTreeOverlap *BLI_bvhtree_overlap(const BVHTree *tree1,
const BVHTree *tree2,
unsigned int *r_overlap_tot,