use const ref and Vertex_handle() functor

This commit is contained in:
Jane Tournois 2021-09-10 14:25:27 +02:00
parent 9a56423274
commit 6c96e4ad52
1 changed files with 13 additions and 5 deletions

View File

@ -4716,22 +4716,30 @@ namespace HomogeneousKernelFunctors {
{
typename K::Construct_source_2 source;
typename K::Construct_target_2 target;
typename K::Construct_vertex_2 vertex;
typename K::Construct_circumcenter_2 circumcenter;
typename K::Orientation_2 orientation;
const Point_2 a = source(s);
const Point_2 b = target(s);
const Point_2& a = source(s);
const Point_2& b = target(s);
CGAL_assertion(a != b);
const Point_2& p0 = vertex(t, 0);
const Point_2& p1 = vertex(t, 1);
const Point_2& p2 = vertex(t, 2);
CGAL_assertion(p0 != p1 && p1 != p2 && p2 != p0);
const Point_2 cc = circumcenter(t);
CGAL::Orientation o_abc = orientation(a, b, cc);
if (o_abc == CGAL::COLLINEAR)
return CGAL::ON_ORIENTED_BOUNDARY;
CGAL::Orientation o_abt = orientation(a, b, t[0]);
CGAL::Orientation o_abt = orientation(a, b, p0);
if (o_abt == CGAL::COLLINEAR)
o_abt = orientation(a, b, t[1]);
o_abt = orientation(a, b, p1);
if (o_abt == CGAL::COLLINEAR)
o_abt = orientation(a, b, t[2]);
o_abt = orientation(a, b, p2);
CGAL_assertion(o_abt != CGAL::COLLINEAR);
if (o_abc == o_abt) return CGAL::ON_POSITIVE_SIDE;