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:
authorGermano <germano.costa@ig.com.br>2018-05-12 18:05:54 +0300
committerGermano <germano.costa@ig.com.br>2018-05-12 18:05:54 +0300
commit817bb5d40d2335f2945fbc25e47be7ef213478a4 (patch)
treeb6421ca60fb95efcbcfbf6e476bff8ad13288f4b /source/blender/blenkernel/intern/bvhutils.c
parent7c1171c246a2894066d38d4421c92f40e6485e68 (diff)
Remove unused function: `BKE_bvhtree_from_mesh_looptri`.
Diffstat (limited to 'source/blender/blenkernel/intern/bvhutils.c')
-rw-r--r--source/blender/blenkernel/intern/bvhutils.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index 1d7ae76d1f9..b5409584f58 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -1257,70 +1257,6 @@ BVHTree *bvhtree_from_mesh_get(
return tree;
}
-/* This is a Mesh-specific copy of bvhtree_from_mesh_looptri() */
-/**
- * Builds a bvh tree where nodes are the looptri faces of the given mesh.
- *
- * \note for editmesh this is currently a duplicate of bvhtree_from_mesh_faces
- */
-BVHTree *BKE_bvhtree_from_mesh_looptri(
- BVHTreeFromMesh *data, Mesh *mesh,
- float epsilon, int tree_type, int axis)
-{
- BVHTree *tree;
- MVert *mvert = NULL;
- MLoop *mloop = NULL;
- const MLoopTri *looptri = NULL;
-
- BLI_rw_mutex_lock(&cache_rwlock, THREAD_LOCK_READ);
- tree = bvhcache_find(mesh->runtime.bvh_cache, BVHTREE_FROM_LOOPTRI);
- BLI_rw_mutex_unlock(&cache_rwlock);
-
- mvert = mesh->mvert;
- mloop = mesh->mloop;
- looptri = BKE_mesh_runtime_looptri_ensure(mesh);
-
- /* Not in cache */
- if (tree == NULL) {
- BLI_rw_mutex_lock(&cache_rwlock, THREAD_LOCK_WRITE);
- tree = bvhcache_find(mesh->runtime.bvh_cache, BVHTREE_FROM_LOOPTRI);
- if (tree == NULL) {
- int looptri_num = BKE_mesh_runtime_looptri_len(mesh);
-
- /* this assert checks we have looptris,
- * if not caller should use DM_ensure_looptri() */
- BLI_assert(!(looptri_num == 0 && mesh->totpoly != 0));
-
- tree = bvhtree_from_mesh_looptri_create_tree(
- epsilon, tree_type, axis,
- mvert, mloop, looptri, looptri_num, NULL, -1);
- if (tree) {
- /* Save on cache for later use */
- /* printf("BVHTree built and saved on cache\n"); */
- bvhcache_insert(&mesh->runtime.bvh_cache, tree, BVHTREE_FROM_LOOPTRI);
- }
- }
- BLI_rw_mutex_unlock(&cache_rwlock);
- }
- else {
- /* printf("BVHTree is already build, using cached tree\n"); */
- }
-
- if (tree) {
- /* Setup BVHTreeFromMesh */
- bvhtree_from_mesh_looptri_setup_data(
- data, tree, true,
- mvert, false,
- mloop, false,
- looptri, false);
- }
- else {
- memset(data, 0, sizeof(*data));
- }
-
- return tree;
-}
-
/**
* Builds or queries a bvhcache for the cache bvhtree of the request type.
*/