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-03 20:26:39 +0300
committerGermano <germano.costa@ig.com.br>2018-05-03 20:26:39 +0300
commitac19483e632bd3e2388a6a0de2db753efe33a860 (patch)
treea7b7433b51a8501875ab142658749b3ded6b224d /source/blender/modifiers
parenta5d0597b927d90c3621f8a40b0703cc158800fb8 (diff)
BKE bvhtree: Add `tree_type` parameter to `bvhtree_from_mesh_get`.
This will allow greater control of the bvhtrees that are obtained, and helps identify problems. It is also an additional step to unify the functions.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_surface.c4
-rw-r--r--source/blender/modifiers/intern/MOD_surfacedeform.c2
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c6
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/modifiers/intern/MOD_surface.c b/source/blender/modifiers/intern/MOD_surface.c
index 389cffe85e7..bed8f95fb87 100644
--- a/source/blender/modifiers/intern/MOD_surface.c
+++ b/source/blender/modifiers/intern/MOD_surface.c
@@ -159,9 +159,9 @@ static void deformVerts(ModifierData *md, Object *ob,
surmd->bvhtree = MEM_callocN(sizeof(BVHTreeFromMesh), "BVHTreeFromMesh");
if (surmd->dm->getNumPolys(surmd->dm))
- bvhtree_from_mesh_get(surmd->bvhtree, surmd->dm, BVHTREE_FROM_LOOPTRI);
+ bvhtree_from_mesh_get(surmd->bvhtree, surmd->dm, BVHTREE_FROM_LOOPTRI, 2);
else
- bvhtree_from_mesh_get(surmd->bvhtree, surmd->dm, BVHTREE_FROM_EDGES);
+ bvhtree_from_mesh_get(surmd->bvhtree, surmd->dm, BVHTREE_FROM_EDGES, 2);
}
}
diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c
index 5006fe4a6e0..e0c94d456c2 100644
--- a/source/blender/modifiers/intern/MOD_surfacedeform.c
+++ b/source/blender/modifiers/intern/MOD_surfacedeform.c
@@ -960,7 +960,7 @@ static bool surfacedeformBind(SurfaceDeformModifierData *smd, float (*vertexCos)
return false;
}
- bvhtree_from_mesh_get(&treeData, tdm, BVHTREE_FROM_LOOPTRI);
+ bvhtree_from_mesh_get(&treeData, tdm, BVHTREE_FROM_LOOPTRI, 2);
if (treeData.tree == NULL) {
modifier_setError((ModifierData *)smd, "Out of memory");
freeAdjacencyMap(vert_edges, adj_array, edge_polys);
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index c60c9690ac3..2b17efe7b24 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -149,7 +149,7 @@ static void get_vert2geom_distance(int numVerts, float (*v_cos)[3],
if (dist_v) {
/* Create a bvh-tree of the given target's verts. */
- bvhtree_from_mesh_get(&treeData_v, target, BVHTREE_FROM_VERTS);
+ bvhtree_from_mesh_get(&treeData_v, target, BVHTREE_FROM_VERTS, 2);
if (treeData_v.tree == NULL) {
OUT_OF_MEMORY();
return;
@@ -157,7 +157,7 @@ static void get_vert2geom_distance(int numVerts, float (*v_cos)[3],
}
if (dist_e) {
/* Create a bvh-tree of the given target's edges. */
- bvhtree_from_mesh_get(&treeData_e, target, BVHTREE_FROM_EDGES);
+ bvhtree_from_mesh_get(&treeData_e, target, BVHTREE_FROM_EDGES, 2);
if (treeData_e.tree == NULL) {
OUT_OF_MEMORY();
return;
@@ -165,7 +165,7 @@ static void get_vert2geom_distance(int numVerts, float (*v_cos)[3],
}
if (dist_f) {
/* Create a bvh-tree of the given target's faces. */
- bvhtree_from_mesh_get(&treeData_f, target, BVHTREE_FROM_LOOPTRI);
+ bvhtree_from_mesh_get(&treeData_f, target, BVHTREE_FROM_LOOPTRI, 2);
if (treeData_f.tree == NULL) {
OUT_OF_MEMORY();
return;