diff options
author | Jacques Lucke <jacques@blender.org> | 2021-01-11 20:39:12 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-01-11 20:39:12 +0300 |
commit | b3d34a6690a68e6922bc0f6d7a66482a12625b78 (patch) | |
tree | daba9c19d2b09bf2d7b17cef09514c7f5530d3ca /source/blender/blenlib/intern/delaunay_2d.cc | |
parent | 3c112c5e46828e093c81a74a9b258aa354cd9290 (diff) |
use new style for isect_seg_seg and cross_polytemp-experimental-cpp-math-refactor
Diffstat (limited to 'source/blender/blenlib/intern/delaunay_2d.cc')
-rw-r--r-- | source/blender/blenlib/intern/delaunay_2d.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/blenlib/intern/delaunay_2d.cc b/source/blender/blenlib/intern/delaunay_2d.cc index a7693fea136..c4daa776d2f 100644 --- a/source/blender/blenlib/intern/delaunay_2d.cc +++ b/source/blender/blenlib/intern/delaunay_2d.cc @@ -1664,10 +1664,11 @@ void fill_crossdata_for_intersect(const FatCo<T> &curco, BLI_assert(se_vcva->vert == vc && se_vcva->next->vert == va); BLI_assert(se_vcvb->vert == vc && se_vcvb->next->vert == vb); UNUSED_VARS_NDEBUG(vc); - auto isect = vec2<T>::isect_seg_seg(va->co.exact, vb->co.exact, curco.exact, v2->co.exact); + auto isect = isect_seg_seg(va->co.exact, vb->co.exact, curco.exact, v2->co.exact); + using isect_result = decltype(isect); T &lambda = isect.lambda; switch (isect.kind) { - case vec2<T>::isect_result::LINE_LINE_CROSS: { + case isect_result::LINE_LINE_CROSS: { #ifdef WITH_GMP if (!std::is_same<T, mpq_class>::value) { #else @@ -1695,7 +1696,7 @@ void fill_crossdata_for_intersect(const FatCo<T> &curco, } break; } - case vec2<T>::isect_result::LINE_LINE_EXACT: { + case isect_result::LINE_LINE_EXACT: { if (lambda == 0) { fill_crossdata_for_through_vert(va, se_vcva, cd, cd_next); } @@ -1710,7 +1711,7 @@ void fill_crossdata_for_intersect(const FatCo<T> &curco, } break; } - case vec2<T>::isect_result::LINE_LINE_NONE: { + case isect_result::LINE_LINE_NONE: { #ifdef WITH_GMP if (std::is_same<T, mpq_class>::value) { BLI_assert(false); @@ -1726,7 +1727,7 @@ void fill_crossdata_for_intersect(const FatCo<T> &curco, } break; } - case vec2<T>::isect_result::LINE_LINE_COLINEAR: { + case isect_result::LINE_LINE_COLINEAR: { if (distance_squared(va->co.approx, v2->co.approx) <= distance_squared(vb->co.approx, v2->co.approx)) { fill_crossdata_for_through_vert(va, se_vcva, cd, cd_next); |