diff options
author | Germano Cavalcante <mano-wii> | 2022-04-06 00:44:52 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2022-04-06 01:32:56 +0300 |
commit | 684b95804e8fe8a78488b96b02285b2854809ff9 (patch) | |
tree | 3ff138ba11c32f3c0d112a6a0192c1f33a8d9af6 /source/blender/blenkernel/BKE_bvhutils.h | |
parent | bb7e3c2b563f752c0bc76631fd2804768c6d3847 (diff) |
Refactor: remove cache parameters from `bvhtree_from_` functions
The `BVHCacheType bvh_cache_type` parameter defines specific
`BVHTrees` that cannot be customized.
So it doesn't make sense to pass this value to any
`*bvhtree_from_[...]_ex` function as the `BVHTrees` created in these
cases are custom and cannot be saved in the cache.
This also resulted in a nice cleanup in the code.
Differential Revision: https://developer.blender.org/D14479
Diffstat (limited to 'source/blender/blenkernel/BKE_bvhutils.h')
-rw-r--r-- | source/blender/blenkernel/BKE_bvhutils.h | 28 |
1 files changed, 7 insertions, 21 deletions
diff --git a/source/blender/blenkernel/BKE_bvhutils.h b/source/blender/blenkernel/BKE_bvhutils.h index 6bf4f3acc15..ec017dec2e4 100644 --- a/source/blender/blenkernel/BKE_bvhutils.h +++ b/source/blender/blenkernel/BKE_bvhutils.h @@ -113,9 +113,7 @@ BVHTree *bvhtree_from_editmesh_verts_ex(BVHTreeFromEditMesh *data, float epsilon, int tree_type, int axis, - BVHCacheType bvh_cache_type, - struct BVHCache **bvh_cache_p, - ThreadMutex *mesh_eval_mutex); + const bool isolate); /** * Builds a BVH-tree where nodes are the given vertices (NOTE: does not copy given `vert`!). @@ -133,9 +131,7 @@ BVHTree *bvhtree_from_mesh_verts_ex(struct BVHTreeFromMesh *data, float epsilon, int tree_type, int axis, - BVHCacheType bvh_cache_type, - struct BVHCache **bvh_cache_p, - ThreadMutex *mesh_eval_mutex); + const bool isolate); BVHTree *bvhtree_from_editmesh_edges( BVHTreeFromEditMesh *data, struct BMEditMesh *em, float epsilon, int tree_type, int axis); @@ -150,9 +146,7 @@ BVHTree *bvhtree_from_editmesh_edges_ex(BVHTreeFromEditMesh *data, float epsilon, int tree_type, int axis, - BVHCacheType bvh_cache_type, - struct BVHCache **bvh_cache_p, - ThreadMutex *mesh_eval_mutex); + const bool isolate); /** * Builds a BVH-tree where nodes are the given edges. @@ -173,9 +167,7 @@ BVHTree *bvhtree_from_mesh_edges_ex(struct BVHTreeFromMesh *data, float epsilon, int tree_type, int axis, - BVHCacheType bvh_cache_type, - struct BVHCache **bvh_cache_p, - ThreadMutex *mesh_eval_mutex); + const bool isolate); /** * Builds a BVH-tree where nodes are the given tessellated faces @@ -197,9 +189,7 @@ BVHTree *bvhtree_from_mesh_faces_ex(struct BVHTreeFromMesh *data, float epsilon, int tree_type, int axis, - BVHCacheType bvh_cache_type, - struct BVHCache **bvh_cache_p, - ThreadMutex *mesh_eval_mutex); + const bool isolate); BVHTree *bvhtree_from_editmesh_looptri( BVHTreeFromEditMesh *data, struct BMEditMesh *em, float epsilon, int tree_type, int axis); @@ -214,9 +204,7 @@ BVHTree *bvhtree_from_editmesh_looptri_ex(BVHTreeFromEditMesh *data, float epsilon, int tree_type, int axis, - BVHCacheType bvh_cache_type, - struct BVHCache **bvh_cache_p, - ThreadMutex *mesh_eval_mutex); + const bool isolate); /** * Builds a BVH-tree where nodes are the looptri faces of the given mesh. @@ -236,9 +224,7 @@ BVHTree *bvhtree_from_mesh_looptri_ex(struct BVHTreeFromMesh *data, float epsilon, int tree_type, int axis, - BVHCacheType bvh_cache_type, - struct BVHCache **bvh_cache_p, - ThreadMutex *mesh_eval_mutex); + const bool isolate); /** * Builds or queries a BVH-cache for the cache BVH-tree of the request type. |