diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-20 04:47:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-20 04:47:17 +0300 |
commit | de32dc6b275f253348d316077ab8c5f86a85908a (patch) | |
tree | 660429c47221f592fd10c34e06376fbcfc235651 /source/blender/editors/mesh | |
parent | 470407ec3bac11ae5a5c6174a6e9630caa1a42f7 (diff) |
Cleanup: rename 3D view ray calculation functions
Using near far and optionally clipping planes is
involved and not needed in many cases.
Rename so a simpler version of this function can be added.
Diffstat (limited to 'source/blender/editors/mesh')
-rw-r--r-- | source/blender/editors/mesh/editmesh_knife.c | 6 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_utils.c | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index f83bc7d7d34..2fa39a7462b 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1542,8 +1542,8 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd) } /* unproject screen line */ - ED_view3d_win_to_segment(kcd->ar, kcd->vc.v3d, s1, v1, v3, true); - ED_view3d_win_to_segment(kcd->ar, kcd->vc.v3d, s2, v2, v4, true); + ED_view3d_win_to_segment_clipped(kcd->ar, kcd->vc.v3d, s1, v1, v3, true); + ED_view3d_win_to_segment_clipped(kcd->ar, kcd->vc.v3d, s2, v2, v4, true); mul_m4_v3(kcd->ob->imat, v1); mul_m4_v3(kcd->ob->imat, v2); @@ -1551,7 +1551,7 @@ static void knife_find_line_hits(KnifeTool_OpData *kcd) mul_m4_v3(kcd->ob->imat, v4); /* numeric error, 'v1' -> 'v2', 'v2' -> 'v4' can end up being ~2000 units apart in otho mode - * (from ED_view3d_win_to_segment_clip() above) + * (from ED_view3d_win_to_segment_clipped() above) * this gives precision error; rather then solving properly * (which may involve using doubles everywhere!), * limit the distance between these points */ diff --git a/source/blender/editors/mesh/editmesh_utils.c b/source/blender/editors/mesh/editmesh_utils.c index 7a344be8e5a..f1320966516 100644 --- a/source/blender/editors/mesh/editmesh_utils.c +++ b/source/blender/editors/mesh/editmesh_utils.c @@ -1499,7 +1499,7 @@ bool BMBVH_EdgeVisible(struct BMBVHTree *tree, BMEdge *e, ARegion *ar, View3D *v ar->winy / 2.0f, }; - ED_view3d_win_to_segment(ar, v3d, mval_f, origin, end, false); + ED_view3d_win_to_segment_clipped(ar, v3d, mval_f, origin, end, false); invert_m4_m4(invmat, obedit->obmat); mul_m4_v3(invmat, origin); |