mirror of https://github.com/CGAL/cgal
Remove casts to Oriented_side.
They are useless since we merged the various enum types.
This commit is contained in:
parent
b740e90de0
commit
b0f2c77fdc
|
|
@ -615,7 +615,7 @@ protected:
|
||||||
if (csp== EQUAL) continue;
|
if (csp== EQUAL) continue;
|
||||||
Comparison_result csl= compare_c(s, pt[i], Coordinate_index(i));
|
Comparison_result csl= compare_c(s, pt[i], Coordinate_index(i));
|
||||||
if (csl== CGAL::EQUAL) return ON_ORIENTED_BOUNDARY;
|
if (csl== CGAL::EQUAL) return ON_ORIENTED_BOUNDARY;
|
||||||
else if (csl != csp) return Oriented_side(-os);
|
else if (csl != csp) return -os;
|
||||||
else return os;
|
else return os;
|
||||||
}
|
}
|
||||||
CGAL_error();
|
CGAL_error();
|
||||||
|
|
|
||||||
|
|
@ -458,11 +458,10 @@ side_of_oriented_circleC2(const FT &px, const FT &py,
|
||||||
const FT &rx, const FT &ry,
|
const FT &rx, const FT &ry,
|
||||||
const FT &tx, const FT &ty)
|
const FT &tx, const FT &ty)
|
||||||
{
|
{
|
||||||
// Oriented_side(
|
|
||||||
// sign_of_determinant(px, py, px*px + py*py, 1,
|
// sign_of_determinant(px, py, px*px + py*py, 1,
|
||||||
// qx, qy, qx*qx + qy*qy, 1,
|
// qx, qy, qx*qx + qy*qy, 1,
|
||||||
// rx, ry, rx*rx + ry*ry, 1,
|
// rx, ry, rx*rx + ry*ry, 1,
|
||||||
// tx, ty, tx*tx + ty*ty, 1));
|
// tx, ty, tx*tx + ty*ty, 1);
|
||||||
// We first translate so that p is the new origin.
|
// We first translate so that p is the new origin.
|
||||||
FT qpx = qx-px;
|
FT qpx = qx-px;
|
||||||
FT qpy = qy-py;
|
FT qpy = qy-py;
|
||||||
|
|
@ -475,7 +474,7 @@ side_of_oriented_circleC2(const FT &px, const FT &py,
|
||||||
// rpx, rpy, square(rpx) + square(rpy),
|
// rpx, rpy, square(rpx) + square(rpy),
|
||||||
// tpx, tpy, square(tpx) + square(tpy)));
|
// tpx, tpy, square(tpx) + square(tpy)));
|
||||||
return sign_of_determinant<FT>( qpx*tpy - qpy*tpx, tpx*(tx-qx) + tpy*(ty-qy),
|
return sign_of_determinant<FT>( qpx*tpy - qpy*tpx, tpx*(tx-qx) + tpy*(ty-qy),
|
||||||
qpx*rpy - qpy*rpx, rpx*(rx-qx) + rpy*(ry-qy));
|
qpx*rpy - qpy*rpx, rpx*(rx-qx) + rpy*(ry-qy));
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class FT >
|
template < class FT >
|
||||||
|
|
|
||||||
|
|
@ -4377,7 +4377,7 @@ namespace HomogeneousKernelFunctors {
|
||||||
ot = orientation(t.vertex(0), t.vertex(1), t.vertex(2));
|
ot = orientation(t.vertex(0), t.vertex(1), t.vertex(2));
|
||||||
|
|
||||||
if (o1 == ot && o2 == ot && o3 == ot) // ot cannot be COLLINEAR
|
if (o1 == ot && o2 == ot && o3 == ot) // ot cannot be COLLINEAR
|
||||||
return Oriented_side(ot);
|
return ot;
|
||||||
return
|
return
|
||||||
(o1 == COLLINEAR
|
(o1 == COLLINEAR
|
||||||
&& collinear_are_ordered_along_line(t.vertex(0), p, t.vertex(1))) ||
|
&& collinear_are_ordered_along_line(t.vertex(0), p, t.vertex(1))) ||
|
||||||
|
|
@ -4386,7 +4386,7 @@ namespace HomogeneousKernelFunctors {
|
||||||
(o3 == COLLINEAR
|
(o3 == COLLINEAR
|
||||||
&& collinear_are_ordered_along_line(t.vertex(2), p, t.vertex(3)))
|
&& collinear_are_ordered_along_line(t.vertex(2), p, t.vertex(3)))
|
||||||
? ON_ORIENTED_BOUNDARY
|
? ON_ORIENTED_BOUNDARY
|
||||||
: Oriented_side(-ot);
|
: -ot;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ side_of_plane_centered_sphere_translateC3(
|
||||||
rx,ry,rz);
|
rx,ry,rz);
|
||||||
CGAL_assertion(den != ZERO);
|
CGAL_assertion(den != ZERO);
|
||||||
|
|
||||||
return Oriented_side(den * num);
|
return den * num;
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class RT>
|
template < class RT>
|
||||||
|
|
@ -114,7 +114,7 @@ side_of_plane_centered_sphere_translateC3(
|
||||||
qx,qy,qz);
|
qx,qy,qz);
|
||||||
}
|
}
|
||||||
CGAL_assertion(den != ZERO);
|
CGAL_assertion(den != ZERO);
|
||||||
return Oriented_side(den * num);
|
return den * num;
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class RT>
|
template < class RT>
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ other.
|
||||||
|
|
||||||
\ccConstructor{template <class ForwardIterator>
|
\ccConstructor{template <class ForwardIterator>
|
||||||
Hyperplane_d<Kernel>(ForwardIterator first, ForwardIterator last,
|
Hyperplane_d<Kernel>(ForwardIterator first, ForwardIterator last,
|
||||||
Point_d<Kernel> o, Oriented_side side = Oriented_side(0))}{constructs
|
Point_d<Kernel> o, Oriented_side side = ON_ORIENTED_BOUNDARY)}{constructs
|
||||||
some hyperplane that passes through the points in \ccc{set
|
some hyperplane that passes through the points in \ccc{set
|
||||||
[first,last)}. If \ccc{side} is \ccc{ON_POSITIVE_SIDE} or
|
[first,last)}. If \ccc{side} is \ccc{ON_POSITIVE_SIDE} or
|
||||||
\ccc{ON_NEGATIVE_SIDE} then \ccc{o} is on that side of the
|
\ccc{ON_NEGATIVE_SIDE} then \ccc{o} is on that side of the
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ construct_from_points(ForwardIterator first, ForwardIterator last,
|
||||||
template <class ForwardIterator>
|
template <class ForwardIterator>
|
||||||
HyperplaneCd(ForwardIterator first, ForwardIterator last,
|
HyperplaneCd(ForwardIterator first, ForwardIterator last,
|
||||||
const PointCd<FT,LA>& o,
|
const PointCd<FT,LA>& o,
|
||||||
Oriented_side side = Oriented_side(0))
|
Oriented_side side = ON_ORIENTED_BOUNDARY)
|
||||||
: Base( Tuple(o.dimension()+1) )
|
: Base( Tuple(o.dimension()+1) )
|
||||||
{ construct_from_points(first,last,o,side); }
|
{ construct_from_points(first,last,o,side); }
|
||||||
|
|
||||||
|
|
@ -183,7 +183,7 @@ Oriented_side oriented_side(const PointCd<FT,LA>& p) const
|
||||||
{
|
{
|
||||||
CGAL_assertion_msg(dimension()==p.dimension(),
|
CGAL_assertion_msg(dimension()==p.dimension(),
|
||||||
"HyperplaneCd::oriented_side: dimensions do not agree.");
|
"HyperplaneCd::oriented_side: dimensions do not agree.");
|
||||||
return Oriented_side(CGAL_NTS sign(value_at(p)));
|
return CGAL_NTS sign(value_at(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool has_on(const PointCd<FT,LA>& p) const
|
bool has_on(const PointCd<FT,LA>& p) const
|
||||||
|
|
|
||||||
|
|
@ -180,7 +180,7 @@ construct_from_points(ForwardIterator first, ForwardIterator last,
|
||||||
template <class ForwardIterator>
|
template <class ForwardIterator>
|
||||||
HyperplaneHd(ForwardIterator first, ForwardIterator last,
|
HyperplaneHd(ForwardIterator first, ForwardIterator last,
|
||||||
const PointHd<RT,LA>& o,
|
const PointHd<RT,LA>& o,
|
||||||
Oriented_side side = Oriented_side(0))
|
Oriented_side side = ON_ORIENTED_BOUNDARY)
|
||||||
/*{\Mcreate constructs some hyperplane that passes through the points
|
/*{\Mcreate constructs some hyperplane that passes through the points
|
||||||
in |set [first,last)|. If |side| is |ON_POSITIVE_SIDE| or
|
in |set [first,last)|. If |side| is |ON_POSITIVE_SIDE| or
|
||||||
|ON_NEGATIVE_SIDE| then |o| is on that side of the constructed
|
|ON_NEGATIVE_SIDE| then |o| is on that side of the constructed
|
||||||
|
|
@ -279,7 +279,7 @@ Oriented_side oriented_side(const PointHd<RT,LA>& p) const
|
||||||
{
|
{
|
||||||
CGAL_assertion_msg((dimension()==p.dimension()),
|
CGAL_assertion_msg((dimension()==p.dimension()),
|
||||||
"HyperplaneHd::oriented_side: dimensions do not agree.");
|
"HyperplaneHd::oriented_side: dimensions do not agree.");
|
||||||
return Oriented_side(CGAL_NTS sign(value_at(p)));
|
return CGAL_NTS sign(value_at(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool has_on(const PointHd<RT,LA>& p) const
|
bool has_on(const PointHd<RT,LA>& p) const
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Michael Seel
|
// Author(s) : Michael Seel
|
||||||
|
|
||||||
#ifndef CGAL_HYPERPLANE_D_H
|
#ifndef CGAL_HYPERPLANE_D_H
|
||||||
#define CGAL_HYPERPLANE_D_H
|
#define CGAL_HYPERPLANE_D_H
|
||||||
|
|
||||||
|
|
@ -27,7 +28,8 @@ CGAL_BEGIN_NAMESPACE
|
||||||
|
|
||||||
template <class pR>
|
template <class pR>
|
||||||
class Hyperplane_d : public pR::Hyperplane_d_base
|
class Hyperplane_d : public pR::Hyperplane_d_base
|
||||||
{ public:
|
{
|
||||||
|
public:
|
||||||
typedef typename pR::Hyperplane_d_base Base;
|
typedef typename pR::Hyperplane_d_base Base;
|
||||||
typedef Hyperplane_d<pR> Self;
|
typedef Hyperplane_d<pR> Self;
|
||||||
typedef pR R;
|
typedef pR R;
|
||||||
|
|
@ -60,8 +62,8 @@ class Hyperplane_d : public pR::Hyperplane_d_base
|
||||||
|
|
||||||
template <class ForwardIterator>
|
template <class ForwardIterator>
|
||||||
Hyperplane_d(ForwardIterator first, ForwardIterator last,
|
Hyperplane_d(ForwardIterator first, ForwardIterator last,
|
||||||
const Point_d<R>& o, Oriented_side side = Oriented_side(0)) :
|
const Point_d<R>& o, Oriented_side side = ON_ORIENTED_BOUNDARY)
|
||||||
Base(first,last,o,side) {}
|
: Base(first,last,o,side) {}
|
||||||
|
|
||||||
Vector_d<R> orthogonal_vector() const
|
Vector_d<R> orthogonal_vector() const
|
||||||
{ return Base::orthogonal_vector(); }
|
{ return Base::orthogonal_vector(); }
|
||||||
|
|
@ -75,4 +77,5 @@ class Hyperplane_d : public pR::Hyperplane_d_base
|
||||||
};
|
};
|
||||||
|
|
||||||
CGAL_END_NAMESPACE
|
CGAL_END_NAMESPACE
|
||||||
|
|
||||||
#endif //CGAL_HYPERPLANE_D_H
|
#endif //CGAL_HYPERPLANE_D_H
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@ Oriented_side operator()(ForwardIterator first, ForwardIterator last,
|
||||||
M(d,j + 1) = hj; Sum += hj*hj;
|
M(d,j + 1) = hj; Sum += hj*hj;
|
||||||
}
|
}
|
||||||
M(d,d) = Sum;
|
M(d,d) = Sum;
|
||||||
return Oriented_side( - LA::sign_of_determinant(M) );
|
return - LA::sign_of_determinant(M);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -239,7 +239,7 @@ Oriented_side operator()(ForwardIterator first, ForwardIterator last,
|
||||||
Sum += hj*hj;
|
Sum += hj*hj;
|
||||||
}
|
}
|
||||||
M(d,d) = Sum;
|
M(d,d) = Sum;
|
||||||
return Oriented_side( - LA::sign_of_determinant(M) );
|
return - LA::sign_of_determinant(M);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,7 @@ Oriented_side operator()(ForwardIterator first, ForwardIterator last,
|
||||||
M(d,j + 1) = hj; Sum += hj*hj;
|
M(d,j + 1) = hj; Sum += hj*hj;
|
||||||
}
|
}
|
||||||
M(d,d) = Sum;
|
M(d,d) = Sum;
|
||||||
return Oriented_side( - LA::sign_of_determinant(M) );
|
return - LA::sign_of_determinant(M);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -311,7 +311,7 @@ Oriented_side operator()(ForwardIterator first, ForwardIterator last,
|
||||||
Sum += hj*hj;
|
Sum += hj*hj;
|
||||||
}
|
}
|
||||||
M(d,d) = Sum;
|
M(d,d) = Sum;
|
||||||
return Oriented_side( - LA::sign_of_determinant(M) );
|
return - LA::sign_of_determinant(M);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1377,13 +1377,13 @@ side_of_oriented_sphere(const Point &p0, const Point &p1, const Point &p2,
|
||||||
// and positively oriented
|
// and positively oriented
|
||||||
Orientation o;
|
Orientation o;
|
||||||
if (points[i] == &p3 && (o = orientation(p0,p1,p2,p)) != COPLANAR )
|
if (points[i] == &p3 && (o = orientation(p0,p1,p2,p)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
if (points[i] == &p2 && (o = orientation(p0,p1,p,p3)) != COPLANAR )
|
if (points[i] == &p2 && (o = orientation(p0,p1,p,p3)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
if (points[i] == &p1 && (o = orientation(p0,p,p2,p3)) != COPLANAR )
|
if (points[i] == &p1 && (o = orientation(p0,p,p2,p3)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
if (points[i] == &p0 && (o = orientation(p,p1,p2,p3)) != COPLANAR )
|
if (points[i] == &p0 && (o = orientation(p,p1,p2,p3)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGAL_triangulation_assertion(false);
|
CGAL_triangulation_assertion(false);
|
||||||
|
|
|
||||||
|
|
@ -636,7 +636,7 @@ power_test(const Face_handle &f, const Weighted_point &p) const
|
||||||
return power_test(f->vertex(ccw(i))->point(),
|
return power_test(f->vertex(ccw(i))->point(),
|
||||||
f->vertex( cw(i))->point(),p);
|
f->vertex( cw(i))->point(),p);
|
||||||
|
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class Gt, class Tds >
|
template < class Gt, class Tds >
|
||||||
|
|
|
||||||
|
|
@ -76,10 +76,10 @@ power_testH2( const RT &phx, const RT &phy, const RT &phw, const RT &pwt,
|
||||||
RT dthw = CGAL_NTS square(thw);
|
RT dthw = CGAL_NTS square(thw);
|
||||||
RT dtz = CGAL_NTS square(thx) + CGAL_NTS square(thy) - twt*dthw;
|
RT dtz = CGAL_NTS square(thx) + CGAL_NTS square(thy) - twt*dthw;
|
||||||
|
|
||||||
return Oriented_side(sign_of_determinant(dphx, dphy, dpz, dphw,
|
return sign_of_determinant(dphx, dphy, dpz, dphw,
|
||||||
dqhx, dqhy, dqz, dqhw,
|
dqhx, dqhy, dqz, dqhw,
|
||||||
drhx, drhy, drz, drhw,
|
drhx, drhy, drz, drhw,
|
||||||
dthx, dthy, dtz, dthw));
|
dthx, dthy, dtz, dthw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -115,10 +115,9 @@ power_testH2( const RT &phx, const RT &phy, const RT &phw, const RT &pwt,
|
||||||
RT dthw = CGAL_NTS square(thw);
|
RT dthw = CGAL_NTS square(thw);
|
||||||
RT dtz = CGAL_NTS square(thx) + CGAL_NTS square(thy) - twt*dthw;
|
RT dtz = CGAL_NTS square(thx) + CGAL_NTS square(thy) - twt*dthw;
|
||||||
|
|
||||||
return Oriented_side(CGAL_NTS compare(pa, qa) *
|
return CGAL_NTS compare(pa, qa) * sign_of_determinant(pa, dpz, dphw,
|
||||||
sign_of_determinant(pa, dpz, dphw,
|
qa, dqz, dqhw,
|
||||||
qa, dqz, dqhw,
|
ta, dtz, dthw);
|
||||||
ta, dtz, dthw));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CGAL_END_NAMESPACE
|
CGAL_END_NAMESPACE
|
||||||
|
|
|
||||||
|
|
@ -1056,13 +1056,13 @@ side_of_oriented_sphere(const Point &p0, const Point &p1, const Point &p2,
|
||||||
// and positively oriented
|
// and positively oriented
|
||||||
Orientation o;
|
Orientation o;
|
||||||
if (points[i] == &p3 && (o = orientation(p0,p1,p2,p)) != COPLANAR )
|
if (points[i] == &p3 && (o = orientation(p0,p1,p2,p)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
if (points[i] == &p2 && (o = orientation(p0,p1,p,p3)) != COPLANAR )
|
if (points[i] == &p2 && (o = orientation(p0,p1,p,p3)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
if (points[i] == &p1 && (o = orientation(p0,p,p2,p3)) != COPLANAR )
|
if (points[i] == &p1 && (o = orientation(p0,p,p2,p3)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
if (points[i] == &p0 && (o = orientation(p,p1,p2,p3)) != COPLANAR )
|
if (points[i] == &p0 && (o = orientation(p,p1,p2,p3)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGAL_triangulation_assertion(false);
|
CGAL_triangulation_assertion(false);
|
||||||
|
|
|
||||||
|
|
@ -910,13 +910,13 @@ side_of_oriented_power_sphere(const Weighted_point &p0,
|
||||||
// and positively oriented
|
// and positively oriented
|
||||||
Orientation o;
|
Orientation o;
|
||||||
if (points[i] == &p3 && (o = orientation(p0,p1,p2,p)) != COPLANAR )
|
if (points[i] == &p3 && (o = orientation(p0,p1,p2,p)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
if (points[i] == &p2 && (o = orientation(p0,p1,p,p3)) != COPLANAR )
|
if (points[i] == &p2 && (o = orientation(p0,p1,p,p3)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
if (points[i] == &p1 && (o = orientation(p0,p,p2,p3)) != COPLANAR )
|
if (points[i] == &p1 && (o = orientation(p0,p,p2,p3)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
if (points[i] == &p0 && (o = orientation(p,p1,p2,p3)) != COPLANAR )
|
if (points[i] == &p0 && (o = orientation(p,p1,p2,p3)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGAL_triangulation_assertion(false);
|
CGAL_triangulation_assertion(false);
|
||||||
|
|
@ -1021,11 +1021,11 @@ side_of_oriented_power_circle(const Weighted_point &p0,
|
||||||
// and positively oriented
|
// and positively oriented
|
||||||
Orientation o;
|
Orientation o;
|
||||||
if (points[i] == &p2 && (o = coplanar_orientation(p0,p1,p)) != COPLANAR )
|
if (points[i] == &p2 && (o = coplanar_orientation(p0,p1,p)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
if (points[i] == &p1 && (o = coplanar_orientation(p0,p,p2)) != COPLANAR )
|
if (points[i] == &p1 && (o = coplanar_orientation(p0,p,p2)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
if (points[i] == &p0 && (o = coplanar_orientation(p,p1,p2)) != COPLANAR )
|
if (points[i] == &p0 && (o = coplanar_orientation(p,p1,p2)) != COPLANAR )
|
||||||
return Oriented_side(o);
|
return o;
|
||||||
}
|
}
|
||||||
|
|
||||||
CGAL_triangulation_assertion(false);
|
CGAL_triangulation_assertion(false);
|
||||||
|
|
|
||||||
|
|
@ -57,10 +57,10 @@ power_testC3( const FT &px, const FT &py, const FT &pz, const FT &pwt,
|
||||||
FT dst = CGAL_NTS square(dsx) + CGAL_NTS square(dsy) +
|
FT dst = CGAL_NTS square(dsx) + CGAL_NTS square(dsy) +
|
||||||
CGAL_NTS square(dsz) - swt + twt;
|
CGAL_NTS square(dsz) - swt + twt;
|
||||||
|
|
||||||
return Oriented_side( - sign_of_determinant(dpx, dpy, dpz, dpt,
|
return - sign_of_determinant(dpx, dpy, dpz, dpt,
|
||||||
dqx, dqy, dqz, dqt,
|
dqx, dqy, dqz, dqt,
|
||||||
drx, dry, drz, drt,
|
drx, dry, drz, drt,
|
||||||
dsx, dsy, dsz, dst));
|
dsx, dsy, dsz, dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -94,23 +94,23 @@ power_testC3( const FT &px, const FT &py, const FT &pz, const FT &pwt,
|
||||||
dqx, dqy, dqt,
|
dqx, dqy, dqt,
|
||||||
drx, dry, drt);
|
drx, dry, drt);
|
||||||
if (cmp != ZERO)
|
if (cmp != ZERO)
|
||||||
return Oriented_side(cmp * sign_of_determinant(px-rx, py-ry,
|
return cmp * sign_of_determinant(px-rx, py-ry,
|
||||||
qx-rx, qy-ry));
|
qx-rx, qy-ry);
|
||||||
|
|
||||||
// Projection on the (xz) plane.
|
// Projection on the (xz) plane.
|
||||||
cmp = sign_of_determinant(dpx, dpz, dpt,
|
cmp = sign_of_determinant(dpx, dpz, dpt,
|
||||||
dqx, dqz, dqt,
|
dqx, dqz, dqt,
|
||||||
drx, drz, drt);
|
drx, drz, drt);
|
||||||
if (cmp != ZERO)
|
if (cmp != ZERO)
|
||||||
return Oriented_side(cmp * sign_of_determinant(px-rx, pz-rz,
|
return cmp * sign_of_determinant(px-rx, pz-rz,
|
||||||
qx-rx, qz-rz));
|
qx-rx, qz-rz);
|
||||||
|
|
||||||
// Projection on the (yz) plane.
|
// Projection on the (yz) plane.
|
||||||
cmp = sign_of_determinant(dpy, dpz, dpt,
|
cmp = sign_of_determinant(dpy, dpz, dpt,
|
||||||
dqy, dqz, dqt,
|
dqy, dqz, dqt,
|
||||||
dry, drz, drt);
|
dry, drz, drt);
|
||||||
return Oriented_side(cmp * sign_of_determinant(py-ry, pz-rz,
|
return cmp * sign_of_determinant(py-ry, pz-rz,
|
||||||
qy-ry, qz-rz));
|
qy-ry, qz-rz);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -136,26 +136,25 @@ power_testC3( const FT &px, const FT &py, const FT &pz, const FT &pwt,
|
||||||
// We do an orthogonal projection on the (x) axis, if possible.
|
// We do an orthogonal projection on the (x) axis, if possible.
|
||||||
cmp = CGAL_NTS compare(px, qx);
|
cmp = CGAL_NTS compare(px, qx);
|
||||||
if (cmp != EQUAL)
|
if (cmp != EQUAL)
|
||||||
return Oriented_side(cmp * sign_of_determinant(dpx, dpt, dqx, dqt));
|
return cmp * sign_of_determinant(dpx, dpt, dqx, dqt);
|
||||||
|
|
||||||
// We do an orthogonal projection on the (y) axis, if possible.
|
// We do an orthogonal projection on the (y) axis, if possible.
|
||||||
cmp = CGAL_NTS compare(py, qy);
|
cmp = CGAL_NTS compare(py, qy);
|
||||||
if (cmp != EQUAL)
|
if (cmp != EQUAL)
|
||||||
return Oriented_side(cmp * sign_of_determinant(dpy, dpt, dqy, dqt));
|
return cmp * sign_of_determinant(dpy, dpt, dqy, dqt);
|
||||||
|
|
||||||
// We do an orthogonal projection on the (z) axis.
|
// We do an orthogonal projection on the (z) axis.
|
||||||
cmp = CGAL_NTS compare(pz, qz);
|
cmp = CGAL_NTS compare(pz, qz);
|
||||||
return Oriented_side(cmp * sign_of_determinant(dpz, dpt, dqz, dqt));
|
return cmp * sign_of_determinant(dpz, dpt, dqz, dqt);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class FT>
|
template <class FT>
|
||||||
Oriented_side
|
Oriented_side
|
||||||
power_testC3(const FT &pwt, const FT &qwt)
|
power_testC3(const FT &pwt, const FT &qwt)
|
||||||
{
|
{
|
||||||
return Oriented_side((Comparison_result) CGAL_NTS compare(qwt, pwt));
|
return CGAL_NTS compare(qwt, pwt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CGAL_END_NAMESPACE
|
CGAL_END_NAMESPACE
|
||||||
|
|
||||||
#endif // CGAL_REGULAR_TRIANGULATION_FTC3_H
|
#endif // CGAL_REGULAR_TRIANGULATION_FTC3_H
|
||||||
|
|
|
||||||
|
|
@ -71,11 +71,11 @@ power_testH3(
|
||||||
RT dtz = CGAL_NTS square(thx) + CGAL_NTS square(thy) +
|
RT dtz = CGAL_NTS square(thx) + CGAL_NTS square(thy) +
|
||||||
CGAL_NTS square(thz) - twt*dthw;
|
CGAL_NTS square(thz) - twt*dthw;
|
||||||
|
|
||||||
return Oriented_side(- sign_of_determinant(dphx, dphy, dphz, dpz, dphw,
|
return - sign_of_determinant(dphx, dphy, dphz, dpz, dphw,
|
||||||
dqhx, dqhy, dqhz, dqz, dqhw,
|
dqhx, dqhy, dqhz, dqz, dqhw,
|
||||||
drhx, drhy, drhz, drz, drhw,
|
drhx, drhy, drhz, drz, drhw,
|
||||||
dshx, dshy, dshz, dsz, dshw,
|
dshx, dshy, dshz, dsz, dshw,
|
||||||
dthx, dthy, dthz, dtz, dthw));
|
dthx, dthy, dthz, dtz, dthw);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The 2 degenerate are not speed critical, and they are quite boring and error
|
// The 2 degenerate are not speed critical, and they are quite boring and error
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue