mirror of https://github.com/CGAL/cgal
use const ref and Vertex_handle() functor
This commit is contained in:
parent
9a56423274
commit
6c96e4ad52
|
|
@ -4716,22 +4716,30 @@ namespace HomogeneousKernelFunctors {
|
||||||
{
|
{
|
||||||
typename K::Construct_source_2 source;
|
typename K::Construct_source_2 source;
|
||||||
typename K::Construct_target_2 target;
|
typename K::Construct_target_2 target;
|
||||||
|
typename K::Construct_vertex_2 vertex;
|
||||||
typename K::Construct_circumcenter_2 circumcenter;
|
typename K::Construct_circumcenter_2 circumcenter;
|
||||||
typename K::Orientation_2 orientation;
|
typename K::Orientation_2 orientation;
|
||||||
|
|
||||||
const Point_2 a = source(s);
|
const Point_2& a = source(s);
|
||||||
const Point_2 b = target(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);
|
const Point_2 cc = circumcenter(t);
|
||||||
|
|
||||||
CGAL::Orientation o_abc = orientation(a, b, cc);
|
CGAL::Orientation o_abc = orientation(a, b, cc);
|
||||||
if (o_abc == CGAL::COLLINEAR)
|
if (o_abc == CGAL::COLLINEAR)
|
||||||
return CGAL::ON_ORIENTED_BOUNDARY;
|
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)
|
if (o_abt == CGAL::COLLINEAR)
|
||||||
o_abt = orientation(a, b, t[1]);
|
o_abt = orientation(a, b, p1);
|
||||||
if (o_abt == CGAL::COLLINEAR)
|
if (o_abt == CGAL::COLLINEAR)
|
||||||
o_abt = orientation(a, b, t[2]);
|
o_abt = orientation(a, b, p2);
|
||||||
CGAL_assertion(o_abt != CGAL::COLLINEAR);
|
CGAL_assertion(o_abt != CGAL::COLLINEAR);
|
||||||
|
|
||||||
if (o_abc == o_abt) return CGAL::ON_POSITIVE_SIDE;
|
if (o_abc == o_abt) return CGAL::ON_POSITIVE_SIDE;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue