diff options
author | Germano <germano.costa@ig.com.br> | 2018-05-03 20:26:39 +0300 |
---|---|---|
committer | Germano <germano.costa@ig.com.br> | 2018-05-03 20:26:39 +0300 |
commit | ac19483e632bd3e2388a6a0de2db753efe33a860 (patch) | |
tree | a7b7433b51a8501875ab142658749b3ded6b224d /source/blender/blenkernel/intern/constraint.c | |
parent | a5d0597b927d90c3621f8a40b0703cc158800fb8 (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/blenkernel/intern/constraint.c')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index 934cfbe9374..4689de825b2 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -3508,9 +3508,9 @@ static void shrinkwrap_get_tarmat(bConstraint *con, bConstraintOb *cob, bConstra nearest.dist_sq = FLT_MAX; if (scon->shrinkType == MOD_SHRINKWRAP_NEAREST_VERTEX) - bvhtree_from_mesh_get(&treeData, target, BVHTREE_FROM_VERTS); + bvhtree_from_mesh_get(&treeData, target, BVHTREE_FROM_VERTS, 2); else - bvhtree_from_mesh_get(&treeData, target, BVHTREE_FROM_LOOPTRI); + bvhtree_from_mesh_get(&treeData, target, BVHTREE_FROM_LOOPTRI, 2); if (treeData.tree == NULL) { fail = true; @@ -4178,7 +4178,7 @@ static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase sub_v3_v3v3(ray_nor, ray_end, ray_start); normalize_v3(ray_nor); - bvhtree_from_mesh_looptri(&treeData, target, 0.0f, 4, 6); + bvhtree_from_mesh_get(&treeData, target, BVHTREE_FROM_LOOPTRI, 4); hit.dist = BVH_RAYCAST_DIST_MAX; hit.index = -1; |