mirror of https://github.com/CGAL/cgal
change word logical operators in sdglinf include
This commit is contained in:
parent
2f3f3d0885
commit
341d158a3f
|
|
@ -61,12 +61,12 @@ private:
|
|||
else {
|
||||
// here both cmpxpq != EQUAL and cmpypq != EQUAL
|
||||
bool is_monotone =
|
||||
( ( ( cmpxpr == -cmpxqr ) and
|
||||
( cmpypr == -cmpyqr ) ) or
|
||||
( ( cmpxpq == cmpxpr) and ( cmpxpr == cmpxqr ) and
|
||||
( cmpypq == cmpypr) and ( cmpypr == cmpyqr ) ) or
|
||||
( (-cmpxpq == cmpxpr) and ( cmpxpr == cmpxqr) and
|
||||
(-cmpypq == cmpypr) and ( cmpypr == cmpyqr) ) ) ;
|
||||
( ( ( cmpxpr == -cmpxqr ) &&
|
||||
( cmpypr == -cmpyqr ) ) ||
|
||||
( ( cmpxpq == cmpxpr) && ( cmpxpr == cmpxqr ) &&
|
||||
( cmpypq == cmpypr) && ( cmpypr == cmpyqr ) ) ||
|
||||
( (-cmpxpq == cmpxpr) && ( cmpxpr == cmpxqr) &&
|
||||
(-cmpypq == cmpypr) && ( cmpypr == cmpyqr) ) ) ;
|
||||
|
||||
//std::cout << "debug is_monotone=" << is_monotone << std::endl;
|
||||
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ public:
|
|||
unsigned int cnt = 0;
|
||||
do {
|
||||
vh = vc1;
|
||||
CGAL_assertion(not is_infinite(vh));
|
||||
CGAL_assertion(! is_infinite(vh));
|
||||
if (is_infinite(vh)) {
|
||||
os << "vertex " << ++cnt << " : " << inf_vertex << std::endl;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -97,9 +97,9 @@ public: // compute_supporting_line(q.supporting_segment(), a1, b1, c1);
|
|||
// direction is (1, 0)
|
||||
|
||||
Compare_y_2 cmpy;
|
||||
if (((cmpy(q, p) == LARGER) and
|
||||
(s == ON_NEGATIVE_SIDE) ) or
|
||||
((cmpy(q, p) == SMALLER) and
|
||||
if (((cmpy(q, p) == LARGER) &&
|
||||
(s == ON_NEGATIVE_SIDE) ) ||
|
||||
((cmpy(q, p) == SMALLER) &&
|
||||
(s == ON_POSITIVE_SIDE) ) ) {
|
||||
b = -b;
|
||||
c = -c;
|
||||
|
|
@ -126,9 +126,9 @@ public: // compute_supporting_line(q.supporting_segment(), a1, b1, c1);
|
|||
// direction is (0, -1)
|
||||
|
||||
Compare_x_2 cmpx;
|
||||
if (((cmpx(q, p) == LARGER) and
|
||||
(s == ON_NEGATIVE_SIDE) ) or
|
||||
((cmpx(q, p) == SMALLER) and
|
||||
if (((cmpx(q, p) == LARGER) &&
|
||||
(s == ON_NEGATIVE_SIDE) ) ||
|
||||
((cmpx(q, p) == SMALLER) &&
|
||||
(s == ON_POSITIVE_SIDE) ) ) {
|
||||
a = -a;
|
||||
c = -c;
|
||||
|
|
@ -143,9 +143,9 @@ public: // compute_supporting_line(q.supporting_segment(), a1, b1, c1);
|
|||
Homogeneous_point_2
|
||||
compute_linf_projection_hom(const Line_2& l, const Point_2& p)
|
||||
{
|
||||
//CGAL_precondition( not l.is_degenerate() );
|
||||
//CGAL_precondition( ! l.is_degenerate() );
|
||||
CGAL_precondition(
|
||||
(CGAL::sign(l.a()) != ZERO) or (CGAL::sign(l.b()) != ZERO) );
|
||||
(CGAL::sign(l.a()) != ZERO) || (CGAL::sign(l.b()) != ZERO) );
|
||||
|
||||
Sign signa = CGAL::sign(l.a());
|
||||
Sign signb = CGAL::sign(l.b());
|
||||
|
|
@ -182,9 +182,9 @@ public: // compute_supporting_line(q.supporting_segment(), a1, b1, c1);
|
|||
Point_2
|
||||
compute_linf_projection_nonhom(const Line_2& l, const Point_2& p)
|
||||
{
|
||||
//CGAL_precondition( not l.is_degenerate() );
|
||||
//CGAL_precondition( ! l.is_degenerate() );
|
||||
CGAL_precondition(
|
||||
(CGAL::sign(l.a()) != ZERO) or (CGAL::sign(l.b()) != ZERO) );
|
||||
(CGAL::sign(l.a()) != ZERO) || (CGAL::sign(l.b()) != ZERO) );
|
||||
|
||||
Sign signa = CGAL::sign(l.a());
|
||||
Sign signb = CGAL::sign(l.b());
|
||||
|
|
@ -221,7 +221,7 @@ public: // compute_supporting_line(q.supporting_segment(), a1, b1, c1);
|
|||
Homogeneous_point_2
|
||||
compute_horizontal_projection_hom(const Line_2& l, const Point_2& p)
|
||||
{
|
||||
//CGAL_precondition( not l.is_horizontal() );
|
||||
//CGAL_precondition( ! l.is_horizontal() );
|
||||
|
||||
CGAL_precondition(
|
||||
(CGAL::sign(l.a()) != ZERO) );
|
||||
|
|
@ -239,7 +239,7 @@ public: // compute_supporting_line(q.supporting_segment(), a1, b1, c1);
|
|||
Point_2
|
||||
compute_horizontal_projection(const Line_2& l, const Point_2& p)
|
||||
{
|
||||
//CGAL_precondition( not l.is_horizontal() );
|
||||
//CGAL_precondition( ! l.is_horizontal() );
|
||||
CGAL_precondition(
|
||||
(CGAL::sign(l.a()) != ZERO) );
|
||||
|
||||
|
|
@ -256,7 +256,7 @@ public: // compute_supporting_line(q.supporting_segment(), a1, b1, c1);
|
|||
Homogeneous_point_2
|
||||
compute_vertical_projection_hom(const Line_2& l, const Point_2& p)
|
||||
{
|
||||
//CGAL_precondition( not l.is_horizontal() );
|
||||
//CGAL_precondition( ! l.is_horizontal() );
|
||||
CGAL_precondition(
|
||||
(CGAL::sign(l.b()) != ZERO) );
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ public: // compute_supporting_line(q.supporting_segment(), a1, b1, c1);
|
|||
Point_2
|
||||
compute_vertical_projection(const Line_2& l, const Point_2& p)
|
||||
{
|
||||
//CGAL_precondition( not l.is_horizontal() );
|
||||
//CGAL_precondition( ! l.is_horizontal() );
|
||||
CGAL_precondition(
|
||||
(CGAL::sign(l.b()) != ZERO) );
|
||||
|
||||
|
|
@ -324,7 +324,7 @@ public: // compute_supporting_line(q.supporting_segment(), a1, b1, c1);
|
|||
a = p.y() - q.y();
|
||||
b = q.x() - p.x();
|
||||
|
||||
CGAL_assertion((CGAL::sign(a) != ZERO) or
|
||||
CGAL_assertion((CGAL::sign(a) != ZERO) ||
|
||||
(CGAL::sign(b) != ZERO)) ;
|
||||
|
||||
c = p.x() * q.y() - q.x() * p.y();
|
||||
|
|
@ -478,7 +478,7 @@ public: // compute_supporting_line(q.supporting_segment(), a1, b1, c1);
|
|||
const Site_2 & p, const Site_2 & q,
|
||||
const bool samexpq)
|
||||
{
|
||||
const RT lineval = coord_at(l, closest_coord, not samexpq);
|
||||
const RT lineval = coord_at(l, closest_coord, ! samexpq);
|
||||
return CGAL::abs(lineval - ((samexpq) ? p.point().x() : p.point().y()))
|
||||
<
|
||||
CGAL::abs((samexpq)? p.point().y() - q.point().y() :
|
||||
|
|
@ -598,7 +598,7 @@ public:
|
|||
CGAL_SDG_DEBUG(std::cout << "debug bounded_side_of_bbox (p q r) = ("
|
||||
<< p << ") (" << q << ") (" << r << ")" << std::endl; );
|
||||
|
||||
if ((CGAL::compare(p.x(), q.x()) == EQUAL) and
|
||||
if ((CGAL::compare(p.x(), q.x()) == EQUAL) &&
|
||||
(CGAL::compare(p.y(), q.y()) == EQUAL) ) {
|
||||
return ON_BOUNDARY;
|
||||
}
|
||||
|
|
@ -661,7 +661,7 @@ public:
|
|||
<< "oslsrc=" << oslsrc << " osltrg=" << osltrg
|
||||
<< std::endl;);
|
||||
|
||||
if ((oslsrc == ON_POSITIVE_SIDE) or
|
||||
if ((oslsrc == ON_POSITIVE_SIDE) ||
|
||||
(osltrg == ON_POSITIVE_SIDE) )
|
||||
{
|
||||
return true;
|
||||
|
|
@ -699,7 +699,7 @@ public:
|
|||
<< "oslsrc=" << oslsrc << " osltrg=" << osltrg
|
||||
<< std::endl;);
|
||||
|
||||
if ((oslsrc == ON_NEGATIVE_SIDE) or
|
||||
if ((oslsrc == ON_NEGATIVE_SIDE) ||
|
||||
(osltrg == ON_NEGATIVE_SIDE) )
|
||||
{
|
||||
return true;
|
||||
|
|
@ -738,7 +738,7 @@ public:
|
|||
Compare_y_2 cmpy;
|
||||
|
||||
bool is_ssrc_positive;
|
||||
if (same_points(q, s.source_site()) or
|
||||
if (same_points(q, s.source_site()) ||
|
||||
same_points(p, s.source_site()) ) {
|
||||
is_ssrc_positive = false;
|
||||
} else {
|
||||
|
|
@ -746,7 +746,7 @@ public:
|
|||
(cmpx(pp, ssrc) == cmpxpq) : (cmpy(pp, ssrc) == cmpypq) ;
|
||||
const bool conflq = eqcmp ?
|
||||
(cmpy(ssrc, qq) == cmpypq) : (cmpx(ssrc, qq) == cmpxpq) ;
|
||||
is_ssrc_positive = (conflp and conflq);
|
||||
is_ssrc_positive = (conflp && conflq);
|
||||
}
|
||||
if (is_ssrc_positive) {
|
||||
CGAL_SDG_DEBUG(std::cout << "debug is_segment_inside_inf_box "
|
||||
|
|
@ -755,7 +755,7 @@ public:
|
|||
}
|
||||
|
||||
bool is_strg_positive;
|
||||
if (same_points(q, s.target_site()) or
|
||||
if (same_points(q, s.target_site()) ||
|
||||
same_points(p, s.target_site()) ) {
|
||||
is_strg_positive = false;
|
||||
} else {
|
||||
|
|
@ -763,7 +763,7 @@ public:
|
|||
(cmpx(pp, strg) == cmpxpq) : (cmpy(pp, strg) == cmpypq) ;
|
||||
const bool conflq = eqcmp ?
|
||||
(cmpy(strg, qq) == cmpypq) : (cmpx(strg, qq) == cmpxpq) ;
|
||||
is_strg_positive = (conflp and conflq);
|
||||
is_strg_positive = (conflp && conflq);
|
||||
}
|
||||
|
||||
if (is_strg_positive) {
|
||||
|
|
@ -815,8 +815,8 @@ public:
|
|||
(CGAL::sign(cmpxsrcip * cmpxiptrg +
|
||||
cmpysrcip * cmpyiptrg )) == POSITIVE;
|
||||
|
||||
if ((os_lqc_ip == ON_POSITIVE_SIDE) and
|
||||
(os_lcp_ip == ON_POSITIVE_SIDE) and
|
||||
if ((os_lqc_ip == ON_POSITIVE_SIDE) &&
|
||||
(os_lcp_ip == ON_POSITIVE_SIDE) &&
|
||||
is_ip_inside_segment ) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
@ -853,26 +853,26 @@ public:
|
|||
Are_same_points_2 same_points;
|
||||
|
||||
bool is_ssrc_positive;
|
||||
if (same_points(q, s.source_site()) or
|
||||
if (same_points(q, s.source_site()) ||
|
||||
same_points(p, s.source_site()) ) {
|
||||
is_ssrc_positive = false;
|
||||
} else {
|
||||
Oriented_side os_lqc_ssrc = oriented_side_of_line(lqc, ssrc);
|
||||
Oriented_side os_lcp_ssrc = oriented_side_of_line(lcp, ssrc);
|
||||
is_ssrc_positive =
|
||||
((os_lqc_ssrc == ON_POSITIVE_SIDE) and
|
||||
((os_lqc_ssrc == ON_POSITIVE_SIDE) &&
|
||||
(os_lcp_ssrc == ON_POSITIVE_SIDE) ) ;
|
||||
}
|
||||
|
||||
bool is_strg_positive;
|
||||
if (same_points(q, s.target_site()) or
|
||||
if (same_points(q, s.target_site()) ||
|
||||
same_points(p, s.target_site()) ) {
|
||||
is_strg_positive = false;
|
||||
} else {
|
||||
Oriented_side os_lqc_strg = oriented_side_of_line(lqc, strg);
|
||||
Oriented_side os_lcp_strg = oriented_side_of_line(lcp, strg);
|
||||
is_strg_positive =
|
||||
((os_lqc_strg == ON_POSITIVE_SIDE) and
|
||||
((os_lqc_strg == ON_POSITIVE_SIDE) &&
|
||||
(os_lcp_strg == ON_POSITIVE_SIDE) ) ;
|
||||
}
|
||||
|
||||
|
|
@ -882,7 +882,7 @@ public:
|
|||
<< " isstrgpos=" << is_strg_positive
|
||||
<< std::endl;);
|
||||
|
||||
if (is_ssrc_positive or is_strg_positive) {
|
||||
if (is_ssrc_positive || is_strg_positive) {
|
||||
CGAL_SDG_DEBUG(std::cout << "debug is_segment_inside_inf_box "
|
||||
<< "endpoint inside" << std::endl;);
|
||||
return true;
|
||||
|
|
@ -935,8 +935,8 @@ public:
|
|||
(CGAL::sign(cmpxsrcip * cmpxiptrg +
|
||||
cmpysrcip * cmpyiptrg )) == POSITIVE;
|
||||
|
||||
if ((os_lqc_ip == ON_POSITIVE_SIDE) and
|
||||
(os_lcp_ip == ON_POSITIVE_SIDE) and
|
||||
if ((os_lqc_ip == ON_POSITIVE_SIDE) &&
|
||||
(os_lcp_ip == ON_POSITIVE_SIDE) &&
|
||||
is_ip_inside_segment ) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
@ -976,9 +976,9 @@ public:
|
|||
Oriented_side os_lhor_strg = oriented_side_of_line(lhor, strg);
|
||||
Oriented_side os_lver_strg = oriented_side_of_line(lver, strg);
|
||||
|
||||
if (((os_lhor_ssrc == orside) and
|
||||
(os_lver_ssrc == orside)) or
|
||||
((os_lhor_strg == orside) and
|
||||
if (((os_lhor_ssrc == orside) &&
|
||||
(os_lver_ssrc == orside)) ||
|
||||
((os_lhor_strg == orside) &&
|
||||
(os_lver_strg == orside)) ) {
|
||||
CGAL_SDG_DEBUG(std::cout
|
||||
<< "debug intersects_segment_side_of_wedge "
|
||||
|
|
@ -1053,8 +1053,8 @@ public:
|
|||
(CGAL::sign(cmpxsrcip * cmpxiptrg +
|
||||
cmpysrcip * cmpyiptrg )) == POSITIVE;
|
||||
|
||||
if ((os_lhor_ip == orside) and
|
||||
(os_lver_ip == orside) and
|
||||
if ((os_lhor_ip == orside) &&
|
||||
(os_lver_ip == orside) &&
|
||||
is_ip_inside_segment ) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
@ -1113,7 +1113,7 @@ public:
|
|||
{
|
||||
CGAL_assertion( t.is_segment() );
|
||||
CGAL_assertion( s.is_segment() );
|
||||
CGAL_assertion(not is_site_h_or_v(s));
|
||||
CGAL_assertion(! is_site_h_or_v(s));
|
||||
|
||||
Segment_2 seg = s.segment();
|
||||
|
||||
|
|
@ -1132,7 +1132,7 @@ public:
|
|||
|
||||
//sandeep: lhor, lver remains same for left turn and right turn
|
||||
|
||||
if (dxs == NEGATIVE and dys == NEGATIVE) {
|
||||
if (dxs == NEGATIVE && dys == NEGATIVE) {
|
||||
|
||||
Line_2 lhor = Line_2(0,1,-pp.y());
|
||||
Line_2 lver = Line_2(-1,0,pp.x());
|
||||
|
|
@ -1140,7 +1140,7 @@ public:
|
|||
return intersects_segment_side_of_wedge(t,
|
||||
lhor, lver,
|
||||
os_lseg_p);
|
||||
} else if (dxs == POSITIVE and dys == NEGATIVE) {
|
||||
} else if (dxs == POSITIVE && dys == NEGATIVE) {
|
||||
|
||||
Line_2 lhor = Line_2(0,-1,pp.y());
|
||||
Line_2 lver = Line_2(-1,0,pp.x());
|
||||
|
|
@ -1148,7 +1148,7 @@ public:
|
|||
return intersects_segment_side_of_wedge(t,
|
||||
lhor, lver,
|
||||
os_lseg_p);
|
||||
} else if (dxs == POSITIVE and dys == POSITIVE) {
|
||||
} else if (dxs == POSITIVE && dys == POSITIVE) {
|
||||
|
||||
Line_2 lhor = Line_2(0,-1,pp.y());
|
||||
Line_2 lver = Line_2(1,0,-pp.x());
|
||||
|
|
@ -1197,10 +1197,10 @@ public:
|
|||
|
||||
if (CGAL::orientation( qq, corner1, pp ) == LEFT_TURN) {
|
||||
return intersects_segment_interior_inf_box(s, q, corner1, p)
|
||||
and intersects_segment_interior_inf_box(s, p, corner2, q);
|
||||
&& intersects_segment_interior_inf_box(s, p, corner2, q);
|
||||
} else {
|
||||
return intersects_segment_interior_inf_box(s, q, corner2, p)
|
||||
and intersects_segment_interior_inf_box(s, p, corner1, q);
|
||||
&& intersects_segment_interior_inf_box(s, p, corner1, q);
|
||||
}
|
||||
} // end of intersects_segment_interior_bbox
|
||||
|
||||
|
|
@ -1212,7 +1212,7 @@ public:
|
|||
has_positive_slope(const Site_2 & s)
|
||||
{
|
||||
CGAL_precondition(s.is_segment());
|
||||
CGAL_precondition(not is_site_h_or_v(s));
|
||||
CGAL_precondition(! is_site_h_or_v(s));
|
||||
Compare_x_2 cmpx;
|
||||
Compare_y_2 cmpy;
|
||||
Point_2 src = s.supporting_site().source();
|
||||
|
|
@ -1248,12 +1248,12 @@ public:
|
|||
<< " scmpx=" << scmpx << " scmpy=" << scmpy
|
||||
<< " tcmpx=" << tcmpx << " tcmpy=" << tcmpy
|
||||
<< std::endl;);
|
||||
if ( ((scmpx == EQUAL) and (tcmpx == EQUAL)) // vertical
|
||||
or ((scmpy == EQUAL) and (tcmpy == EQUAL)) // horizontal
|
||||
or ((scmpx == scmpy) and (tcmpx == tcmpy)) // positive
|
||||
or ((scmpx != EQUAL) and (scmpy != EQUAL) and
|
||||
(tcmpx != EQUAL) and (tcmpy != EQUAL) and
|
||||
(scmpx != scmpy) and (tcmpx != tcmpy)) // negative
|
||||
if ( ((scmpx == EQUAL) && (tcmpx == EQUAL)) // vertical
|
||||
|| ((scmpy == EQUAL) && (tcmpy == EQUAL)) // horizontal
|
||||
|| ((scmpx == scmpy) && (tcmpx == tcmpy)) // positive
|
||||
|| ((scmpx != EQUAL) && (scmpy != EQUAL) &&
|
||||
(tcmpx != EQUAL) && (tcmpy != EQUAL) &&
|
||||
(scmpx != scmpy) && (tcmpx != tcmpy)) // negative
|
||||
) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
@ -1266,7 +1266,7 @@ public:
|
|||
Boolean
|
||||
is_site_h_or_v(const Site_2 & s)
|
||||
{
|
||||
return is_site_horizontal(s) or is_site_vertical(s);
|
||||
return is_site_horizontal(s) || is_site_vertical(s);
|
||||
}
|
||||
|
||||
inline
|
||||
|
|
@ -1292,7 +1292,7 @@ public:
|
|||
Boolean
|
||||
is_line_h_or_v(const Line_2 & l)
|
||||
{
|
||||
return (CGAL::sign(l.a()) == ZERO) or (CGAL::sign(l.b()) == ZERO);
|
||||
return (CGAL::sign(l.a()) == ZERO) || (CGAL::sign(l.b()) == ZERO);
|
||||
}
|
||||
|
||||
inline
|
||||
|
|
@ -1320,7 +1320,7 @@ public:
|
|||
Orientation oupt = CGAL::orientation(pu, p.point(), pt);
|
||||
Orientation otpv = CGAL::orientation(pt, p.point(), pv);
|
||||
|
||||
return (oupt == LEFT_TURN) and (otpv == LEFT_TURN);
|
||||
return (oupt == LEFT_TURN) && (otpv == LEFT_TURN);
|
||||
}
|
||||
|
||||
static
|
||||
|
|
@ -1328,7 +1328,7 @@ public:
|
|||
are_in_same_open_halfspace_of(
|
||||
const Site_2 & p, const Site_2 & q, const Site_2 & r)
|
||||
{
|
||||
CGAL_precondition(p.is_point() and q.is_point() and r.is_segment());
|
||||
CGAL_precondition(p.is_point() && q.is_point() && r.is_segment());
|
||||
Line_2 lseg = compute_supporting_line(r.supporting_site());
|
||||
Oriented_side os_lseg_p = oriented_side_of_line(lseg, p.point());
|
||||
if ( os_lseg_p == ON_ORIENTED_BOUNDARY ) {
|
||||
|
|
@ -1359,7 +1359,7 @@ public:
|
|||
RT hvseg_coord(const Site_2 & s, const bool is_hor) {
|
||||
CGAL_assertion(s.is_segment());
|
||||
CGAL_assertion(is_site_horizontal(s) == is_hor);
|
||||
CGAL_assertion(is_site_vertical(s) == (not is_hor));
|
||||
CGAL_assertion(is_site_vertical(s) == (! is_hor));
|
||||
return is_hor ? s.supporting_site().source_site().point().y() :
|
||||
s.supporting_site().source_site().point().x() ;
|
||||
}
|
||||
|
|
@ -1445,13 +1445,13 @@ public:
|
|||
private:
|
||||
inline static bool
|
||||
have_same_bearing(const Line_2 & l1, const Line_2 & l2) {
|
||||
return (CGAL::sign(l1.a()) == CGAL::sign(l2.a())) and
|
||||
return (CGAL::sign(l1.a()) == CGAL::sign(l2.a())) &&
|
||||
(CGAL::sign(l1.b()) == CGAL::sign(l2.b())) ;
|
||||
}
|
||||
|
||||
inline static bool
|
||||
have_opposite_bearing(const Line_2 & l1, const Line_2 & l2) {
|
||||
return (CGAL::sign(l1.a()) == -CGAL::sign(l2.a())) and
|
||||
return (CGAL::sign(l1.a()) == -CGAL::sign(l2.a())) &&
|
||||
(CGAL::sign(l1.b()) == -CGAL::sign(l2.b())) ;
|
||||
}
|
||||
|
||||
|
|
@ -1593,13 +1593,13 @@ public:
|
|||
const Bearing br = bearing(l[i_no]);
|
||||
if ( bearing_outside(bprev, br, bnext) ) {
|
||||
CGAL_assertion_code( const Bearing bropp = (br+4)%8 );
|
||||
CGAL_assertion( not bearing_outside(bprev, bropp, bnext) );
|
||||
CGAL_assertion( ! bearing_outside(bprev, bropp, bnext) );
|
||||
l[i_no] = opposite_line(l[i_no]);
|
||||
is_oriented[i_no] = true;
|
||||
} else {
|
||||
CGAL_assertion( not bearing_outside(bprev, br, bnext) );
|
||||
CGAL_assertion( ! bearing_outside(bprev, br, bnext) );
|
||||
const Bearing bropp = (br+4)%8;
|
||||
if ( not bearing_outside(bprev, bropp, bnext) ) {
|
||||
if ( ! bearing_outside(bprev, bropp, bnext) ) {
|
||||
CGAL_assertion( diffbear == 6 );
|
||||
CGAL_assertion( br % 2 == 1 ); // undecided is axis-parallel
|
||||
const Site_2 & sprev = iprev == 0 ? p : (iprev == 1? q : r);
|
||||
|
|
@ -1677,7 +1677,7 @@ public:
|
|||
{
|
||||
const bool is_psrc_q = is_endpoint_of(p.source_site(), q);
|
||||
const bool is_ptrg_q = is_endpoint_of(p.target_site(), q);
|
||||
const bool have_common_pq = is_psrc_q or is_ptrg_q;
|
||||
const bool have_common_pq = is_psrc_q || is_ptrg_q;
|
||||
Homogeneous_point_2 xpq;
|
||||
if (have_common_pq) {
|
||||
xpq = is_psrc_q ? p.source() : p.target();
|
||||
|
|
@ -1699,9 +1699,9 @@ public:
|
|||
inline static
|
||||
bool is_endpoint_of(const Site_2& p, const Site_2& s)
|
||||
{
|
||||
CGAL_precondition( p.is_point() and s.is_segment() );
|
||||
CGAL_precondition( p.is_point() && s.is_segment() );
|
||||
Are_same_points_2 same_points;
|
||||
return ( same_points(p, s.source_site()) or
|
||||
return ( same_points(p, s.source_site()) ||
|
||||
same_points(p, s.target_site()) );
|
||||
}
|
||||
|
||||
|
|
@ -1845,12 +1845,12 @@ public:
|
|||
<< "s=" << s
|
||||
<< " pt_site=" << pt_site << " other_s=" << other_s
|
||||
<< " t=" << t << std::endl;);
|
||||
CGAL_assertion(not is_site_h_or_v(s));
|
||||
CGAL_assertion(! is_site_h_or_v(s));
|
||||
if (other_s.is_segment()) {
|
||||
// shortcut: when the point pt_site is on a corner of
|
||||
// the Linf square, because it is the endpoint of the
|
||||
// other site which is a segment; return false immediately
|
||||
if ((not is_site_h_or_v(other_s)) and
|
||||
if ((! is_site_h_or_v(other_s)) &&
|
||||
is_endpoint_of(pt_site, other_s)) {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -1868,20 +1868,20 @@ public:
|
|||
{
|
||||
Are_same_points_2 same_points;
|
||||
if (p.is_segment()) { return false; }
|
||||
if (r.is_point() or s.is_point()) { return false; }
|
||||
if (r.is_point() || s.is_point()) { return false; }
|
||||
const bool is_p_rsrc = same_points(p, r.source_site());
|
||||
const bool is_p_rtrg =
|
||||
(not is_p_rsrc) and same_points(p, r.target_site());
|
||||
const bool is_p_endp_of_r = is_p_rsrc or is_p_rtrg;
|
||||
(! is_p_rsrc) && same_points(p, r.target_site());
|
||||
const bool is_p_endp_of_r = is_p_rsrc || is_p_rtrg;
|
||||
if (is_p_endp_of_r) {
|
||||
const bool is_p_ssrc = same_points(p, s.source_site());
|
||||
const bool is_p_strg =
|
||||
(not is_p_ssrc) and same_points(p, s.target_site());
|
||||
const bool is_p_endp_of_s = is_p_ssrc or is_p_strg;
|
||||
(! is_p_ssrc) && same_points(p, s.target_site());
|
||||
const bool is_p_endp_of_s = is_p_ssrc || is_p_strg;
|
||||
if (is_p_endp_of_s) {
|
||||
if (is_site_horizontal(r) and is_site_horizontal(s)) { return true; }
|
||||
if (is_site_vertical(r) and is_site_vertical(s)) { return true; }
|
||||
if ((not is_site_h_or_v(r)) and (not is_site_h_or_v(s))) {
|
||||
if (is_site_horizontal(r) && is_site_horizontal(s)) { return true; }
|
||||
if (is_site_vertical(r) && is_site_vertical(s)) { return true; }
|
||||
if ((! is_site_h_or_v(r)) && (! is_site_h_or_v(s))) {
|
||||
const bool pos_r = has_positive_slope(r);
|
||||
const bool pos_s = has_positive_slope(s);
|
||||
if (pos_r == pos_s) {
|
||||
|
|
@ -1908,8 +1908,8 @@ public:
|
|||
Compare_x_2_Sites_Type scmpx;
|
||||
Compare_y_2_Sites_Type scmpy;
|
||||
const bool is_hor = is_site_horizontal(s);
|
||||
const bool is_ver = (not is_hor) and is_site_vertical(s);
|
||||
if (is_hor or is_ver) {
|
||||
const bool is_ver = (! is_hor) && is_site_vertical(s);
|
||||
if (is_hor || is_ver) {
|
||||
return ( (is_hor) ?
|
||||
scmpy(p, s.source_site()) : scmpx(p, s.source_site()) )
|
||||
== EQUAL;
|
||||
|
|
|
|||
|
|
@ -47,11 +47,11 @@ private:
|
|||
|
||||
private:
|
||||
result_type bisector(const Site_2& p, const Site_2& q) const {
|
||||
if (p.is_point() and q.is_point()) {
|
||||
if (p.is_point() && q.is_point()) {
|
||||
return bisector_PP(p, q);
|
||||
} else if (p.is_point() and q.is_segment()) {
|
||||
} else if (p.is_point() && q.is_segment()) {
|
||||
return bisector_PS(p, q);
|
||||
} else if (p.is_segment() and q.is_point()) {
|
||||
} else if (p.is_segment() && q.is_point()) {
|
||||
return - bisector_PS(q, p);
|
||||
} else { // p.is_segment() and q.is_segment()
|
||||
return bisector_SS(p, q);
|
||||
|
|
@ -60,7 +60,7 @@ private:
|
|||
|
||||
result_type bisector_PP(const Site_2& p, const Site_2& q) const {
|
||||
// adapt from constructions
|
||||
CGAL_assertion(p.is_point() and q.is_point());
|
||||
CGAL_assertion(p.is_point() && q.is_point());
|
||||
Point_2 pp = p.point();
|
||||
Point_2 pq = q.point();
|
||||
//CGAL_SDG_DEBUG(std::cout << "debug bisector infinite "
|
||||
|
|
@ -92,7 +92,7 @@ private:
|
|||
// midpoint m of two points p and q
|
||||
Point_2 m = midpoint(pp, pq);
|
||||
|
||||
if ((cmpabsdxy == EQUAL) or (cmpx == EQUAL) or (cmpy == EQUAL)) {
|
||||
if ((cmpabsdxy == EQUAL) || (cmpx == EQUAL) || (cmpy == EQUAL)) {
|
||||
// bisector is line going through m with direction d;
|
||||
// we will store this line as the union of two rays starting
|
||||
// at m with directions -d (incoming) and d (outgoing)
|
||||
|
|
@ -147,7 +147,7 @@ private:
|
|||
CGAL_SDG_DEBUG(std::cout << "bisector_PS entering with p=" << p
|
||||
<< " q=" << q << std::endl;);
|
||||
|
||||
CGAL_assertion(p.is_point() and q.is_segment());
|
||||
CGAL_assertion(p.is_point() && q.is_segment());
|
||||
Point_2 pnt = p.point();
|
||||
Segment_2 seg = q.segment();
|
||||
Full_Line_2 lseg = q.supporting_site().segment().supporting_line();
|
||||
|
|
@ -156,7 +156,7 @@ private:
|
|||
Compare_x_2 compare_x_2;
|
||||
Compare_y_2 compare_y_2;
|
||||
|
||||
if (same_points(p,q.source_site()) or
|
||||
if (same_points(p,q.source_site()) ||
|
||||
same_points(p,q.target_site())) {
|
||||
//p must be one of the end point of segment q,
|
||||
//and the bisector is a line passing through p
|
||||
|
|
@ -185,7 +185,7 @@ private:
|
|||
Oriented_side side = lseg.oriented_side(pnt);
|
||||
|
||||
// point pp sould not lie on the supporting line of q
|
||||
CGAL_assertion(not (side == ON_ORIENTED_BOUNDARY));
|
||||
CGAL_assertion(! (side == ON_ORIENTED_BOUNDARY));
|
||||
|
||||
Point_2 points[3];
|
||||
unsigned int npts;
|
||||
|
|
@ -277,9 +277,9 @@ private:
|
|||
if (has_lseg_pos_slope) {
|
||||
//segment with positive slope
|
||||
if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
|
||||
and lseg.has_on_positive_side(pnt))
|
||||
or (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
and lseg.has_on_negative_side(pnt)) ) {
|
||||
&& lseg.has_on_positive_side(pnt))
|
||||
|| (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
&& lseg.has_on_negative_side(pnt)) ) {
|
||||
// pcfirst is center of square,
|
||||
// pfirst = phor, upward direction
|
||||
// pclast is center of sqaure, plast = pver, left direction
|
||||
|
|
@ -300,9 +300,9 @@ private:
|
|||
else {
|
||||
//segment with negative slope
|
||||
if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
|
||||
and lseg.has_on_positive_side(pnt))
|
||||
or (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
and lseg.has_on_negative_side(pnt)) ) {
|
||||
&& lseg.has_on_positive_side(pnt))
|
||||
|| (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
&& lseg.has_on_negative_side(pnt)) ) {
|
||||
// pcfirst is center of square,
|
||||
// pfirst = pver, right direction
|
||||
// pclast is center of sqaure, plast = phor, upward dir
|
||||
|
|
@ -356,7 +356,7 @@ private:
|
|||
|
||||
|
||||
result_type bisector_SS(const Site_2& p, const Site_2& q) const {
|
||||
CGAL_precondition( p.is_segment() and q.is_segment() );
|
||||
CGAL_precondition( p.is_segment() && q.is_segment() );
|
||||
|
||||
CGAL_SDG_DEBUG(std::cout << "bisector_SS entering with p=" << p
|
||||
<< " q=" << q << std::endl;);
|
||||
|
|
@ -374,14 +374,14 @@ private:
|
|||
are_same_points(p.source_site(), q.source_site());
|
||||
bool is_psrc_qtrg =
|
||||
are_same_points(p.source_site(), q.target_site());
|
||||
bool is_mid_psrc = is_psrc_qsrc or is_psrc_qtrg;
|
||||
bool is_mid_psrc = is_psrc_qsrc || is_psrc_qtrg;
|
||||
bool is_ptrg_qsrc =
|
||||
are_same_points(p.target_site(), q.source_site());
|
||||
bool is_ptrg_qtrg =
|
||||
are_same_points(p.target_site(), q.target_site());
|
||||
bool is_mid_ptrg = is_ptrg_qsrc or is_ptrg_qtrg;
|
||||
bool is_mid_ptrg = is_ptrg_qsrc || is_ptrg_qtrg;
|
||||
|
||||
bool have_common_endp = is_mid_psrc or is_mid_ptrg;
|
||||
bool have_common_endp = is_mid_psrc || is_mid_ptrg;
|
||||
|
||||
bool optimize_for_line(false);
|
||||
|
||||
|
|
@ -399,7 +399,7 @@ private:
|
|||
Point_2 points[1];
|
||||
Direction_2 dinc, dout;
|
||||
|
||||
if ((not have_common_endp) and are_parallel(p, q)) {
|
||||
if ((! have_common_endp) && are_parallel(p, q)) {
|
||||
// here p and q are parallel,
|
||||
// but not on the same supporting line (precondition)
|
||||
|
||||
|
|
@ -458,7 +458,7 @@ private:
|
|||
|
||||
if (have_common_endp) {
|
||||
// intersection is common point here
|
||||
bool is_mid_qsrc = is_psrc_qsrc or is_ptrg_qsrc;
|
||||
bool is_mid_qsrc = is_psrc_qsrc || is_ptrg_qsrc;
|
||||
const Point_2& mid = is_mid_psrc ? p.source() : p.target();
|
||||
const Point_2& prep = is_mid_psrc ? p.target() : p.source();
|
||||
const Point_2& qrep = is_mid_qsrc ? q.target() : q.source();
|
||||
|
|
@ -517,14 +517,14 @@ private:
|
|||
Comparison_result cmpyqsm = compare_y_2(qsrc, mid);
|
||||
Comparison_result cmpymqt = compare_y_2(mid, qtrg);
|
||||
|
||||
if ((cmpxpsm == cmpxmpt) and (cmpypsm == cmpympt))
|
||||
if ((cmpxpsm == cmpxmpt) && (cmpypsm == cmpympt))
|
||||
{
|
||||
// mid is inside p
|
||||
CGAL_SDG_DEBUG(std::cout <<
|
||||
"debug bisector_SS mid in p" << std::endl;);
|
||||
|
||||
// take any endpoint of q not the same as mid
|
||||
Point_2 qrep = ( (cmpxqsm == EQUAL) or (cmpyqsm == EQUAL) )
|
||||
Point_2 qrep = ( (cmpxqsm == EQUAL) || (cmpyqsm == EQUAL) )
|
||||
? qtrg : qsrc;
|
||||
|
||||
Direction_2 dirq ( Vector_2(mid, qrep) );
|
||||
|
|
@ -554,14 +554,14 @@ private:
|
|||
"debug bisector_SS dout=" << dout << std::endl;);
|
||||
|
||||
} else {
|
||||
if ((cmpxqsm == cmpxmqt) and (cmpyqsm == cmpymqt))
|
||||
if ((cmpxqsm == cmpxmqt) && (cmpyqsm == cmpymqt))
|
||||
{
|
||||
// mid is inside q
|
||||
CGAL_SDG_DEBUG(std::cout <<
|
||||
"debug bisector_SS mid in q" << std::endl;);
|
||||
|
||||
// take any endpoint of p not the same as mid
|
||||
Point_2 prep = ( (cmpxpsm == EQUAL) or (cmpypsm == EQUAL) )
|
||||
Point_2 prep = ( (cmpxpsm == EQUAL) || (cmpypsm == EQUAL) )
|
||||
? ptrg : psrc;
|
||||
|
||||
Direction_2 dirp ( Vector_2(mid, prep) );
|
||||
|
|
@ -665,17 +665,17 @@ private:
|
|||
CGAL_SDG_DEBUG(std::cout << "debug ABCD = " << A << ' ' << B << ' '
|
||||
<< C << ' ' << D << std::endl;);
|
||||
|
||||
if ((CGAL::sign(A) == POSITIVE) and
|
||||
if ((CGAL::sign(A) == POSITIVE) &&
|
||||
(CGAL::sign(B) != NEGATIVE) ) {
|
||||
// A > 0 and B >= 0
|
||||
|
||||
if ((CGAL::sign(C) == POSITIVE) and
|
||||
if ((CGAL::sign(C) == POSITIVE) &&
|
||||
(CGAL::sign(D) != NEGATIVE) ) {
|
||||
// C > 0 and D >= 0
|
||||
return Direction_2 (two*A*C+A*D+B*C,
|
||||
two*B*D+A*D+B*C);
|
||||
}
|
||||
else if ((CGAL::sign(C) != POSITIVE) and
|
||||
else if ((CGAL::sign(C) != POSITIVE) &&
|
||||
(CGAL::sign(D) == POSITIVE) ) {
|
||||
// C <= 0 and D > 0
|
||||
return Direction_2 (A*D+B*C,
|
||||
|
|
@ -686,16 +686,16 @@ private:
|
|||
return Direction_2( minusone, plusone);
|
||||
}
|
||||
}
|
||||
else if ((CGAL::sign(A) != POSITIVE) and
|
||||
else if ((CGAL::sign(A) != POSITIVE) &&
|
||||
(CGAL::sign(B) == POSITIVE) ) {
|
||||
// A <= 0 and B > 0
|
||||
if ((CGAL::sign(C) != POSITIVE) and
|
||||
if ((CGAL::sign(C) != POSITIVE) &&
|
||||
(CGAL::sign(D) == POSITIVE) ) {
|
||||
// C <= 0 and D > 0
|
||||
return Direction_2 (-two*A*C+A*D+B*C,
|
||||
two*B*D-A*D-B*C);
|
||||
}
|
||||
else if ((CGAL::sign(C) == NEGATIVE) and
|
||||
else if ((CGAL::sign(C) == NEGATIVE) &&
|
||||
(CGAL::sign(D) != POSITIVE) ) {
|
||||
// C < 0 and D <= 0
|
||||
return Direction_2 (-two*A*C-A*D+B*C,
|
||||
|
|
@ -706,16 +706,16 @@ private:
|
|||
return Direction_2( minusone, minusone);
|
||||
}
|
||||
}
|
||||
else if ((CGAL::sign(A) == NEGATIVE) and
|
||||
else if ((CGAL::sign(A) == NEGATIVE) &&
|
||||
(CGAL::sign(B) != POSITIVE) ) {
|
||||
// A < 0 and B <= 0
|
||||
if ((CGAL::sign(C) == NEGATIVE) and
|
||||
if ((CGAL::sign(C) == NEGATIVE) &&
|
||||
(CGAL::sign(D) != POSITIVE) ) {
|
||||
// C < 0 and D <= 0
|
||||
return Direction_2 (-two*A*C-A*D-B*C,
|
||||
-two*B*D-A*D-B*C);
|
||||
}
|
||||
else if ((CGAL::sign(C) != NEGATIVE) and
|
||||
else if ((CGAL::sign(C) != NEGATIVE) &&
|
||||
(CGAL::sign(D) == NEGATIVE) ) {
|
||||
// C >= 0 and D < 0
|
||||
return Direction_2 (-A*D-B*C,
|
||||
|
|
@ -728,13 +728,13 @@ private:
|
|||
}
|
||||
else {
|
||||
// here A >= 0 and B < 0
|
||||
if ((CGAL::sign(C) != NEGATIVE) and
|
||||
if ((CGAL::sign(C) != NEGATIVE) &&
|
||||
(CGAL::sign(D) == NEGATIVE) ) {
|
||||
// C >= 0 and D < 0
|
||||
return Direction_2 ( two*A*C-A*D-B*C,
|
||||
-two*B*D+A*D+B*C);
|
||||
}
|
||||
else if ((CGAL::sign(C) == POSITIVE) and
|
||||
else if ((CGAL::sign(C) == POSITIVE) &&
|
||||
(CGAL::sign(D) != NEGATIVE) ) {
|
||||
// C > 0 and D >= 0
|
||||
return Direction_2 ( two*A*C+A*D-B*C,
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ public:
|
|||
CGAL_SDG_DEBUG( std::cout << "debug construct bisector line "
|
||||
<< "p=" << p << " q=" << q << std::endl; );
|
||||
|
||||
if ( p.is_point() and q.is_point() ) {
|
||||
if ( p.is_point() && q.is_point() ) {
|
||||
Point_2 pp = p.point();
|
||||
Point_2 pq = q.point();
|
||||
|
||||
|
|
@ -194,7 +194,7 @@ public:
|
|||
// midpoint m of two points p and q
|
||||
Point_2 m = midpoint(pp, pq);
|
||||
|
||||
if ((cmpabsdxy == EQUAL) or (cmpx == EQUAL) or (cmpy == EQUAL)) {
|
||||
if ((cmpabsdxy == EQUAL) || (cmpx == EQUAL) || (cmpy == EQUAL)) {
|
||||
// bisector is line going through m with direction d;
|
||||
// we will store this line as the union of two rays starting
|
||||
// at m with directions -d (incoming) and d (outgoing)
|
||||
|
|
@ -245,8 +245,8 @@ public:
|
|||
return pcl;
|
||||
}// end of point - point case
|
||||
|
||||
if ( (p.is_point() and q.is_segment())
|
||||
or (p.is_segment() and q.is_point()) ) {
|
||||
if ( (p.is_point() && q.is_segment())
|
||||
|| (p.is_segment() && q.is_point()) ) {
|
||||
|
||||
Point_2 pnt = (p.is_point()) ? p.point() : q.point();
|
||||
Segment_2 seg = (p.is_segment()) ? p.segment() : q.segment();
|
||||
|
|
@ -262,7 +262,7 @@ public:
|
|||
Equal_2 are_same_points;
|
||||
|
||||
if (are_same_points(sitep,sites.source_site())
|
||||
or are_same_points(sitep,sites.target_site())) {
|
||||
|| are_same_points(sitep,sites.target_site())) {
|
||||
npts = 1;
|
||||
points[0] = pnt;
|
||||
Point_2 pseg = (are_same_points(sitep,sites.source_site())) ?
|
||||
|
|
@ -286,8 +286,8 @@ public:
|
|||
// pnt is not end point of seg
|
||||
// seg must not be horizontal or vertical
|
||||
CGAL_assertion(
|
||||
not( sites.supporting_site().segment().is_horizontal() or
|
||||
sites.supporting_site().segment().is_vertical() ) );
|
||||
!( sites.supporting_site().segment().is_horizontal() ||
|
||||
sites.supporting_site().segment().is_vertical() ) );
|
||||
Line_2 lseg = sites.supporting_site().segment().supporting_line();
|
||||
Point_2 phor, pver;
|
||||
phor = Point_2(lseg.x_at_y(pnt.y()), pnt.y());
|
||||
|
|
@ -321,9 +321,9 @@ public:
|
|||
== compare_y_2(seg.source(),seg.target())) {
|
||||
//segment with positive slope
|
||||
if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
|
||||
and lseg.has_on_positive_side(pnt))
|
||||
or (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
and lseg.has_on_negative_side(pnt)) ) {
|
||||
&& lseg.has_on_positive_side(pnt))
|
||||
|| (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
&& lseg.has_on_negative_side(pnt)) ) {
|
||||
//pcfirst is center of square,
|
||||
//pfirst = phor, upward direction
|
||||
//pclast is center of sqaure, plast = pver, left direction
|
||||
|
|
@ -343,9 +343,9 @@ public:
|
|||
else {
|
||||
//segment with negative slope
|
||||
if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
|
||||
and lseg.has_on_positive_side(pnt))
|
||||
or (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
and lseg.has_on_negative_side(pnt)) ) {
|
||||
&& lseg.has_on_positive_side(pnt))
|
||||
|| (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
&& lseg.has_on_negative_side(pnt)) ) {
|
||||
//pcfirst is center of square,
|
||||
//pfirst = pver, right direction
|
||||
//pclast is center of sqaure, plast = phor, upward direction
|
||||
|
|
@ -447,7 +447,7 @@ public:
|
|||
|
||||
// compute oriented bisector between p and q
|
||||
|
||||
if ( p.is_point() and q.is_point() ) {
|
||||
if ( p.is_point() && q.is_point() ) {
|
||||
Point_2 pp = p.point();
|
||||
Point_2 pq = q.point();
|
||||
|
||||
|
|
@ -474,7 +474,7 @@ public:
|
|||
// bisector ray always starts with v
|
||||
points[0] = v;
|
||||
|
||||
if ((cmpabsdxy == EQUAL) or (cmpx == EQUAL) or (cmpy == EQUAL)) {
|
||||
if ((cmpabsdxy == EQUAL) || (cmpx == EQUAL) || (cmpy == EQUAL)) {
|
||||
// bisector ray consists of a ray starting at v
|
||||
npts = 1;
|
||||
} else {
|
||||
|
|
@ -533,8 +533,8 @@ public:
|
|||
return pcr;
|
||||
}
|
||||
|
||||
if ( (p.is_point() and q.is_segment())
|
||||
or (p.is_segment() and q.is_point()) ) {
|
||||
if ( (p.is_point() && q.is_segment())
|
||||
|| (p.is_segment() && q.is_point()) ) {
|
||||
|
||||
Point_2 pnt = (p.is_point()) ? p.point() : q.point();
|
||||
Segment_2 seg = (p.is_segment()) ? p.segment() : q.segment();
|
||||
|
|
@ -550,7 +550,7 @@ public:
|
|||
Equal_2 are_same_points;
|
||||
|
||||
if (are_same_points(sitep,sites.source_site())
|
||||
or are_same_points(sitep,sites.target_site())) {
|
||||
|| are_same_points(sitep,sites.target_site())) {
|
||||
npts = 1;
|
||||
points[0] = v;
|
||||
Point_2 pseg =
|
||||
|
|
@ -581,8 +581,8 @@ public:
|
|||
// pnt is not end point of seg
|
||||
// seg must not be horizontal or vertical
|
||||
CGAL_assertion(
|
||||
not( sites.supporting_site().segment().is_horizontal() or
|
||||
sites.supporting_site().segment().is_vertical() ) );
|
||||
!( sites.supporting_site().segment().is_horizontal() ||
|
||||
sites.supporting_site().segment().is_vertical() ) );
|
||||
// bisector ray always starts with v
|
||||
points[0] = v;
|
||||
Line_2 lseg = sites.supporting_site().segment().supporting_line();
|
||||
|
|
@ -618,9 +618,9 @@ public:
|
|||
== compare_y_2(seg.source(),seg.target())) {
|
||||
//segment with positive slope
|
||||
if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
|
||||
and lseg.has_on_positive_side(pnt))
|
||||
or (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
and lseg.has_on_negative_side(pnt)) ) {
|
||||
&& lseg.has_on_positive_side(pnt))
|
||||
|| (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
&& lseg.has_on_negative_side(pnt)) ) {
|
||||
//pcfirst is center of square , pfirst = phor, upward direction
|
||||
//pclast is center of sqaure, plast = pver, left direction
|
||||
pcfirst = Point_2(pmid_pfirst_pnt.x(),
|
||||
|
|
@ -639,9 +639,9 @@ public:
|
|||
else {
|
||||
//segment with negative slope
|
||||
if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
|
||||
and lseg.has_on_positive_side(pnt))
|
||||
or (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
and lseg.has_on_negative_side(pnt)) ) {
|
||||
&& lseg.has_on_positive_side(pnt))
|
||||
|| (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
&& lseg.has_on_negative_side(pnt)) ) {
|
||||
//pcfirst is center of square , pfirst = pver, right direction
|
||||
//pclast is center of sqaure, plast = phor, upward direction
|
||||
pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst,
|
||||
|
|
@ -690,8 +690,8 @@ public:
|
|||
}
|
||||
|
||||
if (l.perpendicular(pnt).has_on_positive_side(v)) {
|
||||
if ( (p.is_segment() and l.has_on_positive_side(v))
|
||||
or(p.is_point() and l.has_on_negative_side(v)) ) {
|
||||
if ( (p.is_segment() && l.has_on_positive_side(v))
|
||||
||(p.is_point() && l.has_on_negative_side(v)) ) {
|
||||
npts = 4;
|
||||
} else {
|
||||
npts = 3;
|
||||
|
|
@ -700,8 +700,8 @@ public:
|
|||
}
|
||||
}
|
||||
else {
|
||||
if ( (p.is_segment() and l.has_on_negative_side(v))
|
||||
or(p.is_point() and l.has_on_positive_side(v)) ) {
|
||||
if ( (p.is_segment() && l.has_on_negative_side(v))
|
||||
||(p.is_point() && l.has_on_positive_side(v)) ) {
|
||||
npts = 2;
|
||||
points[1] = points[3];
|
||||
}
|
||||
|
|
@ -791,7 +791,7 @@ public:
|
|||
<< " cmpy=" << cmpy_vpqr_vqps
|
||||
<< std::endl; );
|
||||
|
||||
if ( (cmpx_vpqr_vqps == EQUAL) and
|
||||
if ( (cmpx_vpqr_vqps == EQUAL) &&
|
||||
(cmpy_vpqr_vqps == EQUAL) ) {
|
||||
// philaris: here vpqr and vqps are the same point,
|
||||
// therefore the bisector segment is (vpqr,vqps),
|
||||
|
|
@ -807,11 +807,11 @@ public:
|
|||
return pcs;
|
||||
}
|
||||
|
||||
if ( p.is_point() and q.is_point() ) {
|
||||
if ( p.is_point() && q.is_point() ) {
|
||||
Point_2 pp = p.point();
|
||||
Point_2 pq = q.point();
|
||||
|
||||
CGAL_assertion( not (are_same_points(p, q)) );
|
||||
CGAL_assertion( ! (are_same_points(p, q)) );
|
||||
Comparison_result cmpx = compare_x_2(pp, pq);
|
||||
Comparison_result cmpy = compare_y_2(pp, pq);
|
||||
Comparison_result cmpabsdxy =
|
||||
|
|
@ -831,7 +831,7 @@ public:
|
|||
// bisector segment always starts with vpqr
|
||||
points[0] = vpqr;
|
||||
|
||||
if ((cmpabsdxy == EQUAL) or (cmpx == EQUAL) or (cmpy == EQUAL)) {
|
||||
if ((cmpabsdxy == EQUAL) || (cmpx == EQUAL) || (cmpy == EQUAL)) {
|
||||
// bisector ray is line segment (vpqr,vqps)
|
||||
npts = 2;
|
||||
} else {
|
||||
|
|
@ -906,8 +906,8 @@ public:
|
|||
|
||||
return pcs;
|
||||
} // end of two points case
|
||||
else if ( (p.is_point() and q.is_segment()) or
|
||||
(q.is_point() and p.is_segment()) ) {
|
||||
else if ( (p.is_point() && q.is_segment()) ||
|
||||
(q.is_point() && p.is_segment()) ) {
|
||||
//one site is point and one site is segment
|
||||
unsigned int npts;
|
||||
Point_2 points[5];
|
||||
|
|
@ -915,11 +915,11 @@ public:
|
|||
Equal_2 are_same_points;
|
||||
// check if p is point and is an endpoint of q
|
||||
// or if q is a point and is an end point of p
|
||||
if ( ( p.is_point() and
|
||||
(are_same_points(p, q.source_site()) or
|
||||
if ( ( p.is_point() &&
|
||||
(are_same_points(p, q.source_site()) ||
|
||||
are_same_points(p, q.target_site()) ) )
|
||||
or (q.is_point() and
|
||||
(are_same_points(q, p.source_site()) or
|
||||
|| (q.is_point() &&
|
||||
(are_same_points(q, p.source_site()) ||
|
||||
are_same_points(q, p.target_site()) ) ) )
|
||||
{
|
||||
npts = 2;
|
||||
|
|
@ -977,7 +977,7 @@ public:
|
|||
<< npts << std::endl; );
|
||||
|
||||
/*CGAL_assertion((l.perpendicular(vpqr).
|
||||
has_on_negative_side(vqps)) or
|
||||
has_on_negative_side(vqps)) ||
|
||||
((compare_x_2(vpqr, vqps) == EQUAL) and
|
||||
(compare_y_2(vpqr, vqps) == EQUAL))
|
||||
);*/
|
||||
|
|
@ -1085,9 +1085,9 @@ public:
|
|||
== compare_y_2(seg.source(),seg.target())) {
|
||||
//segment with positive slope
|
||||
if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
|
||||
and lseg.has_on_positive_side(pnt))
|
||||
or (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
and lseg.has_on_negative_side(pnt)) ) {
|
||||
&& lseg.has_on_positive_side(pnt))
|
||||
|| (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
&& lseg.has_on_negative_side(pnt)) ) {
|
||||
//pcfirst is center of square, pfirst = phor, upward direction
|
||||
//pclast is center of sqaure, plast = pver, left direction
|
||||
pcfirst = Point_2(pmid_pfirst_pnt.x(),
|
||||
|
|
@ -1106,9 +1106,9 @@ public:
|
|||
else {
|
||||
//segment with negative slope
|
||||
if ( (compare_x_2(seg.source(),seg.target()) == SMALLER
|
||||
and lseg.has_on_positive_side(pnt))
|
||||
or (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
and lseg.has_on_negative_side(pnt)) ) {
|
||||
&& lseg.has_on_positive_side(pnt))
|
||||
|| (compare_x_2(seg.source(),seg.target()) == LARGER
|
||||
&& lseg.has_on_negative_side(pnt)) ) {
|
||||
//pcfirst is center of square , pfirst = pver, right direction
|
||||
//pclast is center of sqaure, plast = phor, upward direction
|
||||
pcfirst = Point_2(pmid_pfirst_pnt.x()+seglenhalffirst,
|
||||
|
|
@ -1155,12 +1155,12 @@ public:
|
|||
|
||||
// philaris: probably not needed, but check more
|
||||
//CGAL_assertion((l.perpendicular(vpqr).
|
||||
// has_on_negative_side(vqps)) or
|
||||
// has_on_negative_side(vqps)) ||
|
||||
// (vpqr == vqps));
|
||||
|
||||
if (l.perpendicular(pnt).has_on_positive_side(vpqr)) {
|
||||
if ( (p.is_segment() and l.has_on_positive_side(vpqr))
|
||||
or(p.is_point() and l.has_on_negative_side(vpqr)) ) {
|
||||
if ( (p.is_segment() && l.has_on_positive_side(vpqr))
|
||||
||(p.is_point() && l.has_on_negative_side(vpqr)) ) {
|
||||
npts = 5;
|
||||
} else {
|
||||
npts = 4;
|
||||
|
|
@ -1169,8 +1169,8 @@ public:
|
|||
}
|
||||
}
|
||||
else {
|
||||
if ( (p.is_segment() and l.has_on_negative_side(vpqr))
|
||||
or(p.is_point() and l.has_on_positive_side(vpqr)) ) {
|
||||
if ( (p.is_segment() && l.has_on_negative_side(vpqr))
|
||||
||(p.is_point() && l.has_on_positive_side(vpqr)) ) {
|
||||
npts = 3;
|
||||
points[1] = points[3];
|
||||
}
|
||||
|
|
@ -1182,33 +1182,33 @@ public:
|
|||
CGAL_SDG_DEBUG( std::cout << "debug first check npts="
|
||||
<< npts << std::endl; );
|
||||
|
||||
if ((npts == 3) and
|
||||
((p.is_segment() and not l.has_on_positive_side(vqps))
|
||||
or(p.is_point() and not l.has_on_negative_side(vqps)))) {
|
||||
if ((npts == 3) &&
|
||||
((p.is_segment() && ! l.has_on_positive_side(vqps))
|
||||
||(p.is_point() && ! l.has_on_negative_side(vqps)))) {
|
||||
npts = 2;
|
||||
}
|
||||
if (npts == 4) {
|
||||
if (not l.perpendicular(pnt).has_on_negative_side(vqps)) {
|
||||
if (! l.perpendicular(pnt).has_on_negative_side(vqps)) {
|
||||
npts = 2;
|
||||
} else {
|
||||
if ((p.is_segment() and not l.has_on_positive_side(vqps))
|
||||
or(p.is_point() and not l.has_on_negative_side(vqps))) {
|
||||
if ((p.is_segment() && ! l.has_on_positive_side(vqps))
|
||||
||(p.is_point() && ! l.has_on_negative_side(vqps))) {
|
||||
npts = 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (npts == 5) {
|
||||
if (l.perpendicular(pnt).has_on_negative_side(vqps)) {
|
||||
if ( (p.is_segment() and l.has_on_positive_side(vqps))
|
||||
or(p.is_point() and l.has_on_negative_side(vqps)) ) {
|
||||
if ( (p.is_segment() && l.has_on_positive_side(vqps))
|
||||
||(p.is_point() && l.has_on_negative_side(vqps)) ) {
|
||||
npts = 5;
|
||||
} else {
|
||||
npts = 4;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ( (p.is_segment() and l.has_on_negative_side(vpqr))
|
||||
or(p.is_point() and l.has_on_positive_side(vpqr)) ) {
|
||||
if ( (p.is_segment() && l.has_on_negative_side(vpqr))
|
||||
||(p.is_point() && l.has_on_positive_side(vpqr)) ) {
|
||||
npts = 3;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ private:
|
|||
{
|
||||
Boolean in_conflict(false);
|
||||
|
||||
if ( zero_voronoi_area(p, r, s) or zero_voronoi_area(q, r, s) ) {
|
||||
if ( zero_voronoi_area(p, r, s) || zero_voronoi_area(q, r, s) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -432,12 +432,12 @@ private:
|
|||
CGAL_assertion( p.is_segment() || q.is_segment() );
|
||||
|
||||
bool are_same_sites_rs (false);
|
||||
if (r.is_point() and s.is_point()) {
|
||||
if (r.is_point() && s.is_point()) {
|
||||
if (same_points(r, s)) {
|
||||
are_same_sites_rs = true;
|
||||
}
|
||||
} else {
|
||||
if (r.is_segment() and s.is_segment()) {
|
||||
if (r.is_segment() && s.is_segment()) {
|
||||
if (same_segments(r, s)) {
|
||||
are_same_sites_rs = true;
|
||||
}
|
||||
|
|
@ -447,7 +447,7 @@ private:
|
|||
if (are_same_sites_rs) {
|
||||
// philaris: the text would give false
|
||||
// philaris: for segments, we have to refine later
|
||||
if (r.is_point() and s.is_point()) {
|
||||
if (r.is_point() && s.is_point()) {
|
||||
CGAL_SDG_DEBUG(std::cout << "debug is_interior_in_conflict_touch"
|
||||
<< " about to return false with same points" << std::endl; );
|
||||
return false;
|
||||
|
|
@ -485,7 +485,7 @@ private:
|
|||
}
|
||||
|
||||
CGAL_SDG_DEBUG(std::cout << "debug is_interior_in_conflict_touch"
|
||||
<< " shuffle and recursion" << std::endl; );
|
||||
<< " recursion with permuted input" << std::endl; );
|
||||
return is_interior_in_conflict_touch(q, p, s, r, t, tag);
|
||||
}
|
||||
|
||||
|
|
@ -741,7 +741,7 @@ public:
|
|||
*/
|
||||
|
||||
// if p, q, t are points, then return (sgn == NEGATIVE)
|
||||
if (t.is_point() and p.is_point() and q.is_point()) {
|
||||
if (t.is_point() && p.is_point() && q.is_point()) {
|
||||
CGAL_SDG_DEBUG( std::cout <<
|
||||
"debug finite-edge-int-cf with (p,q,r,t,sgn)= ("
|
||||
<< p << ") (" << q << ") (" << r << " ) ("
|
||||
|
|
@ -750,11 +750,11 @@ public:
|
|||
return ( sgn == NEGATIVE );
|
||||
}
|
||||
|
||||
if (t.is_point() and (sgn == NEGATIVE)) {
|
||||
if (t.is_point() && (sgn == NEGATIVE)) {
|
||||
bool is_p_pnt = p.is_point();
|
||||
bool is_q_pnt = q.is_point();
|
||||
bool parabola_case = (is_p_pnt and (not is_q_pnt)) or
|
||||
(is_q_pnt and (not is_p_pnt)) ;
|
||||
bool parabola_case = (is_p_pnt && (! is_q_pnt)) ||
|
||||
(is_q_pnt && (! is_p_pnt)) ;
|
||||
if (parabola_case) {
|
||||
if (is_p_pnt) {
|
||||
Point_2 pp = p.point();
|
||||
|
|
@ -769,7 +769,7 @@ public:
|
|||
Boolean on_different_parabola_arcs = (opqr == ON_NEGATIVE_SIDE);
|
||||
|
||||
//if ( !on_different_parabola_arcs ) { return true; }
|
||||
if (certainly( not on_different_parabola_arcs ) ) {
|
||||
if (certainly( ! on_different_parabola_arcs ) ) {
|
||||
CGAL_SDG_DEBUG( std::cout
|
||||
<< "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
|
||||
<< p << ") (" << q << ") (" << r << ") ("
|
||||
|
|
@ -777,7 +777,7 @@ public:
|
|||
<< sgn << " returns " << true << std::endl; );
|
||||
return true;
|
||||
}
|
||||
if (not is_certain( not on_different_parabola_arcs ) ) {
|
||||
if (! is_certain( ! on_different_parabola_arcs ) ) {
|
||||
return indeterminate<Boolean>();
|
||||
}
|
||||
}
|
||||
|
|
@ -795,7 +795,7 @@ public:
|
|||
(opqr == ON_POSITIVE_SIDE);
|
||||
|
||||
//if ( !on_different_parabola_arcs ) { return true; }
|
||||
if (certainly( not on_different_parabola_arcs ) ) {
|
||||
if (certainly( ! on_different_parabola_arcs ) ) {
|
||||
CGAL_SDG_DEBUG( std::cout
|
||||
<< "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
|
||||
<< p << ") (" << q << ") (" << r << ") ("
|
||||
|
|
@ -803,7 +803,7 @@ public:
|
|||
<< sgn << " returns " << true << std::endl; );
|
||||
return true;
|
||||
}
|
||||
if (not is_certain( not on_different_parabola_arcs ) ) {
|
||||
if (! is_certain( ! on_different_parabola_arcs ) ) {
|
||||
return indeterminate<Boolean>();
|
||||
}
|
||||
}
|
||||
|
|
@ -833,13 +833,13 @@ public:
|
|||
// tocheck
|
||||
CGAL_assertion( sgn == POSITIVE );
|
||||
|
||||
CGAL_assertion( p.is_point() or q.is_point() );
|
||||
CGAL_assertion( p.is_segment() or q.is_segment() );
|
||||
CGAL_assertion( p.is_point() || q.is_point() );
|
||||
CGAL_assertion( p.is_segment() || q.is_segment() );
|
||||
|
||||
CGAL_assertion(t.is_point());
|
||||
|
||||
if ( p.is_point() and q.is_segment() ) {
|
||||
if (same_points(p, q.source_site()) or
|
||||
if ( p.is_point() && q.is_segment() ) {
|
||||
if (same_points(p, q.source_site()) ||
|
||||
same_points(p, q.target_site()) ) {
|
||||
CGAL_SDG_DEBUG( std::cout <<
|
||||
"debug finite-edge-int-cf with (p,q,r,t,sgn)= ("
|
||||
|
|
@ -852,7 +852,7 @@ public:
|
|||
CGAL_SDG_DEBUG( std::cout << "debug fecf p is not endpoint of q"
|
||||
<< std::endl; );
|
||||
|
||||
CGAL_assertion( not is_site_h_or_v(q) ) ;
|
||||
CGAL_assertion( ! is_site_h_or_v(q) ) ;
|
||||
|
||||
Line_2 lseg = compute_supporting_line(q.supporting_site());
|
||||
|
||||
|
|
@ -927,8 +927,8 @@ public:
|
|||
} // end of case where p is not endpoint of q
|
||||
} // end of case where p is point and q is segment
|
||||
|
||||
if ( p.is_segment() and q.is_point() ) {
|
||||
if (same_points(q, p.source_site()) or
|
||||
if ( p.is_segment() && q.is_point() ) {
|
||||
if (same_points(q, p.source_site()) ||
|
||||
same_points(q, p.target_site()) ) {
|
||||
CGAL_SDG_DEBUG( std::cout <<
|
||||
"debug finite-edge-int-cf with (p,q,r,t,sgn)= ("
|
||||
|
|
@ -937,7 +937,7 @@ public:
|
|||
<< sgn << " returns " << false << std::endl; );
|
||||
return false;
|
||||
} else { // q is not endpoint of p
|
||||
CGAL_assertion( not is_site_h_or_v(p) );
|
||||
CGAL_assertion( ! is_site_h_or_v(p) );
|
||||
|
||||
Line_2 lseg = compute_supporting_line(p.supporting_site());
|
||||
|
||||
|
|
@ -1019,18 +1019,18 @@ public:
|
|||
|
||||
// here and on, sgn == NEGATIVE
|
||||
|
||||
if ( p.is_segment() or q.is_segment() ) {
|
||||
if ( p.is_segment() || q.is_segment() ) {
|
||||
// philaris: p and q are consecutive on convex hull
|
||||
// therefore, one of them is a point and the other is a segment
|
||||
CGAL_assertion( p.is_point() or q.is_point() );
|
||||
CGAL_assertion( p.is_point() || q.is_point() );
|
||||
|
||||
// philaris:
|
||||
|
||||
CGAL_assertion( p.is_point() ?
|
||||
((not same_points(p, q.source_site())) and
|
||||
(not same_points(p, q.target_site()))) :
|
||||
((not same_points(q, p.source_site())) and
|
||||
(not same_points(q, p.target_site())))
|
||||
((! same_points(p, q.source_site())) &&
|
||||
(! same_points(p, q.target_site()))) :
|
||||
((! same_points(q, p.source_site())) &&
|
||||
(! same_points(q, p.target_site())))
|
||||
) ;
|
||||
|
||||
//sandeep: if t is segment and it not intersects the wedge
|
||||
|
|
@ -1044,7 +1044,7 @@ public:
|
|||
CGAL_assertion(q.is_segment());
|
||||
//p may be end point of t
|
||||
if ( same_points(p,t.source_site())
|
||||
or same_points(p,t.target_site()) ) {
|
||||
|| same_points(p,t.target_site()) ) {
|
||||
CGAL_SDG_DEBUG(
|
||||
std::cout
|
||||
<< "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
|
||||
|
|
@ -1053,9 +1053,9 @@ public:
|
|||
<< sgn << " returns " << true << std::endl; );
|
||||
return true;
|
||||
} else {
|
||||
if (same_points(q.source_site(), t.source_site()) or
|
||||
same_points(q.source_site(), t.target_site()) or
|
||||
same_points(q.target_site(), t.source_site()) or
|
||||
if (same_points(q.source_site(), t.source_site()) ||
|
||||
same_points(q.source_site(), t.target_site()) ||
|
||||
same_points(q.target_site(), t.source_site()) ||
|
||||
same_points(q.target_site(), t.target_site()) ) {
|
||||
result = true;
|
||||
} else {
|
||||
|
|
@ -1072,7 +1072,7 @@ public:
|
|||
(opqr == ON_NEGATIVE_SIDE);
|
||||
|
||||
//if ( !on_different_parabola_arcs ) { return true; }
|
||||
if (certainly( not on_different_parabola_arcs ) ) {
|
||||
if (certainly( ! on_different_parabola_arcs ) ) {
|
||||
CGAL_SDG_DEBUG(
|
||||
std::cout
|
||||
<< "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
|
||||
|
|
@ -1081,7 +1081,7 @@ public:
|
|||
<< sgn << " returns " << true << std::endl; );
|
||||
return true;
|
||||
}
|
||||
if (not is_certain( not on_different_parabola_arcs ) ) {
|
||||
if (! is_certain( ! on_different_parabola_arcs ) ) {
|
||||
return indeterminate<Boolean>();
|
||||
}
|
||||
|
||||
|
|
@ -1100,7 +1100,7 @@ public:
|
|||
CGAL_assertion(q.is_point());
|
||||
//q may be endpoint of t
|
||||
if ( same_points(q,t.source_site())
|
||||
or same_points(q,t.target_site())) {
|
||||
|| same_points(q,t.target_site())) {
|
||||
CGAL_SDG_DEBUG( std::cout
|
||||
<< "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
|
||||
<< p << ") (" << q << ") (" << r << ") ("
|
||||
|
|
@ -1108,9 +1108,9 @@ public:
|
|||
<< sgn << " returns " << true << std::endl; );
|
||||
return true;
|
||||
} else {
|
||||
if (same_points(p.source_site(), t.source_site()) or
|
||||
same_points(p.source_site(), t.target_site()) or
|
||||
same_points(p.target_site(), t.source_site()) or
|
||||
if (same_points(p.source_site(), t.source_site()) ||
|
||||
same_points(p.source_site(), t.target_site()) ||
|
||||
same_points(p.target_site(), t.source_site()) ||
|
||||
same_points(p.target_site(), t.target_site()) ) {
|
||||
result = true;
|
||||
} else {
|
||||
|
|
@ -1127,7 +1127,7 @@ public:
|
|||
(opqr == ON_POSITIVE_SIDE);
|
||||
|
||||
//if ( !on_different_parabola_arcs ) { return true; }
|
||||
if (certainly( not on_different_parabola_arcs ) ) {
|
||||
if (certainly( ! on_different_parabola_arcs ) ) {
|
||||
CGAL_SDG_DEBUG(
|
||||
std::cout
|
||||
<< "debug finite-edge-int-cf tocheck (p,q,r,t,sgn)= ("
|
||||
|
|
@ -1136,7 +1136,7 @@ public:
|
|||
<< sgn << " returns " << true << std::endl; );
|
||||
return true;
|
||||
}
|
||||
if (not is_certain( not on_different_parabola_arcs ) ) {
|
||||
if (! is_certain( ! on_different_parabola_arcs ) ) {
|
||||
return indeterminate<Boolean>();
|
||||
}
|
||||
|
||||
|
|
@ -1181,7 +1181,7 @@ public:
|
|||
same_points(q, t.source_site()) || same_points(q, t.target_site());
|
||||
|
||||
// philaris: change for Linf
|
||||
if ((cmpx(p.point(), q.point()) == EQUAL) or
|
||||
if ((cmpx(p.point(), q.point()) == EQUAL) ||
|
||||
(cmpy(p.point(), q.point()) == EQUAL) ) {
|
||||
// if p or q have one same coordinate, behave like in L2
|
||||
return ( p_is_endpoint && q_is_endpoint );
|
||||
|
|
@ -1205,17 +1205,17 @@ public:
|
|||
<< p << ' ' << q << ' ' << t << ' '
|
||||
<< "(sgn " << sgn << " not ignored)" << std::endl; );
|
||||
|
||||
CGAL_assertion( not ( p.is_segment() and q.is_segment()) );
|
||||
CGAL_assertion( ! ( p.is_segment() && q.is_segment()) );
|
||||
|
||||
if ( p.is_segment() or q.is_segment() ) {
|
||||
if ( p.is_segment() || q.is_segment() ) {
|
||||
Site_2 siteseg = (p.is_point())? q: p;
|
||||
|
||||
if ( is_site_h_or_v(siteseg) ) {
|
||||
if (p.is_point()) {
|
||||
CGAL_assertion( same_points(p, q.source_site()) or
|
||||
CGAL_assertion( same_points(p, q.source_site()) ||
|
||||
same_points(p, q.target_site()) ) ;
|
||||
} else {
|
||||
CGAL_assertion( same_points(q, p.source_site()) or
|
||||
CGAL_assertion( same_points(q, p.source_site()) ||
|
||||
same_points(q, p.target_site()) ) ;
|
||||
}
|
||||
CGAL_SDG_DEBUG(
|
||||
|
|
@ -1226,7 +1226,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
CGAL_assertion(not is_site_h_or_v(siteseg));
|
||||
CGAL_assertion(! is_site_h_or_v(siteseg));
|
||||
// t is segment
|
||||
if (t.is_segment()) {
|
||||
CGAL_assertion(sgn == NEGATIVE);
|
||||
|
|
@ -1235,12 +1235,12 @@ public:
|
|||
// this works if p or q is point
|
||||
bool result;
|
||||
if (p.is_point()) { // p is point, q is segment
|
||||
CGAL_assertion((not same_points(p, q.source_site())) and
|
||||
(not same_points(p, q.target_site())) );
|
||||
CGAL_assertion((! same_points(p, q.source_site())) &&
|
||||
(! same_points(p, q.target_site())) );
|
||||
result = intersects_segment_interior_inf_wedge_sp(q,p,t);
|
||||
} else { // q is point and p is segment
|
||||
CGAL_assertion((not same_points(q, p.source_site())) and
|
||||
(not same_points(q, p.target_site())) );
|
||||
CGAL_assertion((! same_points(q, p.source_site())) &&
|
||||
(! same_points(q, p.target_site())) );
|
||||
result = intersects_segment_interior_inf_wedge_sp(p,q,t);
|
||||
}
|
||||
|
||||
|
|
@ -1261,8 +1261,8 @@ public:
|
|||
CGAL_assertion(t.is_point());
|
||||
|
||||
if (sgn == POSITIVE) {
|
||||
if (p.is_point() and q.is_segment()) {
|
||||
if (same_points(p, q.source_site()) or
|
||||
if (p.is_point() && q.is_segment()) {
|
||||
if (same_points(p, q.source_site()) ||
|
||||
same_points(p, q.target_site()) ) {
|
||||
CGAL_SDG_DEBUG(
|
||||
std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= "
|
||||
|
|
@ -1273,9 +1273,9 @@ public:
|
|||
}
|
||||
} // end of case: p: point, q: segment
|
||||
else
|
||||
// if (p.is_segment() and q.is_point())
|
||||
// if (p.is_segment() && q.is_point())
|
||||
{
|
||||
if (same_points(q, p.source_site()) or
|
||||
if (same_points(q, p.source_site()) ||
|
||||
same_points(q, p.target_site()) ) {
|
||||
CGAL_SDG_DEBUG(
|
||||
std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= "
|
||||
|
|
@ -1386,7 +1386,7 @@ public:
|
|||
Comparison_result cmpxpq = cmpx(p.point(), q.point());
|
||||
Comparison_result cmpypq = cmpy(p.point(), q.point());
|
||||
|
||||
if ((cmpxpq == EQUAL) or (cmpypq == EQUAL)) {
|
||||
if ((cmpxpq == EQUAL) || (cmpypq == EQUAL)) {
|
||||
CGAL_SDG_DEBUG(
|
||||
std::cout << "debug finite-edge-int-cf with (p,q,t,sgn)= "
|
||||
<< p << ' ' << q << ' ' << t << ' '
|
||||
|
|
|
|||
|
|
@ -75,10 +75,10 @@ public:
|
|||
}
|
||||
|
||||
if ( t.is_segment() ) {
|
||||
if (q.is_point() and s.is_point() and r.is_point()) {
|
||||
if (q.is_point() && s.is_point() && r.is_point()) {
|
||||
if (sgn == NEGATIVE) {
|
||||
CGAL_SDG_DEBUG(std::cout << "debug return tocheck" << std::endl;);
|
||||
if (same_points(q, t.source_site()) or
|
||||
if (same_points(q, t.source_site()) ||
|
||||
same_points(q, t.target_site()) ) {
|
||||
// this works because endpoints of a segment are
|
||||
// inserted before its interior
|
||||
|
|
@ -92,7 +92,7 @@ public:
|
|||
} else {
|
||||
|
||||
// here q is point
|
||||
if ( not is_site_h_or_v(t) ) {
|
||||
if ( ! is_site_h_or_v(t) ) {
|
||||
|
||||
Line_2 lt = compute_supporting_line(t.supporting_site());
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ public:
|
|||
Oriented_side osr =
|
||||
oriented_side_of_line(lq, r.point());
|
||||
|
||||
if ((oss == ON_NEGATIVE_SIDE) and
|
||||
if ((oss == ON_NEGATIVE_SIDE) &&
|
||||
(osr == ON_POSITIVE_SIDE) ) {
|
||||
CGAL_SDG_DEBUG(
|
||||
std::cout
|
||||
|
|
@ -143,9 +143,9 @@ public:
|
|||
bool is_q_tsrc = same_points(q, t.source_site());
|
||||
bool is_q_ttrg = same_points(q, t.target_site());
|
||||
|
||||
CGAL_assertion(not (is_q_tsrc or is_q_ttrg));
|
||||
CGAL_assertion(! (is_q_tsrc || is_q_ttrg));
|
||||
|
||||
if (is_q_tsrc or is_q_ttrg) {
|
||||
if (is_q_tsrc || is_q_ttrg) {
|
||||
// philaris: this code should never be executed
|
||||
|
||||
CGAL_assertion_code(
|
||||
|
|
@ -156,8 +156,8 @@ public:
|
|||
);
|
||||
|
||||
CGAL_assertion(
|
||||
(is_q_ssrc or is_q_strg) and
|
||||
(is_q_rsrc or is_q_rtrg) );
|
||||
(is_q_ssrc || is_q_strg) &&
|
||||
(is_q_rsrc || is_q_rtrg) );
|
||||
|
||||
CGAL_SDG_DEBUG(
|
||||
std::cout
|
||||
|
|
@ -168,10 +168,10 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
CGAL_assertion( not (is_q_tsrc or is_q_ttrg) );
|
||||
CGAL_assertion( ! (is_q_tsrc || is_q_ttrg) );
|
||||
|
||||
// here q is point
|
||||
if ( not is_site_h_or_v(t) ) {
|
||||
if ( ! is_site_h_or_v(t) ) {
|
||||
|
||||
Line_2 lt = compute_supporting_line(t.supporting_site());
|
||||
|
||||
|
|
@ -187,7 +187,7 @@ public:
|
|||
srep = s.point();
|
||||
} else {
|
||||
// s is segment
|
||||
CGAL_assertion( not is_site_h_or_v(s) ) ;
|
||||
CGAL_assertion( ! is_site_h_or_v(s) ) ;
|
||||
|
||||
Direction_2 d (s.supporting_site().segment());
|
||||
Line_2 ls = compute_supporting_line(s.supporting_site());
|
||||
|
|
@ -207,7 +207,7 @@ public:
|
|||
rrep = r.point();
|
||||
} else {
|
||||
// r is segment
|
||||
CGAL_assertion( not is_site_h_or_v(r) ) ;
|
||||
CGAL_assertion( ! is_site_h_or_v(r) ) ;
|
||||
|
||||
Direction_2 d (r.supporting_site().segment());
|
||||
Line_2 lr = compute_supporting_line(r.supporting_site());
|
||||
|
|
@ -223,7 +223,7 @@ public:
|
|||
Oriented_side osr =
|
||||
oriented_side_of_line(lq, rrep);
|
||||
|
||||
if ((oss == ON_NEGATIVE_SIDE) and
|
||||
if ((oss == ON_NEGATIVE_SIDE) &&
|
||||
(osr == ON_POSITIVE_SIDE) ) {
|
||||
CGAL_SDG_DEBUG(
|
||||
std::cout
|
||||
|
|
@ -281,7 +281,7 @@ public:
|
|||
// in Linf they still have to be points, but
|
||||
// they do not have to be endpoints of q
|
||||
// (this has to be checked)
|
||||
CGAL_assertion(s.is_point() and r.is_point());
|
||||
CGAL_assertion(s.is_point() && r.is_point());
|
||||
|
||||
if ( is_site_h_or_v(q) )
|
||||
{
|
||||
|
|
@ -309,16 +309,16 @@ public:
|
|||
// here sgn is non-negative
|
||||
|
||||
bool is_s_endp_of_q =
|
||||
same_points(s, q.source_site()) or
|
||||
same_points(s, q.source_site()) ||
|
||||
same_points(s, q.target_site());
|
||||
bool is_r_endp_of_q =
|
||||
same_points(r, q.source_site()) or
|
||||
same_points(r, q.source_site()) ||
|
||||
same_points(r, q.target_site());
|
||||
|
||||
Line_2 l;
|
||||
bool is_conflicting_side_of_q = false;
|
||||
|
||||
if (is_s_endp_of_q and is_r_endp_of_q) {
|
||||
if (is_s_endp_of_q && is_r_endp_of_q) {
|
||||
// check if t is on positive side of rs
|
||||
l = compute_line_from_to(r.point(), s.point());
|
||||
if (oriented_side_of_line(l, t.point()) ==
|
||||
|
|
@ -348,7 +348,7 @@ public:
|
|||
}
|
||||
} // end of case: some of s, r is not endpoint of q
|
||||
|
||||
if (not is_conflicting_side_of_q) {
|
||||
if (! is_conflicting_side_of_q) {
|
||||
CGAL_SDG_DEBUG(
|
||||
std::cout
|
||||
<< "debug infinite-edge-int-cf with (q,s,r,t,sgn)= "
|
||||
|
|
@ -369,7 +369,7 @@ public:
|
|||
Comparison_result A = cmpx(s.point(), r.point());
|
||||
Comparison_result B = cmpy(s.point(), r.point());
|
||||
|
||||
CGAL_assertion((A != EQUAL) and (B != EQUAL));
|
||||
CGAL_assertion((A != EQUAL) && (B != EQUAL));
|
||||
|
||||
// corner point of infinite square
|
||||
Point_2 corner;
|
||||
|
|
@ -388,7 +388,7 @@ public:
|
|||
Oriented_side sidelst =
|
||||
oriented_side_of_line(ls, t.point());
|
||||
|
||||
if ((sidelrt == ON_NEGATIVE_SIDE) or
|
||||
if ((sidelrt == ON_NEGATIVE_SIDE) ||
|
||||
(sidelst == ON_NEGATIVE_SIDE) ) {
|
||||
CGAL_SDG_DEBUG(
|
||||
std::cout
|
||||
|
|
@ -466,7 +466,7 @@ public:
|
|||
CGAL_SDG_DEBUG(std::cout <<
|
||||
"debug infcf s=r and is segment" << std::endl;);
|
||||
|
||||
if ( same_points(q, s.source_site()) or
|
||||
if ( same_points(q, s.source_site()) ||
|
||||
same_points(q, s.target_site()) ) {
|
||||
// here point q is endpoint of segment s
|
||||
Site_2 ss;
|
||||
|
|
@ -505,7 +505,7 @@ public:
|
|||
|
||||
CGAL_assertion(sgn == NEGATIVE);
|
||||
|
||||
CGAL_assertion(not is_site_h_or_v(s));
|
||||
CGAL_assertion(! is_site_h_or_v(s));
|
||||
|
||||
// compute infinite square with corner at q
|
||||
// and with center at infinity at
|
||||
|
|
@ -550,7 +550,7 @@ public:
|
|||
|
||||
Boolean retval =
|
||||
(osl1 !=
|
||||
ON_NEGATIVE_SIDE) and
|
||||
ON_NEGATIVE_SIDE) &&
|
||||
(osl2 !=
|
||||
ON_NEGATIVE_SIDE) ;
|
||||
|
||||
|
|
@ -581,9 +581,9 @@ public:
|
|||
<< q << ' ' << s << ' ' << r << ' ' << t
|
||||
<< ' ' << sgn << std::endl;);
|
||||
|
||||
if (s.is_point() and r.is_point()) {
|
||||
if (s.is_point() && r.is_point()) {
|
||||
if ((bounded_side_of_bbox(
|
||||
q.point(), s.point(), t.point()) == ON_BOUNDED_SIDE) and
|
||||
q.point(), s.point(), t.point()) == ON_BOUNDED_SIDE) &&
|
||||
(bounded_side_of_bbox(
|
||||
q.point(), r.point(), t.point()) == ON_BOUNDED_SIDE))
|
||||
{
|
||||
|
|
@ -609,10 +609,10 @@ public:
|
|||
CGAL_SDG_DEBUG(
|
||||
std::cout << "debug infinite-edge-int-cf special POS"
|
||||
<< std::endl;);
|
||||
if (s.is_point() and r.is_point()) {
|
||||
if (s.is_point() && r.is_point()) {
|
||||
if ((bounded_side_of_bbox(
|
||||
t.point(), s.point(), q.point()) ==
|
||||
ON_BOUNDED_SIDE) and
|
||||
ON_BOUNDED_SIDE) &&
|
||||
(bounded_side_of_bbox(
|
||||
t.point(), r.point(), q.point()) ==
|
||||
ON_BOUNDED_SIDE))
|
||||
|
|
@ -626,18 +626,18 @@ public:
|
|||
return true;
|
||||
// otherwise it will return false later
|
||||
}
|
||||
} else if (s.is_segment() and r.is_segment()) {
|
||||
} else if (s.is_segment() && r.is_segment()) {
|
||||
// here s and r are both segments
|
||||
|
||||
// philaris: I assert that q is an endpoint of both s and r
|
||||
|
||||
CGAL_assertion(
|
||||
same_points(q, s.source_site()) or
|
||||
same_points(q, s.source_site()) ||
|
||||
same_points(q, s.target_site())
|
||||
);
|
||||
|
||||
CGAL_assertion(
|
||||
same_points(q, r.source_site()) or
|
||||
same_points(q, r.source_site()) ||
|
||||
same_points(q, r.target_site())
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -101,18 +101,18 @@ public:
|
|||
bool is_s2_pnt = s2.is_point();
|
||||
bool is_s3_pnt = s3.is_point();
|
||||
|
||||
CGAL_assertion( not (is_s1_pnt and is_s2_pnt and is_s3_pnt) );
|
||||
CGAL_assertion( ! (is_s1_pnt && is_s2_pnt && is_s3_pnt) );
|
||||
|
||||
// tie breaker in case at least one site is a point and
|
||||
// the segment to split is not axis-parallel
|
||||
if ((is_s1_pnt or is_s2_pnt or is_s3_pnt) and
|
||||
(not is_site_h_or_v(s))) {
|
||||
if ((is_s1_pnt || is_s2_pnt || is_s3_pnt) &&
|
||||
(! is_site_h_or_v(s))) {
|
||||
if (retval == ON_ORIENTED_BOUNDARY) {
|
||||
unsigned int num_pts =
|
||||
(is_s1_pnt? 1 : 0) +
|
||||
(is_s2_pnt? 1 : 0) +
|
||||
(is_s3_pnt? 1 : 0) ;
|
||||
CGAL_assertion( num_pts == 1 or num_pts == 2 );
|
||||
CGAL_assertion( num_pts == 1 || num_pts == 2 );
|
||||
CGAL_SDG_DEBUG(std::cout
|
||||
<< "debug: Oriented_side_C2 num_pts=" << num_pts
|
||||
<< std::endl;);
|
||||
|
|
@ -136,10 +136,10 @@ public:
|
|||
const Site_2 * a;
|
||||
const Site_2 * b;
|
||||
|
||||
if (not is_s1_pnt) {
|
||||
if (! is_s1_pnt) {
|
||||
a = &s2;
|
||||
b = &s3;
|
||||
} else if (not is_s2_pnt) {
|
||||
} else if (! is_s2_pnt) {
|
||||
a = &s1;
|
||||
b = &s3;
|
||||
} else { // not is_s3_pnt
|
||||
|
|
@ -189,7 +189,7 @@ public:
|
|||
Oriented_side operator()(const Site_2& s1, const Site_2& s2,
|
||||
const Site_2& s, const Site_2& p) const
|
||||
{
|
||||
CGAL_precondition( s.is_segment() and p.is_point() );
|
||||
CGAL_precondition( s.is_segment() && p.is_point() );
|
||||
|
||||
Line_2 lseg = compute_supporting_line( s.supporting_site() );
|
||||
Line_2 lp = compute_linf_perpendicular(lseg, p.point());
|
||||
|
|
@ -205,37 +205,37 @@ public:
|
|||
bool is_s2_segment = s2.is_segment();
|
||||
|
||||
CGAL_assertion(
|
||||
(is_s1_segment and (same_segments(s, s1) or
|
||||
(is_s1_segment && (same_segments(s, s1) ||
|
||||
same_segments(s, s1.supporting_site())))
|
||||
or
|
||||
(is_s2_segment and (same_segments(s, s2) or
|
||||
||
|
||||
(is_s2_segment && (same_segments(s, s2) ||
|
||||
same_segments(s, s2.supporting_site()))));
|
||||
|
||||
bool are_both_segments = is_s1_segment and is_s2_segment;
|
||||
bool are_both_segments = is_s1_segment && is_s2_segment;
|
||||
|
||||
// boolean variable of:
|
||||
// point in {s1,s2} being endpoint of the segment in {s1,s2}
|
||||
bool are_endp_s1s2 =
|
||||
(is_s1_segment and
|
||||
( same_points(s2, s1.source_site()) or
|
||||
(is_s1_segment &&
|
||||
( same_points(s2, s1.source_site()) ||
|
||||
same_points(s2, s1.target_site()) ) )
|
||||
or
|
||||
(is_s2_segment and
|
||||
( same_points(s1, s2.source_site()) or
|
||||
||
|
||||
(is_s2_segment &&
|
||||
( same_points(s1, s2.source_site()) ||
|
||||
same_points(s1, s2.target_site()) ) ) ;
|
||||
|
||||
if (are_both_segments) {
|
||||
// the two segments must have a common endpoint,
|
||||
// which is the linf projection
|
||||
|
||||
CGAL_assertion( is_site_h_or_v(s1) or is_site_h_or_v(s2) );
|
||||
CGAL_assertion( is_site_h_or_v(s1) || is_site_h_or_v(s2) );
|
||||
|
||||
if (same_points(s1.source_site(), s2.source_site()) or
|
||||
if (same_points(s1.source_site(), s2.source_site()) ||
|
||||
same_points(s1.source_site(), s2.target_site()) ) {
|
||||
testpnt = s1.source_site().point();
|
||||
} else {
|
||||
CGAL_assertion(
|
||||
same_points(s1.target_site(), s2.source_site()) or
|
||||
same_points(s1.target_site(), s2.source_site()) ||
|
||||
same_points(s1.target_site(), s2.target_site()) );
|
||||
testpnt = s1.target_site().point();
|
||||
}
|
||||
|
|
@ -262,7 +262,7 @@ public:
|
|||
<< "case of s1/s2 no endpoint relation"
|
||||
<< std::endl;);
|
||||
|
||||
CGAL_assertion( not is_site_h_or_v(s) );
|
||||
CGAL_assertion( ! is_site_h_or_v(s) );
|
||||
|
||||
has_lseg_neg_slope =
|
||||
CGAL::sign(lseg.a()) == CGAL::sign(lseg.b());
|
||||
|
|
@ -307,7 +307,7 @@ public:
|
|||
const Site_2& s, const Site_2& p,
|
||||
const Point_2 & pt) const
|
||||
{
|
||||
CGAL_precondition( s.is_segment() and p.is_point() );
|
||||
CGAL_precondition( s.is_segment() && p.is_point() );
|
||||
CGAL_USE(pt);
|
||||
|
||||
Line_2 lseg = compute_supporting_line( s.supporting_site() );
|
||||
|
|
@ -323,37 +323,37 @@ public:
|
|||
bool is_s2_segment = s2.is_segment();
|
||||
|
||||
CGAL_assertion(
|
||||
(is_s1_segment and (same_segments(s, s1) or
|
||||
(is_s1_segment && (same_segments(s, s1) ||
|
||||
same_segments(s, s1.supporting_site())))
|
||||
or
|
||||
(is_s2_segment and (same_segments(s, s2) or
|
||||
||
|
||||
(is_s2_segment && (same_segments(s, s2) ||
|
||||
same_segments(s, s2.supporting_site()))));
|
||||
|
||||
bool are_both_segments = is_s1_segment and is_s2_segment;
|
||||
bool are_both_segments = is_s1_segment && is_s2_segment;
|
||||
|
||||
// boolean variable of:
|
||||
// point in {s1,s2} being endpoint of the segment in {s1,s2}
|
||||
bool are_endp_s1s2 =
|
||||
(is_s1_segment and
|
||||
( same_points(s2, s1.source_site()) or
|
||||
(is_s1_segment &&
|
||||
( same_points(s2, s1.source_site()) ||
|
||||
same_points(s2, s1.target_site()) ) )
|
||||
or
|
||||
(is_s2_segment and
|
||||
( same_points(s1, s2.source_site()) or
|
||||
||
|
||||
(is_s2_segment &&
|
||||
( same_points(s1, s2.source_site()) ||
|
||||
same_points(s1, s2.target_site()) ) ) ;
|
||||
|
||||
if (are_both_segments) {
|
||||
// the two segments must have a common endpoint,
|
||||
// which is the linf projection
|
||||
|
||||
CGAL_assertion( is_site_h_or_v(s1) or is_site_h_or_v(s2) );
|
||||
CGAL_assertion( is_site_h_or_v(s1) || is_site_h_or_v(s2) );
|
||||
|
||||
if (same_points(s1.source_site(), s2.source_site()) or
|
||||
if (same_points(s1.source_site(), s2.source_site()) ||
|
||||
same_points(s1.source_site(), s2.target_site()) ) {
|
||||
testpnt = s1.source_site().point();
|
||||
} else {
|
||||
CGAL_assertion(
|
||||
same_points(s1.target_site(), s2.source_site()) or
|
||||
same_points(s1.target_site(), s2.source_site()) ||
|
||||
same_points(s1.target_site(), s2.target_site()) );
|
||||
testpnt = s1.target_site().point();
|
||||
}
|
||||
|
|
@ -380,7 +380,7 @@ public:
|
|||
<< "case of s1/s2 no endpoint relation"
|
||||
<< std::endl;);
|
||||
|
||||
CGAL_assertion( not is_site_h_or_v(s) );
|
||||
CGAL_assertion( ! is_site_h_or_v(s) );
|
||||
|
||||
bool has_lseg_neg_slope =
|
||||
CGAL::sign(lseg.a()) == CGAL::sign(lseg.b());
|
||||
|
|
@ -413,9 +413,9 @@ public:
|
|||
|
||||
if (retval == ON_ORIENTED_BOUNDARY) {
|
||||
// philaris: tocheck this later
|
||||
CGAL_assertion(not are_both_segments);
|
||||
CGAL_assertion(! are_both_segments);
|
||||
// philaris: tocheck this later
|
||||
CGAL_assertion(not are_endp_s1s2);
|
||||
CGAL_assertion(! are_endp_s1s2);
|
||||
|
||||
CGAL_SDG_DEBUG(std::cout << "debug: Oriented_side_C2 (s1,s2,s,p)= ("
|
||||
<< s1 << ") (" << s2 << ") ("
|
||||
|
|
|
|||
|
|
@ -239,13 +239,13 @@ find_faces_to_split(const Vertex_handle& v, const Site_2& t,
|
|||
os0_fc_start = true;
|
||||
}
|
||||
if (os2 == ON_NEGATIVE_SIDE) {
|
||||
CGAL_assertion(not is_set_f0_on);
|
||||
CGAL_assertion(! is_set_f0_on);
|
||||
CGAL_assertion_code( is_set_f0_on = true ) ;
|
||||
f0_on = ff1;
|
||||
CGAL_SDG_DEBUG(std::cout << "debug impl found f0_on "
|
||||
<< std::endl;);
|
||||
} else if (os2 == ON_POSITIVE_SIDE) {
|
||||
CGAL_assertion(not is_set_f0_op);
|
||||
CGAL_assertion(! is_set_f0_op);
|
||||
CGAL_assertion_code( is_set_f0_op = true ) ;
|
||||
f0_op = ff1;
|
||||
CGAL_SDG_DEBUG(std::cout << "debug impl found f0_op "
|
||||
|
|
@ -263,7 +263,7 @@ find_faces_to_split(const Vertex_handle& v, const Site_2& t,
|
|||
<< "with os1=" << os1 << std::endl;);
|
||||
#ifndef CGAL_NO_ASSERTIONS
|
||||
if (os1 == ON_ORIENTED_BOUNDARY) {
|
||||
CGAL_assertion(not is_nop);
|
||||
CGAL_assertion(! is_nop);
|
||||
is_nop = true;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -285,7 +285,7 @@ find_faces_to_split(const Vertex_handle& v, const Site_2& t,
|
|||
<< "with os1=" << os1 << std::endl;);
|
||||
#ifndef CGAL_NO_ASSERTIONS
|
||||
if (os1 == ON_ORIENTED_BOUNDARY) {
|
||||
CGAL_assertion(not is_pon);
|
||||
CGAL_assertion(! is_pon);
|
||||
is_pon = true;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -298,13 +298,13 @@ find_faces_to_split(const Vertex_handle& v, const Site_2& t,
|
|||
|
||||
if (os2 == ON_ORIENTED_BOUNDARY) {
|
||||
if (os1 == ON_NEGATIVE_SIDE) {
|
||||
CGAL_assertion(not is_set_f0_no);
|
||||
CGAL_assertion(! is_set_f0_no);
|
||||
CGAL_assertion_code( is_set_f0_no = true );
|
||||
f0_no = ff2;
|
||||
CGAL_SDG_DEBUG(std::cout << "debug impl found f0_no "
|
||||
<< std::endl;);
|
||||
} else if (os1 == ON_POSITIVE_SIDE) {
|
||||
CGAL_assertion(not is_set_f0_po);
|
||||
CGAL_assertion(! is_set_f0_po);
|
||||
CGAL_assertion_code( is_set_f0_po = true );
|
||||
f0_po = ff2;
|
||||
CGAL_SDG_DEBUG(std::cout << "debug impl found f0_po "
|
||||
|
|
@ -336,7 +336,7 @@ find_faces_to_split(const Vertex_handle& v, const Site_2& t,
|
|||
CGAL_assertion( f1 != f0_po );
|
||||
CGAL_assertion( f1 != f0_on );
|
||||
}
|
||||
if (is_nop and is_pon) {
|
||||
if (is_nop && is_pon) {
|
||||
CGAL_assertion( f0_op != f0_on );
|
||||
CGAL_assertion( f0_no != f0_po );
|
||||
}
|
||||
|
|
@ -440,17 +440,17 @@ find_faces_to_split(const Vertex_handle& v, const Site_2& t,
|
|||
CGAL_assertion( is_pon == is_set_f0_po );
|
||||
CGAL_assertion( is_pon == is_set_f0_on );
|
||||
|
||||
CGAL_assertion( first_found_f1 or first_found_f2);
|
||||
CGAL_assertion( not (first_found_f1 and first_found_f2) );
|
||||
CGAL_assertion( first_found_f1 || first_found_f2);
|
||||
CGAL_assertion( ! (first_found_f1 && first_found_f2) );
|
||||
|
||||
CGAL_assertion((not connect_all_nop) or (count_nop_zeros > 0));
|
||||
CGAL_assertion((! connect_all_nop) || (count_nop_zeros > 0));
|
||||
if (connect_all_nop) {
|
||||
flips_nop = count_nop_zeros;
|
||||
} else {
|
||||
flips_nop = 0;
|
||||
}
|
||||
|
||||
CGAL_assertion((not connect_all_pon) or (count_pon_zeros > 0));
|
||||
CGAL_assertion((! connect_all_pon) || (count_pon_zeros > 0));
|
||||
if (connect_all_pon) {
|
||||
flips_pon = count_pon_zeros;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -351,26 +351,26 @@ private:
|
|||
|
||||
// here the pair of p, q contains a point and a segment
|
||||
|
||||
CGAL_assertion( p.is_point() or q.is_point() );
|
||||
CGAL_assertion( p.is_point() || q.is_point() );
|
||||
|
||||
CGAL_SDG_DEBUG( std::cout << "debug incircle_p of p=" << p
|
||||
<< " q=" << q << " t=" << t << std::endl; );
|
||||
|
||||
// philaris: here, for Linf there are differences from L2
|
||||
|
||||
if ((q.is_segment() and is_site_h_or_v(q)) or
|
||||
(p.is_segment() and is_site_h_or_v(p)) ) {
|
||||
if ((q.is_segment() && is_site_h_or_v(q)) ||
|
||||
(p.is_segment() && is_site_h_or_v(p)) ) {
|
||||
// the case of horizontal or vertical segment is the same
|
||||
// as in L2
|
||||
Orientation o;
|
||||
if ( p.is_point() && q.is_segment() ) {
|
||||
CGAL_assertion( same_points(p, q.source_site()) or
|
||||
CGAL_assertion( same_points(p, q.source_site()) ||
|
||||
same_points(p, q.target_site()) );
|
||||
Point_2 pq =
|
||||
same_points(p, q.source_site()) ? q.target() : q.source();
|
||||
o = orientation_linf(p.point(), pq, t.point());
|
||||
} else { // p is a segment and q is a point
|
||||
CGAL_assertion( same_points(q, p.source_site()) or
|
||||
CGAL_assertion( same_points(q, p.source_site()) ||
|
||||
same_points(q, p.target_site()) );
|
||||
Point_2 pp =
|
||||
same_points(q, p.source_site()) ? p.target() : p.source();
|
||||
|
|
@ -403,7 +403,7 @@ private:
|
|||
|
||||
|
||||
Oriented_side side_of_pnt;
|
||||
if (same_points(q.source_site(), p) or
|
||||
if (same_points(q.source_site(), p) ||
|
||||
same_points(q.target_site(), p) ) {
|
||||
side_of_pnt = ON_ORIENTED_BOUNDARY;
|
||||
} else {
|
||||
|
|
@ -411,7 +411,7 @@ private:
|
|||
}
|
||||
|
||||
if (side_of_pnt == ON_ORIENTED_BOUNDARY) {
|
||||
CGAL_assertion(same_points(q.source_site(), p) or
|
||||
CGAL_assertion(same_points(q.source_site(), p) ||
|
||||
same_points(q.target_site(), p) );
|
||||
} else {
|
||||
// here, side_of_pnt is non-zero
|
||||
|
|
@ -430,7 +430,7 @@ private:
|
|||
|
||||
Segment_2 seg = q.segment();
|
||||
|
||||
if (is_same_qsrc_p or is_same_qtrg_p) {
|
||||
if (is_same_qsrc_p || is_same_qtrg_p) {
|
||||
Point_2 otherpnt;
|
||||
if (is_same_qsrc_p) {
|
||||
otherpnt = seg.target();
|
||||
|
|
@ -520,7 +520,7 @@ private:
|
|||
<< " osv=" << osv << std::endl; );
|
||||
|
||||
if ((osh !=
|
||||
ON_NEGATIVE_SIDE) and
|
||||
ON_NEGATIVE_SIDE) &&
|
||||
(osv !=
|
||||
ON_NEGATIVE_SIDE))
|
||||
{
|
||||
|
|
@ -546,7 +546,7 @@ private:
|
|||
Point_2 pnt = q.point();
|
||||
|
||||
Oriented_side side_of_pnt;
|
||||
if (same_points(p.source_site(), q) or
|
||||
if (same_points(p.source_site(), q) ||
|
||||
same_points(p.target_site(), q) ) {
|
||||
side_of_pnt = ON_ORIENTED_BOUNDARY;
|
||||
} else {
|
||||
|
|
@ -557,7 +557,7 @@ private:
|
|||
<< " side_of_pnt=" << side_of_pnt << std::endl; );
|
||||
|
||||
if (side_of_pnt == ON_ORIENTED_BOUNDARY) {
|
||||
CGAL_assertion(same_points(p.source_site(), q) or
|
||||
CGAL_assertion(same_points(p.source_site(), q) ||
|
||||
same_points(p.target_site(), q) );
|
||||
} else {
|
||||
// here, side_of_pnt is non-zero
|
||||
|
|
@ -576,7 +576,7 @@ private:
|
|||
|
||||
Segment_2 seg = p.segment();
|
||||
|
||||
if (is_same_psrc_q or is_same_ptrg_q) {
|
||||
if (is_same_psrc_q || is_same_ptrg_q) {
|
||||
Point_2 otherpnt;
|
||||
if (is_same_psrc_q) {
|
||||
otherpnt = seg.target();
|
||||
|
|
@ -670,7 +670,7 @@ private:
|
|||
<< " osv=" << osv << std::endl; );
|
||||
|
||||
if ((osh !=
|
||||
ON_NEGATIVE_SIDE) and
|
||||
ON_NEGATIVE_SIDE) &&
|
||||
(osv !=
|
||||
ON_NEGATIVE_SIDE))
|
||||
{
|
||||
|
|
@ -759,13 +759,13 @@ private:
|
|||
Comparison_result cmpxpq = cmpx(pp, qq);
|
||||
Comparison_result cmpypq = cmpy(pp, qq);
|
||||
|
||||
if ((cmpxpq == EQUAL) or (cmpypq == EQUAL)) {
|
||||
if (not (is_p_tsrc or is_q_tsrc)) {
|
||||
if ((cmpxpq == EQUAL) || (cmpypq == EQUAL)) {
|
||||
if (! (is_p_tsrc || is_q_tsrc)) {
|
||||
if (CGAL::right_turn(pp, qq, t.segment().source())) {
|
||||
return NEGATIVE;
|
||||
}
|
||||
}
|
||||
if (not (is_p_ttrg or is_q_ttrg)) {
|
||||
if (! (is_p_ttrg || is_q_ttrg)) {
|
||||
if (CGAL::right_turn(pp, qq, t.segment().target())) {
|
||||
return NEGATIVE;
|
||||
}
|
||||
|
|
@ -801,17 +801,17 @@ private:
|
|||
bool is_q_tsrc = same_points(q, t.source_site());
|
||||
bool is_q_ttrg = same_points(q, t.target_site());
|
||||
|
||||
bool is_q_on_t = is_q_tsrc or is_q_ttrg;
|
||||
bool is_q_on_t = is_q_tsrc || is_q_ttrg;
|
||||
|
||||
bool is_q_psrc = same_points(q, p.source_site());
|
||||
bool is_q_ptrg = same_points(q, p.target_site());
|
||||
|
||||
bool is_q_on_p = is_q_psrc or is_q_ptrg;
|
||||
bool is_q_on_p = is_q_psrc || is_q_ptrg;
|
||||
|
||||
|
||||
if ( is_q_on_t and is_q_on_p) {
|
||||
if ( is_q_on_t && is_q_on_p) {
|
||||
CGAL_SDG_DEBUG(std::cout << "debug incircle_sps "
|
||||
<< "is_q_on_t and is_q_on_p" << std::endl; );
|
||||
<< "is_q_on_t && is_q_on_p" << std::endl; );
|
||||
|
||||
Point_2 pother = is_q_psrc ? p.target() : p.source();
|
||||
Point_2 tother = is_q_tsrc ? t.target() : t.source();
|
||||
|
|
@ -825,7 +825,7 @@ private:
|
|||
if (o != RIGHT_TURN) {
|
||||
return POSITIVE;
|
||||
} else {
|
||||
if (is_site_h_or_v(p) or is_site_h_or_v(t)) {
|
||||
if (is_site_h_or_v(p) || is_site_h_or_v(t)) {
|
||||
return NEGATIVE;
|
||||
} else {
|
||||
bool has_p_pos_slope = has_positive_slope(p);
|
||||
|
|
@ -844,7 +844,7 @@ private:
|
|||
if ( is_site_h_or_v(p) ) {
|
||||
return POSITIVE;
|
||||
} else {
|
||||
CGAL_assertion(not is_site_h_or_v(p));
|
||||
CGAL_assertion(! is_site_h_or_v(p));
|
||||
|
||||
// compute slope of segment p
|
||||
Line_2 l = compute_supporting_line(p.supporting_site());
|
||||
|
|
@ -857,7 +857,7 @@ private:
|
|||
oriented_side_of_line(l, pnt);
|
||||
|
||||
if (side_of_pnt == ON_ORIENTED_BOUNDARY) {
|
||||
CGAL_assertion(same_points(p.source_site(), q) or
|
||||
CGAL_assertion(same_points(p.source_site(), q) ||
|
||||
same_points(p.target_site(), q) );
|
||||
}
|
||||
|
||||
|
|
@ -870,7 +870,7 @@ private:
|
|||
Point_2 pnt_on_seg;
|
||||
Segment_2 seg = p.segment();
|
||||
|
||||
if (is_same_psrc_q or is_same_ptrg_q) {
|
||||
if (is_same_psrc_q || is_same_ptrg_q) {
|
||||
pnt_on_seg = pnt;
|
||||
Point_2 otherpnt;
|
||||
if (is_same_psrc_q) {
|
||||
|
|
@ -946,7 +946,7 @@ private:
|
|||
|
||||
Point_2 testp, otherp;
|
||||
|
||||
if (is_psrc_tsrc or is_ptrg_tsrc) {
|
||||
if (is_psrc_tsrc || is_ptrg_tsrc) {
|
||||
CGAL_SDG_DEBUG(std::cout
|
||||
<< "debug incircle_sps tsrc endp of p"
|
||||
<< std::endl; );
|
||||
|
|
@ -962,7 +962,7 @@ private:
|
|||
|
||||
testp = t.source_site().point();
|
||||
otherp = t.target_site().point();
|
||||
} else if (is_psrc_ttrg or is_ptrg_ttrg) {
|
||||
} else if (is_psrc_ttrg || is_ptrg_ttrg) {
|
||||
CGAL_SDG_DEBUG(std::cout
|
||||
<< "debug incircle_sps ttrg endp of p"
|
||||
<< std::endl; );
|
||||
|
|
@ -992,7 +992,7 @@ private:
|
|||
|
||||
// check if testp equals pnt_on_seg
|
||||
|
||||
if ((cmpx(testp, pnt_on_seg) == EQUAL ) and
|
||||
if ((cmpx(testp, pnt_on_seg) == EQUAL ) &&
|
||||
(cmpy(testp, pnt_on_seg) == EQUAL ) ) {
|
||||
// here testp is the same as pnt_on_seg
|
||||
|
||||
|
|
@ -1055,16 +1055,16 @@ private:
|
|||
bool is_p_tsrc = same_points(p, t.source_site());
|
||||
bool is_p_ttrg = same_points(p, t.target_site());
|
||||
|
||||
bool is_p_on_t = is_p_tsrc or is_p_ttrg;
|
||||
bool is_p_on_t = is_p_tsrc || is_p_ttrg;
|
||||
|
||||
bool is_p_qsrc = same_points(p, q.source_site());
|
||||
bool is_p_qtrg = same_points(p, q.target_site());
|
||||
|
||||
bool is_p_on_q = is_p_qsrc or is_p_qtrg;
|
||||
bool is_p_on_q = is_p_qsrc || is_p_qtrg;
|
||||
|
||||
if ( is_p_on_t and is_p_on_q ) {
|
||||
if ( is_p_on_t && is_p_on_q ) {
|
||||
CGAL_SDG_DEBUG(std::cout << "debug incircle_pss "
|
||||
<< "is_p_on_t and is_p_on_q" << std::endl; );
|
||||
<< "is_p_on_t && is_p_on_q" << std::endl; );
|
||||
|
||||
Point_2 qother = is_p_qsrc ? q.target() : q.source();
|
||||
Point_2 tother = is_p_tsrc ? t.target() : t.source();
|
||||
|
|
@ -1078,7 +1078,7 @@ private:
|
|||
if (o != LEFT_TURN) {
|
||||
return POSITIVE;
|
||||
} else {
|
||||
if ( is_site_h_or_v(q) or is_site_h_or_v(t) ) {
|
||||
if ( is_site_h_or_v(q) || is_site_h_or_v(t) ) {
|
||||
return NEGATIVE;
|
||||
} else {
|
||||
bool has_q_pos_slope = has_positive_slope(q);
|
||||
|
|
@ -1099,7 +1099,7 @@ private:
|
|||
if ( is_site_h_or_v(q) ) {
|
||||
return POSITIVE;
|
||||
} else {
|
||||
CGAL_assertion(not is_site_h_or_v(q));
|
||||
CGAL_assertion(! is_site_h_or_v(q));
|
||||
|
||||
Point_2 pnt = p.point();
|
||||
|
||||
|
|
@ -1116,7 +1116,7 @@ private:
|
|||
oriented_side_of_line(l, pnt);
|
||||
|
||||
if (side_of_pnt == ON_ORIENTED_BOUNDARY) {
|
||||
CGAL_assertion(same_points(q.source_site(), p) or
|
||||
CGAL_assertion(same_points(q.source_site(), p) ||
|
||||
same_points(q.target_site(), p) );
|
||||
}
|
||||
|
||||
|
|
@ -1129,7 +1129,7 @@ private:
|
|||
Point_2 pnt_on_seg;
|
||||
Segment_2 seg = q.segment();
|
||||
|
||||
if (is_same_qsrc_p or is_same_qtrg_p) {
|
||||
if (is_same_qsrc_p || is_same_qtrg_p) {
|
||||
CGAL_SDG_DEBUG(std::cout
|
||||
<< "debug: pss: p is endpoint of q" << std::endl; );
|
||||
pnt_on_seg = pnt;
|
||||
|
|
@ -1203,7 +1203,7 @@ private:
|
|||
|
||||
Point_2 testt, othert;
|
||||
|
||||
if (is_qsrc_tsrc or is_qtrg_tsrc) {
|
||||
if (is_qsrc_tsrc || is_qtrg_tsrc) {
|
||||
CGAL_SDG_DEBUG(std::cout
|
||||
<< "debug incircle_pss tsrc endp of q" << std::endl; );
|
||||
|
||||
|
|
@ -1218,7 +1218,7 @@ private:
|
|||
|
||||
testt = t.source_site().point();
|
||||
othert = t.target_site().point();
|
||||
} else if (is_qsrc_ttrg or is_qtrg_ttrg) {
|
||||
} else if (is_qsrc_ttrg || is_qtrg_ttrg) {
|
||||
CGAL_SDG_DEBUG(std::cout
|
||||
<< "debug incircle_pss ttrg endp of q" << std::endl; );
|
||||
|
||||
|
|
@ -1247,7 +1247,7 @@ private:
|
|||
|
||||
// check if testp equals pnt_on_seg
|
||||
|
||||
if ((cmpx(testt, pnt_on_seg) == EQUAL ) and
|
||||
if ((cmpx(testt, pnt_on_seg) == EQUAL ) &&
|
||||
(cmpy(testt, pnt_on_seg) == EQUAL ) ) {
|
||||
// here testt is the same as pnt_on_seg
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -213,8 +213,8 @@ namespace CGAL {
|
|||
<< " bot=" << *bot_p << " top=" << *top_p
|
||||
<< std::endl; );
|
||||
|
||||
const bool exist_two_with_same_x = samex_pq or samex_pr or samex_qr;
|
||||
const bool exist_two_with_same_y = samey_pq or samey_pr or samey_qr;
|
||||
const bool exist_two_with_same_x = samex_pq || samex_pr || samex_qr;
|
||||
const bool exist_two_with_same_y = samey_pq || samey_pr || samey_qr;
|
||||
|
||||
bool is_lft_input (true);
|
||||
bool is_rgt_input (true);
|
||||
|
|
@ -245,11 +245,11 @@ namespace CGAL {
|
|||
}
|
||||
CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs two same x"
|
||||
<< std::endl;);
|
||||
if ( (bot_p == dx) or (top_p == dx) ) {
|
||||
if ( (bot_p == dx) || (top_p == dx) ) {
|
||||
CGAL_assertion (
|
||||
( ( CGAL::compare(*dx, *s1) == SMALLER ) and
|
||||
( CGAL::compare(*dx, *s2) == SMALLER ) ) or
|
||||
( ( CGAL::compare(*dx, *s1) == LARGER ) and
|
||||
( ( CGAL::compare(*dx, *s1) == SMALLER ) &&
|
||||
( CGAL::compare(*dx, *s2) == SMALLER ) ) ||
|
||||
( ( CGAL::compare(*dx, *s1) == LARGER ) &&
|
||||
( CGAL::compare(*dx, *s2) == LARGER ) ) );
|
||||
dxmirror = *s1 + *s2 - *dx;
|
||||
if (top_p == dx) {
|
||||
|
|
@ -286,11 +286,11 @@ namespace CGAL {
|
|||
CGAL_assertion( dy != NULL );
|
||||
CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs two same y"
|
||||
<< std::endl;);
|
||||
if ( (lft_p == dy) or (rgt_p == dy) ) {
|
||||
if ( (lft_p == dy) || (rgt_p == dy) ) {
|
||||
CGAL_assertion (
|
||||
( ( CGAL::compare(*dy, *s1) == SMALLER ) and
|
||||
( CGAL::compare(*dy, *s2) == SMALLER ) ) or
|
||||
( ( CGAL::compare(*dy, *s1) == LARGER ) and
|
||||
( ( CGAL::compare(*dy, *s1) == SMALLER ) &&
|
||||
( CGAL::compare(*dy, *s2) == SMALLER ) ) ||
|
||||
( ( CGAL::compare(*dy, *s1) == LARGER ) &&
|
||||
( CGAL::compare(*dy, *s2) == LARGER ) ) );
|
||||
dymirror = *s1 + *s2 - *dy;
|
||||
if (rgt_p == dy) {
|
||||
|
|
@ -308,7 +308,7 @@ namespace CGAL {
|
|||
} // end of if exist_two_with_same_x != exist_two_with_same_y
|
||||
|
||||
const bool is_L_shaped =
|
||||
exist_two_with_same_x and exist_two_with_same_y;
|
||||
exist_two_with_same_x && exist_two_with_same_y;
|
||||
|
||||
const FT two(2);
|
||||
|
||||
|
|
@ -346,13 +346,13 @@ namespace CGAL {
|
|||
top_p = &fix2;
|
||||
}
|
||||
else {
|
||||
CGAL_assertion( is_bot_input and is_top_input );
|
||||
CGAL_assertion( is_bot_input && is_top_input );
|
||||
Point_2 const * const pt_lft_p =
|
||||
(is_lft_input)? CGAL::cpp11::get<5>(tupx) : NULL;
|
||||
Point_2 const * const pt_rgt_p =
|
||||
(is_rgt_input)? CGAL::cpp11::get<6>(tupx) : NULL;
|
||||
Point_2 const * const pt_top_p = CGAL::cpp11::get<6>(tupy);
|
||||
if ((pt_top_p != pt_lft_p) and (pt_top_p != pt_rgt_p)) {
|
||||
if ((pt_top_p != pt_lft_p) && (pt_top_p != pt_rgt_p)) {
|
||||
// lower the bottom side
|
||||
fix1 = *top_p - *rgt_p + *lft_p;
|
||||
bot_p = &fix1;
|
||||
|
|
@ -362,7 +362,7 @@ namespace CGAL {
|
|||
CGAL_assertion_code(
|
||||
Point_2 const * const pt_bot_p = CGAL::cpp11::get<5>(tupy);)
|
||||
CGAL_assertion(
|
||||
(pt_bot_p != pt_lft_p) and (pt_bot_p != pt_rgt_p) );
|
||||
(pt_bot_p != pt_lft_p) && (pt_bot_p != pt_rgt_p) );
|
||||
// augment the top side
|
||||
fix2 = *bot_p + *rgt_p - *lft_p;
|
||||
top_p = &fix2;
|
||||
|
|
@ -394,14 +394,14 @@ namespace CGAL {
|
|||
lft_p = &fix2;
|
||||
}
|
||||
else {
|
||||
CGAL_assertion( is_lft_input and is_rgt_input );
|
||||
CGAL_assertion( is_lft_input && is_rgt_input );
|
||||
Point_2 const * const pt_lft_p = CGAL::cpp11::get<5>(tupx);
|
||||
Point_2 const * const pt_bot_p =
|
||||
(is_bot_input) ? CGAL::cpp11::get<5>(tupy) : NULL;
|
||||
Point_2 const * const pt_top_p =
|
||||
(is_top_input) ? CGAL::cpp11::get<6>(tupy) : NULL;
|
||||
// find the movable side or sides of the rectangle
|
||||
if ((pt_lft_p != pt_bot_p) and (pt_lft_p != pt_top_p)) {
|
||||
if ((pt_lft_p != pt_bot_p) && (pt_lft_p != pt_top_p)) {
|
||||
// augment the right side
|
||||
fix1 = *lft_p + *top_p - *bot_p;
|
||||
rgt_p = &fix1;
|
||||
|
|
@ -410,7 +410,7 @@ namespace CGAL {
|
|||
CGAL_assertion_code(
|
||||
Point_2 const * const pt_rgt_p = CGAL::cpp11::get<6>(tupx);)
|
||||
CGAL_assertion(
|
||||
(pt_rgt_p != pt_bot_p) and (pt_rgt_p != pt_top_p) );
|
||||
(pt_rgt_p != pt_bot_p) && (pt_rgt_p != pt_top_p) );
|
||||
// diminish from the left side
|
||||
fix2 = *rgt_p - *top_p + *bot_p;
|
||||
lft_p = &fix2;
|
||||
|
|
@ -447,8 +447,8 @@ namespace CGAL {
|
|||
const size_t count_eq = CGAL::cpp11::get<4>(tup);
|
||||
CGAL_assertion( count_eq <= 2 );
|
||||
if (count_eq == 0) {
|
||||
CGAL_assertion( cxmint == SMALLER and cxtmax == SMALLER and
|
||||
cymint == SMALLER and cytmax == SMALLER );
|
||||
CGAL_assertion( cxmint == SMALLER && cxtmax == SMALLER &&
|
||||
cymint == SMALLER && cytmax == SMALLER );
|
||||
CGAL_SDG_DEBUG(std::cout
|
||||
<< "debug Side_of_bs return ON_BOUNDED_SIDE" << std::endl;);
|
||||
return ON_BOUNDED_SIDE;
|
||||
|
|
@ -474,7 +474,7 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
const bool at_lft = CGAL::cpp11::get<2>(tup);
|
||||
if (is_lft_input and at_lft) {
|
||||
if (is_lft_input && at_lft) {
|
||||
CGAL_assertion(cxmint == EQUAL);
|
||||
CGAL_SDG_DEBUG(std::cout
|
||||
<< "debug Side_of_bs t on lft input" << std::endl;);
|
||||
|
|
@ -488,7 +488,7 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
const bool at_rgt = CGAL::cpp11::get<0>(tup);
|
||||
if (is_rgt_input and at_rgt) {
|
||||
if (is_rgt_input && at_rgt) {
|
||||
CGAL_assertion(cxtmax == EQUAL);
|
||||
CGAL_SDG_DEBUG(std::cout
|
||||
<< "debug Side_of_bs t on rgt input" << std::endl;);
|
||||
|
|
@ -502,7 +502,7 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
const bool at_bot = CGAL::cpp11::get<3>(tup);
|
||||
if (is_bot_input and at_bot) {
|
||||
if (is_bot_input && at_bot) {
|
||||
CGAL_assertion(cymint == EQUAL);
|
||||
CGAL_SDG_DEBUG(std::cout
|
||||
<< "debug Side_of_bs t on bot input" << std::endl;);
|
||||
|
|
@ -516,7 +516,7 @@ namespace CGAL {
|
|||
}
|
||||
|
||||
const bool at_top = CGAL::cpp11::get<1>(tup);
|
||||
if (is_top_input and at_top) {
|
||||
if (is_top_input && at_top) {
|
||||
CGAL_assertion(cytmax == EQUAL);
|
||||
CGAL_SDG_DEBUG(std::cout
|
||||
<< "debug Side_of_bs t on top input" << std::endl;);
|
||||
|
|
|
|||
|
|
@ -42,18 +42,18 @@ namespace CGAL {
|
|||
bool is_degenerate_pqt = (orientation_Linf(p,q,t) == DEGENERATE);
|
||||
bool is_degenerate_qrt = (orientation_Linf(q,r,t) == DEGENERATE);
|
||||
|
||||
if (is_degenerate_pqt and is_degenerate_qrt) {
|
||||
if (is_degenerate_pqt && is_degenerate_qrt) {
|
||||
//p,q,r,t are all collinear
|
||||
CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs pqrt all collin" << std::endl;);
|
||||
return ON_ORIENTED_BOUNDARY;
|
||||
}
|
||||
|
||||
if (not is_degenerate_pqt) {
|
||||
if (! is_degenerate_pqt) {
|
||||
//CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs qpt not monotone" << std::endl;);
|
||||
return predicate(q,p,t,r);
|
||||
}
|
||||
|
||||
if (not is_degenerate_qrt) {
|
||||
if (! is_degenerate_qrt) {
|
||||
//CGAL_SDG_DEBUG(std::cout << "debug Side_of_bs rqt not monotone" << std::endl;);
|
||||
return predicate(r,q,t,p);
|
||||
}
|
||||
|
|
@ -70,21 +70,21 @@ namespace CGAL {
|
|||
Comparison_result cytr = compare_y_2(t,r);
|
||||
|
||||
// if t equals any one of p,q,r return zero
|
||||
if (((cxtp == EQUAL) and (cytp == EQUAL)) or
|
||||
((cxtq == EQUAL) and (cytq == EQUAL)) or
|
||||
((cxtr == EQUAL) and (cytr == EQUAL)) )
|
||||
if (((cxtp == EQUAL) && (cytp == EQUAL)) ||
|
||||
((cxtq == EQUAL) && (cytq == EQUAL)) ||
|
||||
((cxtr == EQUAL) && (cytr == EQUAL)) )
|
||||
{
|
||||
return ON_ORIENTED_BOUNDARY;
|
||||
}
|
||||
|
||||
// check if query point is inside any of the following
|
||||
// segments: pq, qr, rp
|
||||
if (((cxtp == EQUAL) and (cxtq == EQUAL) and (cytp != cytq))
|
||||
or ((cxtq == EQUAL) and (cxtr == EQUAL) and (cytq != cytr))
|
||||
or ((cxtr == EQUAL) and (cxtp == EQUAL) and (cytr != cytp))
|
||||
or ((cytp == EQUAL) and (cytq == EQUAL) and (cxtp != cxtq))
|
||||
or ((cytq == EQUAL) and (cytr == EQUAL) and (cxtq != cxtr))
|
||||
or ((cytr == EQUAL) and (cytp == EQUAL) and (cxtr != cxtp)))
|
||||
if (((cxtp == EQUAL) && (cxtq == EQUAL) && (cytp != cytq))
|
||||
|| ((cxtq == EQUAL) && (cxtr == EQUAL) && (cytq != cytr))
|
||||
|| ((cxtr == EQUAL) && (cxtp == EQUAL) && (cytr != cytp))
|
||||
|| ((cytp == EQUAL) && (cytq == EQUAL) && (cxtp != cxtq))
|
||||
|| ((cytq == EQUAL) && (cytr == EQUAL) && (cxtq != cxtr))
|
||||
|| ((cytr == EQUAL) && (cytp == EQUAL) && (cxtr != cxtp)))
|
||||
{
|
||||
CGAL_SDG_DEBUG(std::cout << "debug side_of_os query point in segment"
|
||||
<< std::endl;);
|
||||
|
|
@ -100,22 +100,22 @@ namespace CGAL {
|
|||
|
||||
if (bspqrt == ON_BOUNDARY) {
|
||||
|
||||
if ((cxtp != EQUAL) and (cytp != EQUAL)
|
||||
and (not (orientation_Linf(r,q,t)==DEGENERATE))) {
|
||||
if ((cxtp != EQUAL) && (cytp != EQUAL)
|
||||
&& (! (orientation_Linf(r,q,t)==DEGENERATE))) {
|
||||
// r q t p
|
||||
return (Oriented_side)
|
||||
(((int) orientation_Linf(r,q,t)) *
|
||||
((int) side_of_bounded_square_2(r,q,t,p)) ) ;
|
||||
}
|
||||
if ((cxtq != EQUAL) and (cytq != EQUAL)
|
||||
and (not (orientation_Linf(p,r,t)==DEGENERATE))) {
|
||||
if ((cxtq != EQUAL) && (cytq != EQUAL)
|
||||
&& (! (orientation_Linf(p,r,t)==DEGENERATE))) {
|
||||
// p r t q
|
||||
return (Oriented_side)
|
||||
(((int) orientation_Linf(p,r,t)) *
|
||||
((int) side_of_bounded_square_2(p,r,t,q)) ) ;
|
||||
}
|
||||
if ((cxtr != EQUAL) and (cytr != EQUAL)
|
||||
and (not (orientation_Linf(q,p,t)==DEGENERATE))) {
|
||||
if ((cxtr != EQUAL) && (cytr != EQUAL)
|
||||
&& (! (orientation_Linf(q,p,t)==DEGENERATE))) {
|
||||
// q p t r
|
||||
return (Oriented_side)
|
||||
(((int) orientation_Linf(q,p,t)) *
|
||||
|
|
|
|||
Loading…
Reference in New Issue