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:
authorCampbell Barton <ideasman42@gmail.com>2014-03-12 08:50:18 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-03-12 11:30:37 +0400
commit921c829bcf51c6cf55456f4983a3647569592ba4 (patch)
tree69ef129b8180c697b8544ce22350c4b40a9a6a1d /source/blender/blenkernel/intern/editmesh_bvh.c
parent2d4de2742c47256ae0b9ce298b5cf3cefe62daee (diff)
Code cleanup: redundant normalize in bmbvh ray cast
Diffstat (limited to 'source/blender/blenkernel/intern/editmesh_bvh.c')
-rw-r--r--source/blender/blenkernel/intern/editmesh_bvh.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/blenkernel/intern/editmesh_bvh.c b/source/blender/blenkernel/intern/editmesh_bvh.c
index 018a9198f34..943469eb4f0 100644
--- a/source/blender/blenkernel/intern/editmesh_bvh.c
+++ b/source/blender/blenkernel/intern/editmesh_bvh.c
@@ -217,11 +217,8 @@ static void bmbvh_ray_cast_cb(void *userdata, int index, const BVHTreeRay *ray,
copy_v3_v3(hit->no, ltri[0]->f->no);
- copy_v3_v3(hit->co, ray->direction);
- normalize_v3(hit->co);
- mul_v3_fl(hit->co, dist);
- add_v3_v3(hit->co, ray->origin);
-
+ madd_v3_v3v3fl(hit->co, ray->origin, ray->direction, dist);
+
copy_v2_v2(bmcb_data->uv, uv);
}
}
@@ -310,10 +307,7 @@ static void bmbvh_find_face_segment_cb(void *userdata, int index, const BVHTreeR
copy_v3_v3(hit->no, ltri[0]->f->no);
- copy_v3_v3(hit->co, ray->direction);
- normalize_v3(hit->co);
- mul_v3_fl(hit->co, dist);
- add_v3_v3(hit->co, ray->origin);
+ madd_v3_v3v3fl(hit->co, ray->origin, ray->direction, dist);
copy_v2_v2(bmcb_data->uv, uv);
}