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-01 16:03:28 +0300
committerGermano <germano.costa@ig.com.br>2018-05-01 16:03:28 +0300
commit522bee3fc838c83b377d0e05fef8299a29ae5a16 (patch)
tree6bfd84127fd6da9921b7d3e4136381e208900483 /source/blender/modifiers/intern
parent2e98524b58a53f0d546e5f1e7d549d2f45815055 (diff)
Refactoring: bvhutils: Use a function that gets the bvhtree through an identifier type.
Reviewed By: @campbellbarton Differential Revision: https://developer.blender.org/D3192
Diffstat (limited to 'source/blender/modifiers/intern')
-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 7bb4c0b2fd1..389cffe85e7 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_looptri(surmd->bvhtree, surmd->dm, 0.0, 2, 6);
+ bvhtree_from_mesh_get(surmd->bvhtree, surmd->dm, BVHTREE_FROM_LOOPTRI);
else
- bvhtree_from_mesh_edges(surmd->bvhtree, surmd->dm, 0.0, 2, 6);
+ bvhtree_from_mesh_get(surmd->bvhtree, surmd->dm, BVHTREE_FROM_EDGES);
}
}
diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c
index fc605dd48e1..5006fe4a6e0 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_looptri(&treeData, tdm, 0.0, 2, 6);
+ bvhtree_from_mesh_get(&treeData, tdm, BVHTREE_FROM_LOOPTRI);
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 09991887f69..c60c9690ac3 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_verts(&treeData_v, target, 0.0, 2, 6);
+ bvhtree_from_mesh_get(&treeData_v, target, BVHTREE_FROM_VERTS);
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_edges(&treeData_e, target, 0.0, 2, 6);
+ bvhtree_from_mesh_get(&treeData_e, target, BVHTREE_FROM_EDGES);
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_looptri(&treeData_f, target, 0.0, 2, 6);
+ bvhtree_from_mesh_get(&treeData_f, target, BVHTREE_FROM_LOOPTRI);
if (treeData_f.tree == NULL) {
OUT_OF_MEMORY();
return;