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>2016-01-23 05:44:20 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-01-23 05:48:31 +0300
commit90293a8da375b785fa58d3f56de1b286072107c1 (patch)
tree04d39cc37ce4881232370e4c83513a4949e61f90 /source/blender/editors/mesh/editmesh_knife.c
parent456e7be9d2ed4f6534995ef6754376649a815ea4 (diff)
Math Lib: optimize segment-plane clipping
Calculate the clipped min/max factor along the segment, only applying to the coordinates at the end (will give better precision too). Also make split input/output args.
Diffstat (limited to 'source/blender/editors/mesh/editmesh_knife.c')
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index 3cef5478503..89d3cf7db05 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -1439,7 +1439,10 @@ static bool point_is_visible(
copy_v3_v3(view_clip[0], p_ofs);
madd_v3_v3v3fl(view_clip[1], p_ofs, view, dist);
- if (clip_segment_v3_plane_n(view_clip[0], view_clip[1], kcd->vc.rv3d->clip_local, 6)) {
+ if (clip_segment_v3_plane_n(
+ view_clip[0], view_clip[1], kcd->vc.rv3d->clip_local, 6,
+ view_clip[0], view_clip[1]))
+ {
dist = len_v3v3(p_ofs, view_clip[1]);
}
}