intorduce the functiom

bool compare(const Point &p, const Point &q) const
This commit is contained in:
Mariette Yvinec 1998-07-21 12:30:47 +00:00
parent fc061cf0ff
commit f58e8ffb1c
1 changed files with 23 additions and 16 deletions

View File

@ -39,6 +39,10 @@ public:
return CGAL_compare_y(p, q);
}
bool compare(const Point &p, const Point &q) const
{
return (x(p)==x(q)) && (y(p)==y(q));
}
CGAL_Orientation orientation(const Point &p,
const Point &q,
@ -48,28 +52,31 @@ public:
}
CGAL_Orientation extremal(const Point &p,
CGAL_Orientation extremal(const Point &p,
const Point &q,
const Point &r) const
{
if (p==q) return CGAL_COLLINEAR;
if (p==r) return CGAL_COLLINEAR;
if (r==q) return CGAL_COLLINEAR;
return CGAL_orientation(p, q, r);
}
{
if (compare(p,q)) return CGAL_COLLINEAR;
if (compare(p,r)) return CGAL_COLLINEAR;
if (compare(r,q)) return CGAL_COLLINEAR;
return CGAL_orientationC2(x(p), y(p), x(q), y(q), x(r), y(r));
}
CGAL_Oriented_side side_of_oriented_circle(const Point &p,
const Point &q,
const Point &r,
const Point &s) const
{
if (p==s) return CGAL_ON_ORIENTED_BOUNDARY;
if (q==s) return CGAL_ON_ORIENTED_BOUNDARY;
if (r==s) return CGAL_ON_ORIENTED_BOUNDARY;
return CGAL_side_of_oriented_circle(p, q, r, s);
}
{
if (compare(p,s)) return CGAL_ON_ORIENTED_BOUNDARY;
if (compare(q,s)) return CGAL_ON_ORIENTED_BOUNDARY;
if (compare(r,s)) return CGAL_ON_ORIENTED_BOUNDARY;
return CGAL_side_of_oriented_circleC2(x(p), y(p),
x(q), y(q),
x(r), y(r),
x(s), y(s));
}
};