diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-08-21 10:05:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-08-21 10:09:18 +0300 |
commit | c727fc59abe2b7e525bdc6594bbd7ec3285936e0 (patch) | |
tree | dfcadf23e28c2464655f4c06a5f94621721fe0c2 /source/blender/blenkernel/intern/constraint.c | |
parent | a98b02ff941edb1d92892f520641433582754f0d (diff) |
BVH-raycast: ensure input direction is unit-length
This was already the case for most users of ray-cast.
Doing this avoids 2x normalize calls per ray-cast in many places.
Diffstat (limited to 'source/blender/blenkernel/intern/constraint.c')
-rw-r--r-- | source/blender/blenkernel/intern/constraint.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/constraint.c b/source/blender/blenkernel/intern/constraint.c index e7f6210fef4..2aba4fcde27 100644 --- a/source/blender/blenkernel/intern/constraint.c +++ b/source/blender/blenkernel/intern/constraint.c @@ -4106,6 +4106,7 @@ static void followtrack_evaluate(bConstraint *con, bConstraintOb *cob, ListBase mul_v3_m4v3(ray_end, imat, cob->matrix[3]); sub_v3_v3v3(ray_nor, ray_end, ray_start); + normalize_v3(ray_nor); bvhtree_from_mesh_looptri(&treeData, target, 0.0f, 4, 6); |