mirror of https://github.com/CGAL/cgal
Rename the following functions:
sign_of_determinant2x2 sign_of_determinant3x3 sign_of_determinant4x4 sign_of_determinant5x5 sign_of_determinant6x6 to: sign_of_determinant So that we have less dimension-dependent namings, at least internally...
This commit is contained in:
parent
93284571db
commit
b740e90de0
|
|
@ -64,23 +64,23 @@ public:
|
||||||
|
|
||||||
|
|
||||||
Orientation o = chi2(l1, l2, tag);
|
Orientation o = chi2(l1, l2, tag);
|
||||||
//sign_of_determinant2x2(a1, b1, a2, b2);
|
//sign_of_determinant(a1, b1, a2, b2);
|
||||||
|
|
||||||
|
|
||||||
if ( o == COLLINEAR ) {
|
if ( o == COLLINEAR ) {
|
||||||
Bitangent_line l2_rot = l2.get_rot90();
|
Bitangent_line l2_rot = l2.get_rot90();
|
||||||
Sign dot = chi2(l1, l2_rot, tag);
|
Sign dot = chi2(l1, l2_rot, tag);
|
||||||
//sign_of_determinant2x2(a1, b1, -b2, a2);
|
//sign_of_determinant(a1, b1, -b2, a2);
|
||||||
|
|
||||||
CGAL_assertion( dot != ZERO );
|
CGAL_assertion( dot != ZERO );
|
||||||
Orientation o1 = chi2(l1, l3, tag);
|
Orientation o1 = chi2(l1, l3, tag);
|
||||||
//sign_of_determinant2x2(a1, b1, a3, b3);
|
//sign_of_determinant(a1, b1, a3, b3);
|
||||||
|
|
||||||
if ( dot == POSITIVE ) {
|
if ( dot == POSITIVE ) {
|
||||||
if ( o1 != COLLINEAR ) { return ON_UNBOUNDED_SIDE; }
|
if ( o1 != COLLINEAR ) { return ON_UNBOUNDED_SIDE; }
|
||||||
Bitangent_line l3_rot = l3.get_rot90();
|
Bitangent_line l3_rot = l3.get_rot90();
|
||||||
Sign dot1 = chi2(l1, l3_rot, tag);
|
Sign dot1 = chi2(l1, l3_rot, tag);
|
||||||
//sign_of_determinant2x2(a1, b1, -b3, a3);
|
//sign_of_determinant(a1, b1, -b3, a3);
|
||||||
|
|
||||||
CGAL_assertion( dot1 != ZERO );
|
CGAL_assertion( dot1 != ZERO );
|
||||||
return ( dot1 == POSITIVE ) ? ON_BOUNDARY : ON_UNBOUNDED_SIDE;
|
return ( dot1 == POSITIVE ) ? ON_BOUNDARY : ON_UNBOUNDED_SIDE;
|
||||||
|
|
@ -90,9 +90,9 @@ public:
|
||||||
return ( o1 == COLLINEAR ) ? ON_BOUNDARY : ON_UNBOUNDED_SIDE;
|
return ( o1 == COLLINEAR ) ? ON_BOUNDARY : ON_UNBOUNDED_SIDE;
|
||||||
} else if ( o == LEFT_TURN ) {
|
} else if ( o == LEFT_TURN ) {
|
||||||
Orientation o1 = chi2(l1, l3, tag);
|
Orientation o1 = chi2(l1, l3, tag);
|
||||||
//sign_of_determinant2x2(a1, b1, a3, b3);
|
//sign_of_determinant(a1, b1, a3, b3);
|
||||||
Orientation o2 = chi2(l2, l3, tag);
|
Orientation o2 = chi2(l2, l3, tag);
|
||||||
//sign_of_determinant2x2(a2, b2, a3, b3);
|
//sign_of_determinant(a2, b2, a3, b3);
|
||||||
|
|
||||||
// std::cout << "orientation(l1, l3): " << int(o1) << std::endl;
|
// std::cout << "orientation(l1, l3): " << int(o1) << std::endl;
|
||||||
// std::cout << "orientation(l2, l3): " << int(o2) << std::endl;
|
// std::cout << "orientation(l2, l3): " << int(o2) << std::endl;
|
||||||
|
|
@ -107,9 +107,9 @@ public:
|
||||||
return ON_UNBOUNDED_SIDE;
|
return ON_UNBOUNDED_SIDE;
|
||||||
}
|
}
|
||||||
Orientation o1 = chi2(l1, l3, tag);
|
Orientation o1 = chi2(l1, l3, tag);
|
||||||
//sign_of_determinant2x2(a1, b1, a3, b3);
|
//sign_of_determinant(a1, b1, a3, b3);
|
||||||
Orientation o2 = chi2(l2, l3, tag);
|
Orientation o2 = chi2(l2, l3, tag);
|
||||||
//sign_of_determinant2x2(a2, b2, a3, b3);
|
//sign_of_determinant(a2, b2, a3, b3);
|
||||||
|
|
||||||
// std::cout << "orientation(l1, l3): " << int(o1) << std::endl;
|
// std::cout << "orientation(l1, l3): " << int(o1) << std::endl;
|
||||||
// std::cout << "orientation(l2, l3): " << int(o2) << std::endl;
|
// std::cout << "orientation(l2, l3): " << int(o2) << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ protected:
|
||||||
const Inverted_weighted_point &p2,
|
const Inverted_weighted_point &p2,
|
||||||
const Inverted_weighted_point &p3) const
|
const Inverted_weighted_point &p3) const
|
||||||
{
|
{
|
||||||
return sign_of_determinant3x3( p1.p(), p2.p(), p3.p(),
|
return sign_of_determinant( p1.p(), p2.p(), p3.p(),
|
||||||
p1.x(), p2.x(), p3.x(),
|
p1.x(), p2.x(), p3.x(),
|
||||||
p1.y(), p2.y(), p3.y() );
|
p1.y(), p2.y(), p3.y() );
|
||||||
}
|
}
|
||||||
|
|
@ -119,15 +119,15 @@ protected:
|
||||||
CGAL_assertion(i == -1 || i == 1 || i == 2 || i == 3);
|
CGAL_assertion(i == -1 || i == 1 || i == 2 || i == 3);
|
||||||
Sign s;
|
Sign s;
|
||||||
|
|
||||||
Sign s_xTest = sign_of_determinant2x2(p2.p(), p2.x(), p1.p(), p1.x());
|
Sign s_xTest = sign_of_determinant(p2.p(), p2.x(), p1.p(), p1.x());
|
||||||
if ( s_xTest != ZERO ) {
|
if ( s_xTest != ZERO ) {
|
||||||
s = s_xTest *
|
s = s_xTest *
|
||||||
sign_of_determinant3x3( p1.p(), p1.x(), p1.weight(),
|
sign_of_determinant( p1.p(), p1.x(), p1.weight(),
|
||||||
p2.p(), p2.x(), p2.weight(),
|
p2.p(), p2.x(), p2.weight(),
|
||||||
p3.p(), p3.x(), p3.weight() );
|
p3.p(), p3.x(), p3.weight() );
|
||||||
} else {
|
} else {
|
||||||
s = sign_determinant2x2( p2.p(), p2.y(), p1.p(), p1.y() ) *
|
s = sign_determinant2x2( p2.p(), p2.y(), p1.p(), p1.y() ) *
|
||||||
sign_of_determinant3x3( p1.p(), p1.y(), p1.weight(),
|
sign_of_determinant( p1.p(), p1.y(), p1.weight(),
|
||||||
p2.p(), p2.y(), p2.weight(),
|
p2.p(), p2.y(), p2.weight(),
|
||||||
p3.p(), p3.y(), p3.weight() );
|
p3.p(), p3.y(), p3.weight() );
|
||||||
}
|
}
|
||||||
|
|
@ -165,9 +165,9 @@ protected:
|
||||||
Sign ordered_on_line_test(const Inverted_weighted_point &p1,
|
Sign ordered_on_line_test(const Inverted_weighted_point &p1,
|
||||||
const Inverted_weighted_point &p2) const
|
const Inverted_weighted_point &p2) const
|
||||||
{
|
{
|
||||||
Sign s_det = sign_of_determinant2x2( p1.p(), p1.x(), p2.p(), p2.x() );
|
Sign s_det = sign_of_determinant( p1.p(), p1.x(), p2.p(), p2.x() );
|
||||||
if ( s_det != ZERO ) { return s_det; }
|
if ( s_det != ZERO ) { return s_det; }
|
||||||
return sign_of_determinant2x2( p1.p(), p1.y(), p2.p(), p2.y() );
|
return sign_of_determinant( p1.p(), p1.y(), p2.p(), p2.y() );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ordered_on_line(const Inverted_weighted_point &p1,
|
bool ordered_on_line(const Inverted_weighted_point &p1,
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ friend class Scaling_repC2<R>;
|
||||||
|
|
||||||
bool is_even() const
|
bool is_even() const
|
||||||
{
|
{
|
||||||
return sign_of_determinant2x2(t11, t12, t21, t22) == POSITIVE;
|
return sign_of_determinant(t11, t12, t21, t22) == POSITIVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
FT cartesian(int i, int j) const
|
FT cartesian(int i, int j) const
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ public:
|
||||||
|
|
||||||
virtual bool is_even() const
|
virtual bool is_even() const
|
||||||
{
|
{
|
||||||
return sign_of_determinant3x3(t11, t12, t13,
|
return sign_of_determinant(t11, t12, t13,
|
||||||
t21, t22, t23,
|
t21, t22, t23,
|
||||||
t31, t32, t33) == POSITIVE;
|
t31, t32, t33) == POSITIVE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ typename Equal_to<FT>::result_type
|
||||||
parallelC2(const FT &l1a, const FT &l1b,
|
parallelC2(const FT &l1a, const FT &l1b,
|
||||||
const FT &l2a, const FT &l2b)
|
const FT &l2a, const FT &l2b)
|
||||||
{
|
{
|
||||||
return sign_of_determinant2x2(l1a, l1b, l2a, l2b) == ZERO;
|
return sign_of_determinant(l1a, l1b, l2a, l2b) == ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class FT >
|
template < class FT >
|
||||||
|
|
@ -47,7 +47,7 @@ parallelC2(const FT &s1sx, const FT &s1sy,
|
||||||
const FT &s2sx, const FT &s2sy,
|
const FT &s2sx, const FT &s2sy,
|
||||||
const FT &s2tx, const FT &s2ty)
|
const FT &s2tx, const FT &s2ty)
|
||||||
{
|
{
|
||||||
return sign_of_determinant2x2(s1tx - s1sx, s1ty - s1sy,
|
return sign_of_determinant(s1tx - s1sx, s1ty - s1sy,
|
||||||
s2tx - s2sx, s2ty - s2sy) == ZERO;
|
s2tx - s2sx, s2ty - s2sy) == ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -57,14 +57,14 @@ typename Equal_to<FT>::result_type
|
||||||
equal_lineC2(const FT &l1a, const FT &l1b, const FT &l1c,
|
equal_lineC2(const FT &l1a, const FT &l1b, const FT &l1c,
|
||||||
const FT &l2a, const FT &l2b, const FT &l2c)
|
const FT &l2a, const FT &l2b, const FT &l2c)
|
||||||
{
|
{
|
||||||
if (sign_of_determinant2x2(l1a, l1b, l2a, l2b) != ZERO)
|
if (sign_of_determinant(l1a, l1b, l2a, l2b) != ZERO)
|
||||||
return false; // Not parallel.
|
return false; // Not parallel.
|
||||||
typename Sgn<FT>::result_type s1a = CGAL_NTS sign(l1a);
|
typename Sgn<FT>::result_type s1a = CGAL_NTS sign(l1a);
|
||||||
if (s1a != ZERO)
|
if (s1a != ZERO)
|
||||||
return s1a == CGAL_NTS sign(l2a)
|
return s1a == CGAL_NTS sign(l2a)
|
||||||
&& sign_of_determinant2x2(l1a, l1c, l2a, l2c) == ZERO;
|
&& sign_of_determinant(l1a, l1c, l2a, l2c) == ZERO;
|
||||||
return CGAL_NTS sign(l1b) == CGAL_NTS sign(l2b)
|
return CGAL_NTS sign(l1b) == CGAL_NTS sign(l2b)
|
||||||
&& sign_of_determinant2x2(l1b, l1c, l2b, l2c) == ZERO;
|
&& sign_of_determinant(l1b, l1c, l2b, l2c) == ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class FT >
|
template < class FT >
|
||||||
|
|
@ -96,7 +96,7 @@ compare_xC2(const FT &la, const FT &lb, const FT &lc,
|
||||||
FT den2 = det2x2_by_formula( la, lb, h2a, h2b);
|
FT den2 = det2x2_by_formula( la, lb, h2a, h2b);
|
||||||
Sign s = Sign (CGAL_NTS sign(den1) * CGAL_NTS sign(den2));
|
Sign s = Sign (CGAL_NTS sign(den1) * CGAL_NTS sign(den2));
|
||||||
CGAL_kernel_assertion( s != ZERO );
|
CGAL_kernel_assertion( s != ZERO );
|
||||||
return Comparison_result( s * sign_of_determinant2x2(num1,
|
return Comparison_result( s * sign_of_determinant(num1,
|
||||||
num2, den1, den2));
|
num2, den1, den2));
|
||||||
*/
|
*/
|
||||||
FT num1 = det2x2_by_formula( la, lc, h1a, h1c);
|
FT num1 = det2x2_by_formula( la, lc, h1a, h1c);
|
||||||
|
|
@ -125,7 +125,7 @@ compare_xC2(const FT &l1a, const FT &l1b, const FT &l1c,
|
||||||
FT den2 = det2x2_by_formula( l2a, l2b, h2a, h2b);
|
FT den2 = det2x2_by_formula( l2a, l2b, h2a, h2b);
|
||||||
typename Sgn<FT>::result_type s = CGAL_NTS sign(den1) * CGAL_NTS sign(den2);
|
typename Sgn<FT>::result_type s = CGAL_NTS sign(den1) * CGAL_NTS sign(den2);
|
||||||
CGAL_kernel_assertion( s != ZERO );
|
CGAL_kernel_assertion( s != ZERO );
|
||||||
return s * sign_of_determinant2x2(num1, num2, den1, den2);
|
return s * sign_of_determinant(num1, num2, den1, den2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class FT >
|
template < class FT >
|
||||||
|
|
@ -148,7 +148,7 @@ compare_y_at_xC2(const FT &px,
|
||||||
{
|
{
|
||||||
typename Sgn<FT>::result_type s = CGAL_NTS sign(l1b) * CGAL_NTS sign(l2b);
|
typename Sgn<FT>::result_type s = CGAL_NTS sign(l1b) * CGAL_NTS sign(l2b);
|
||||||
CGAL_kernel_assertion( s != ZERO );
|
CGAL_kernel_assertion( s != ZERO );
|
||||||
return s * sign_of_determinant2x2<FT>(l2a*px+l2c, l2b,
|
return s * sign_of_determinant<FT>(l2a*px+l2c, l2b,
|
||||||
l1a*px+l1c, l1b);
|
l1a*px+l1c, l1b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -160,9 +160,9 @@ compare_y_at_xC2(const FT &l1a, const FT &l1b, const FT &l1c,
|
||||||
const FT &ha, const FT &hb, const FT &hc)
|
const FT &ha, const FT &hb, const FT &hc)
|
||||||
{
|
{
|
||||||
typename Sgn<FT>::result_type s = CGAL_NTS sign(hb) *
|
typename Sgn<FT>::result_type s = CGAL_NTS sign(hb) *
|
||||||
sign_of_determinant2x2(l1a, l1b, l2a, l2b);
|
sign_of_determinant(l1a, l1b, l2a, l2b);
|
||||||
CGAL_kernel_assertion( s != ZERO );
|
CGAL_kernel_assertion( s != ZERO );
|
||||||
return s * sign_of_determinant3x3(l1a, l1b, l1c,
|
return s * sign_of_determinant(l1a, l1b, l1c,
|
||||||
l2a, l2b, l2c,
|
l2a, l2b, l2c,
|
||||||
ha, hb, hc);
|
ha, hb, hc);
|
||||||
}
|
}
|
||||||
|
|
@ -182,7 +182,7 @@ compare_y_at_xC2(const FT &l1a, const FT &l1b, const FT &l1c,
|
||||||
CGAL_NTS sign(h2b) *
|
CGAL_NTS sign(h2b) *
|
||||||
CGAL_NTS sign(den);
|
CGAL_NTS sign(den);
|
||||||
CGAL_kernel_assertion( s != ZERO );
|
CGAL_kernel_assertion( s != ZERO );
|
||||||
return s * sign_of_determinant2x2<FT>(h2a*num+h2c*den, h2b,
|
return s * sign_of_determinant<FT>(h2a*num+h2c*den, h2b,
|
||||||
h1a*num+h1c*den, h1b);
|
h1a*num+h1c*den, h1b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -266,7 +266,7 @@ equal_directionC2(const FT &dx1, const FT &dy1,
|
||||||
{
|
{
|
||||||
return CGAL_NTS sign(dx1) == CGAL_NTS sign(dx2)
|
return CGAL_NTS sign(dx1) == CGAL_NTS sign(dx2)
|
||||||
&& CGAL_NTS sign(dy1) == CGAL_NTS sign(dy2)
|
&& CGAL_NTS sign(dy1) == CGAL_NTS sign(dy2)
|
||||||
&& sign_of_determinant2x2(dx1, dy1, dx2, dy2) == ZERO;
|
&& sign_of_determinant(dx1, dy1, dx2, dy2) == ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class FT >
|
template < class FT >
|
||||||
|
|
@ -287,7 +287,7 @@ compare_angle_with_x_axisC2(const FT &dx1, const FT &dy1,
|
||||||
return LARGER;
|
return LARGER;
|
||||||
else if (quadrant_1 < quadrant_2)
|
else if (quadrant_1 < quadrant_2)
|
||||||
return SMALLER;
|
return SMALLER;
|
||||||
return -sign_of_determinant2x2(dx1,dy1,dx2,dy2);
|
return -sign_of_determinant(dx1,dy1,dx2,dy2);
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class FT >
|
template < class FT >
|
||||||
|
|
@ -401,7 +401,7 @@ orientationC2(const FT &px, const FT &py,
|
||||||
const FT &qx, const FT &qy,
|
const FT &qx, const FT &qy,
|
||||||
const FT &rx, const FT &ry)
|
const FT &rx, const FT &ry)
|
||||||
{
|
{
|
||||||
return sign_of_determinant2x2(qx-px, qy-py, rx-px, ry-py);
|
return sign_of_determinant(qx-px, qy-py, rx-px, ry-py);
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class FT >
|
template < class FT >
|
||||||
|
|
@ -409,7 +409,7 @@ inline
|
||||||
typename Same_uncertainty_nt<Orientation, FT>::type
|
typename Same_uncertainty_nt<Orientation, FT>::type
|
||||||
orientationC2(const FT &ux, const FT &uy, const FT &vx, const FT &vy)
|
orientationC2(const FT &ux, const FT &uy, const FT &vx, const FT &vy)
|
||||||
{
|
{
|
||||||
return sign_of_determinant2x2(ux, uy, vx, vy);
|
return sign_of_determinant(ux, uy, vx, vy);
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class FT >
|
template < class FT >
|
||||||
|
|
@ -459,7 +459,7 @@ side_of_oriented_circleC2(const FT &px, const FT &py,
|
||||||
const FT &tx, const FT &ty)
|
const FT &tx, const FT &ty)
|
||||||
{
|
{
|
||||||
// Oriented_side(
|
// Oriented_side(
|
||||||
// sign_of_determinant4x4(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));
|
||||||
|
|
@ -471,10 +471,10 @@ side_of_oriented_circleC2(const FT &px, const FT &py,
|
||||||
FT tpx = tx-px;
|
FT tpx = tx-px;
|
||||||
FT tpy = ty-py;
|
FT tpy = ty-py;
|
||||||
// The usual 3x3 formula can be simplified a little bit to a 2x2.
|
// The usual 3x3 formula can be simplified a little bit to a 2x2.
|
||||||
// - sign_of_determinant3x3(qpx, qpy, square(qpx) + square(qpy),
|
// - sign_of_determinant(qpx, qpy, square(qpx) + square(qpy),
|
||||||
// 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_determinant2x2<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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,9 @@ typename Equal_to<FT>::result_type
|
||||||
parallelC3(const FT &v1x, const FT &v1y, const FT &v1z,
|
parallelC3(const FT &v1x, const FT &v1y, const FT &v1z,
|
||||||
const FT &v2x, const FT &v2y, const FT &v2z)
|
const FT &v2x, const FT &v2y, const FT &v2z)
|
||||||
{
|
{
|
||||||
return sign_of_determinant2x2(v1x, v2x, v1y, v2y) == ZERO
|
return sign_of_determinant(v1x, v2x, v1y, v2y) == ZERO
|
||||||
&& sign_of_determinant2x2(v1x, v2x, v1z, v2z) == ZERO
|
&& sign_of_determinant(v1x, v2x, v1z, v2z) == ZERO
|
||||||
&& sign_of_determinant2x2(v1y, v2y, v1z, v2z) == ZERO;
|
&& sign_of_determinant(v1y, v2y, v1z, v2z) == ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class FT >
|
template < class FT >
|
||||||
|
|
@ -106,12 +106,12 @@ collinearC3(const FT &px, const FT &py, const FT &pz,
|
||||||
FT dqx = qx-rx;
|
FT dqx = qx-rx;
|
||||||
FT dpy = py-ry;
|
FT dpy = py-ry;
|
||||||
FT dqy = qy-ry;
|
FT dqy = qy-ry;
|
||||||
if (sign_of_determinant2x2(dpx, dqx, dpy, dqy) != ZERO)
|
if (sign_of_determinant(dpx, dqx, dpy, dqy) != ZERO)
|
||||||
return false;
|
return false;
|
||||||
FT dpz = pz-rz;
|
FT dpz = pz-rz;
|
||||||
FT dqz = qz-rz;
|
FT dqz = qz-rz;
|
||||||
return sign_of_determinant2x2(dpx, dqx, dpz, dqz) == ZERO
|
return sign_of_determinant(dpx, dqx, dpz, dqz) == ZERO
|
||||||
&& sign_of_determinant2x2(dpy, dqy, dpz, dqz) == ZERO;
|
&& sign_of_determinant(dpy, dqy, dpz, dqz) == ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class FT >
|
template < class FT >
|
||||||
|
|
@ -122,7 +122,7 @@ orientationC3(const FT &px, const FT &py, const FT &pz,
|
||||||
const FT &rx, const FT &ry, const FT &rz,
|
const FT &rx, const FT &ry, const FT &rz,
|
||||||
const FT &sx, const FT &sy, const FT &sz)
|
const FT &sx, const FT &sy, const FT &sz)
|
||||||
{
|
{
|
||||||
return sign_of_determinant3x3<FT>(qx-px,rx-px,sx-px,
|
return sign_of_determinant<FT>(qx-px,rx-px,sx-px,
|
||||||
qy-py,ry-py,sy-py,
|
qy-py,ry-py,sy-py,
|
||||||
qz-pz,rz-pz,sz-pz);
|
qz-pz,rz-pz,sz-pz);
|
||||||
}
|
}
|
||||||
|
|
@ -134,7 +134,7 @@ orientationC3(const FT &ux, const FT &uy, const FT &uz,
|
||||||
const FT &vx, const FT &vy, const FT &vz,
|
const FT &vx, const FT &vy, const FT &vz,
|
||||||
const FT &wx, const FT &wy, const FT &wz)
|
const FT &wx, const FT &wy, const FT &wz)
|
||||||
{
|
{
|
||||||
return sign_of_determinant3x3(ux, vx, wx,
|
return sign_of_determinant(ux, vx, wx,
|
||||||
uy, vy, wy,
|
uy, vy, wy,
|
||||||
uz, vz, wz);
|
uz, vz, wz);
|
||||||
}
|
}
|
||||||
|
|
@ -226,7 +226,7 @@ coplanar_side_of_bounded_circleC3(const FT &px, const FT &py, const FT &pz,
|
||||||
FT vy = pqz*prx - pqx*prz;
|
FT vy = pqz*prx - pqx*prz;
|
||||||
FT vz = pqx*pry - pqy*prx;
|
FT vz = pqx*pry - pqy*prx;
|
||||||
FT v2 = CGAL_NTS square(vx) + CGAL_NTS square(vy) + CGAL_NTS square(vz);
|
FT v2 = CGAL_NTS square(vx) + CGAL_NTS square(vy) + CGAL_NTS square(vz);
|
||||||
return enum_cast<Bounded_side>(sign_of_determinant4x4(ptx,pty,ptz,pt2,
|
return enum_cast<Bounded_side>(sign_of_determinant(ptx,pty,ptz,pt2,
|
||||||
rtx,rty,rtz,rt2,
|
rtx,rty,rtz,rt2,
|
||||||
qtx,qty,qtz,qt2,
|
qtx,qty,qtz,qt2,
|
||||||
vx,vy,vz,v2));
|
vx,vy,vz,v2));
|
||||||
|
|
@ -272,9 +272,9 @@ typename Equal_to<FT>::result_type
|
||||||
equal_directionC3(const FT &dx1, const FT &dy1, const FT &dz1,
|
equal_directionC3(const FT &dx1, const FT &dy1, const FT &dz1,
|
||||||
const FT &dx2, const FT &dy2, const FT &dz2)
|
const FT &dx2, const FT &dy2, const FT &dz2)
|
||||||
{
|
{
|
||||||
return sign_of_determinant2x2(dx1, dy1, dx2, dy2) == ZERO
|
return sign_of_determinant(dx1, dy1, dx2, dy2) == ZERO
|
||||||
&& sign_of_determinant2x2(dx1, dz1, dx2, dz2) == ZERO
|
&& sign_of_determinant(dx1, dz1, dx2, dz2) == ZERO
|
||||||
&& sign_of_determinant2x2(dy1, dz1, dy2, dz2) == ZERO
|
&& sign_of_determinant(dy1, dz1, dy2, dz2) == ZERO
|
||||||
&& CGAL_NTS sign(dx1) == CGAL_NTS sign(dx2)
|
&& CGAL_NTS sign(dx1) == CGAL_NTS sign(dx2)
|
||||||
&& CGAL_NTS sign(dy1) == CGAL_NTS sign(dy2)
|
&& CGAL_NTS sign(dy1) == CGAL_NTS sign(dy2)
|
||||||
&& CGAL_NTS sign(dz1) == CGAL_NTS sign(dz2);
|
&& CGAL_NTS sign(dz1) == CGAL_NTS sign(dz2);
|
||||||
|
|
@ -294,13 +294,13 @@ equal_planeC3(const FT &ha, const FT &hb, const FT &hc, const FT &hd,
|
||||||
Sg s1a = CGAL_NTS sign(ha);
|
Sg s1a = CGAL_NTS sign(ha);
|
||||||
if (s1a != ZERO)
|
if (s1a != ZERO)
|
||||||
return s1a == CGAL_NTS sign(pa)
|
return s1a == CGAL_NTS sign(pa)
|
||||||
&& sign_of_determinant2x2(pa, pd, ha, hd) == ZERO;
|
&& sign_of_determinant(pa, pd, ha, hd) == ZERO;
|
||||||
Sg s1b = CGAL_NTS sign(hb);
|
Sg s1b = CGAL_NTS sign(hb);
|
||||||
if (s1b != ZERO)
|
if (s1b != ZERO)
|
||||||
return s1b == CGAL_NTS sign(pb)
|
return s1b == CGAL_NTS sign(pb)
|
||||||
&& sign_of_determinant2x2(pb, pd, hb, hd) == ZERO;
|
&& sign_of_determinant(pb, pd, hb, hd) == ZERO;
|
||||||
return CGAL_NTS sign(pc) == CGAL_NTS sign(hc)
|
return CGAL_NTS sign(pc) == CGAL_NTS sign(hc)
|
||||||
&& sign_of_determinant2x2(pc, pd, hc, hd) == ZERO;
|
&& sign_of_determinant(pc, pd, hc, hd) == ZERO;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class FT >
|
template <class FT >
|
||||||
|
|
@ -337,7 +337,7 @@ side_of_oriented_sphereC3(const FT &px, const FT &py, const FT &pz,
|
||||||
FT sty = sy - ty;
|
FT sty = sy - ty;
|
||||||
FT stz = sz - tz;
|
FT stz = sz - tz;
|
||||||
FT st2 = CGAL_NTS square(stx) + CGAL_NTS square(sty) + CGAL_NTS square(stz);
|
FT st2 = CGAL_NTS square(stx) + CGAL_NTS square(sty) + CGAL_NTS square(stz);
|
||||||
return sign_of_determinant4x4(ptx,pty,ptz,pt2,
|
return sign_of_determinant(ptx,pty,ptz,pt2,
|
||||||
rtx,rty,rtz,rt2,
|
rtx,rty,rtz,rt2,
|
||||||
qtx,qty,qtz,qt2,
|
qtx,qty,qtz,qt2,
|
||||||
stx,sty,stz,st2);
|
stx,sty,stz,st2);
|
||||||
|
|
@ -498,7 +498,7 @@ cmp_signed_dist_to_planeC3(
|
||||||
const FT &px, const FT &py, const FT &pz,
|
const FT &px, const FT &py, const FT &pz,
|
||||||
const FT &qx, const FT &qy, const FT &qz)
|
const FT &qx, const FT &qy, const FT &qz)
|
||||||
{
|
{
|
||||||
return sign_of_determinant3x3<FT>( pqx-ppx, pqy-ppy, pqz-ppz,
|
return sign_of_determinant<FT>( pqx-ppx, pqy-ppy, pqz-ppz,
|
||||||
prx-ppx, pry-ppy, prz-ppz,
|
prx-ppx, pry-ppy, prz-ppz,
|
||||||
px-qx, py-qy, pz-qz);
|
px-qx, py-qy, pz-qz);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3649,19 +3649,19 @@ namespace HomogeneousKernelFunctors {
|
||||||
result_type
|
result_type
|
||||||
operator()(const Point_3& p, const Point_3& q, const Point_3& r) const
|
operator()(const Point_3& p, const Point_3& q, const Point_3& r) const
|
||||||
{
|
{
|
||||||
Orientation oxy_pqr = sign_of_determinant3x3(p.hx(), p.hy(), p.hw(),
|
Orientation oxy_pqr = sign_of_determinant(p.hx(), p.hy(), p.hw(),
|
||||||
q.hx(), q.hy(), q.hw(),
|
q.hx(), q.hy(), q.hw(),
|
||||||
r.hx(), r.hy(), r.hw());
|
r.hx(), r.hy(), r.hw());
|
||||||
if (oxy_pqr != COLLINEAR)
|
if (oxy_pqr != COLLINEAR)
|
||||||
return oxy_pqr;
|
return oxy_pqr;
|
||||||
|
|
||||||
Orientation oyz_pqr = sign_of_determinant3x3(p.hy(), p.hz(), p.hw(),
|
Orientation oyz_pqr = sign_of_determinant(p.hy(), p.hz(), p.hw(),
|
||||||
q.hy(), q.hz(), q.hw(),
|
q.hy(), q.hz(), q.hw(),
|
||||||
r.hy(), r.hz(), r.hw());
|
r.hy(), r.hz(), r.hw());
|
||||||
if (oyz_pqr != COLLINEAR)
|
if (oyz_pqr != COLLINEAR)
|
||||||
return oyz_pqr;
|
return oyz_pqr;
|
||||||
|
|
||||||
return sign_of_determinant3x3(p.hx(), p.hz(), p.hw(),
|
return sign_of_determinant(p.hx(), p.hz(), p.hw(),
|
||||||
q.hx(), q.hz(), q.hw(),
|
q.hx(), q.hz(), q.hw(),
|
||||||
r.hx(), r.hz(), r.hw());
|
r.hx(), r.hz(), r.hw());
|
||||||
}
|
}
|
||||||
|
|
@ -3682,24 +3682,24 @@ namespace HomogeneousKernelFunctors {
|
||||||
|
|
||||||
// compute orientation of p,q,s in this plane P:
|
// compute orientation of p,q,s in this plane P:
|
||||||
Orientation save;
|
Orientation save;
|
||||||
if ( (save = sign_of_determinant3x3(p.hy(), p.hz(), p.hw(),
|
if ( (save = sign_of_determinant(p.hy(), p.hz(), p.hw(),
|
||||||
q.hy(), q.hz(), q.hw(),
|
q.hy(), q.hz(), q.hw(),
|
||||||
r.hy(), r.hz(), r.hw())) != COLLINEAR)
|
r.hy(), r.hz(), r.hw())) != COLLINEAR)
|
||||||
{ return save * sign_of_determinant3x3(p.hy(), p.hz(), p.hw(),
|
{ return save * sign_of_determinant(p.hy(), p.hz(), p.hw(),
|
||||||
q.hy(), q.hz(), q.hw(),
|
q.hy(), q.hz(), q.hw(),
|
||||||
s.hy(), s.hz(), s.hw());
|
s.hy(), s.hz(), s.hw());
|
||||||
}
|
}
|
||||||
if ( (save = sign_of_determinant3x3(p.hx(), p.hz(), p.hw(),
|
if ( (save = sign_of_determinant(p.hx(), p.hz(), p.hw(),
|
||||||
q.hx(), q.hz(), q.hw(),
|
q.hx(), q.hz(), q.hw(),
|
||||||
r.hx(), r.hz(), r.hw())) != COLLINEAR)
|
r.hx(), r.hz(), r.hw())) != COLLINEAR)
|
||||||
{ return save * sign_of_determinant3x3(p.hx(), p.hz(), p.hw(),
|
{ return save * sign_of_determinant(p.hx(), p.hz(), p.hw(),
|
||||||
q.hx(), q.hz(), q.hw(),
|
q.hx(), q.hz(), q.hw(),
|
||||||
s.hx(), s.hz(), s.hw());
|
s.hx(), s.hz(), s.hw());
|
||||||
}
|
}
|
||||||
if ( (save = sign_of_determinant3x3(p.hx(), p.hy(), p.hw(),
|
if ( (save = sign_of_determinant(p.hx(), p.hy(), p.hw(),
|
||||||
q.hx(), q.hy(), q.hw(),
|
q.hx(), q.hy(), q.hw(),
|
||||||
r.hx(), r.hy(), r.hw())) != COLLINEAR)
|
r.hx(), r.hy(), r.hw())) != COLLINEAR)
|
||||||
{ return save * sign_of_determinant3x3( p.hx(), p.hy(), p.hw(),
|
{ return save * sign_of_determinant( p.hx(), p.hy(), p.hw(),
|
||||||
q.hx(), q.hy(), q.hw(),
|
q.hx(), q.hy(), q.hw(),
|
||||||
s.hx(), s.hy(), s.hw());
|
s.hx(), s.hy(), s.hw());
|
||||||
}
|
}
|
||||||
|
|
@ -4285,7 +4285,7 @@ namespace HomogeneousKernelFunctors {
|
||||||
result_type
|
result_type
|
||||||
operator()(const Vector_2& u, const Vector_2& v) const
|
operator()(const Vector_2& u, const Vector_2& v) const
|
||||||
{
|
{
|
||||||
return sign_of_determinant2x2(u.hx(), u.hy(),
|
return sign_of_determinant(u.hx(), u.hy(),
|
||||||
v.hx(), v.hy());
|
v.hx(), v.hy());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4312,7 +4312,7 @@ namespace HomogeneousKernelFunctors {
|
||||||
const Point_3& r, const Point_3& s) const
|
const Point_3& r, const Point_3& s) const
|
||||||
{
|
{
|
||||||
// Two rows are switched, because of the homogeneous column.
|
// Two rows are switched, because of the homogeneous column.
|
||||||
return sign_of_determinant4x4( p.hx(), p.hy(), p.hz(), p.hw(),
|
return sign_of_determinant( p.hx(), p.hy(), p.hz(), p.hw(),
|
||||||
r.hx(), r.hy(), r.hz(), r.hw(),
|
r.hx(), r.hy(), r.hz(), r.hw(),
|
||||||
q.hx(), q.hy(), q.hz(), q.hw(),
|
q.hx(), q.hy(), q.hz(), q.hw(),
|
||||||
s.hx(), s.hy(), s.hz(), s.hw());
|
s.hx(), s.hy(), s.hz(), s.hw());
|
||||||
|
|
@ -4321,7 +4321,7 @@ namespace HomogeneousKernelFunctors {
|
||||||
result_type
|
result_type
|
||||||
operator()( const Vector_3& u, const Vector_3& v, const Vector_3& w) const
|
operator()( const Vector_3& u, const Vector_3& v, const Vector_3& w) const
|
||||||
{
|
{
|
||||||
return sign_of_determinant3x3( u.hx(), u.hy(), u.hz(),
|
return sign_of_determinant( u.hx(), u.hy(), u.hz(),
|
||||||
v.hx(), v.hy(), v.hz(),
|
v.hx(), v.hy(), v.hz(),
|
||||||
w.hx(), w.hy(), w.hz());
|
w.hx(), w.hy(), w.hz());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ bisector_plane_intersection_translateC3(const RT &ax, const RT &ay,
|
||||||
// if p is on the positive side of the plane
|
// if p is on the positive side of the plane
|
||||||
//(<=> (p-a)*n >0 <=> na < 0) then orientation (pq p1 p2) is ccw
|
//(<=> (p-a)*n >0 <=> na < 0) then orientation (pq p1 p2) is ccw
|
||||||
// if not: permutation of p1 and p2
|
// if not: permutation of p1 and p2
|
||||||
if((sign_of_determinant3x3(qx,qy,qz, x1,y1,RT(0),x2 ,y2,RT(1))
|
if((sign_of_determinant(qx,qy,qz, x1,y1,RT(0),x2 ,y2,RT(1))
|
||||||
* CGAL_NTS sign (-na)) > 0 )
|
* CGAL_NTS sign (-na)) > 0 )
|
||||||
{
|
{
|
||||||
RT x3(x1),y3(y1);
|
RT x3(x1),y3(y1);
|
||||||
|
|
|
||||||
|
|
@ -37,13 +37,13 @@ side_of_plane_centered_sphere_translateC3(
|
||||||
RT na =nx*ax + ny*ay + nz*az;
|
RT na =nx*ax + ny*ay + nz*az;
|
||||||
na *= RT(2.0);
|
na *= RT(2.0);
|
||||||
|
|
||||||
Sign num = sign_of_determinant4x4(rx, ry, rz, r2,
|
Sign num = sign_of_determinant(rx, ry, rz, r2,
|
||||||
qx, qy, qz, q2,
|
qx, qy, qz, q2,
|
||||||
nx, ny, nz, na,
|
nx, ny, nz, na,
|
||||||
tx, ty, tz, t2);
|
tx, ty, tz, t2);
|
||||||
|
|
||||||
//denumerator:
|
//denumerator:
|
||||||
Sign den = sign_of_determinant3x3(nx,ny,nz,
|
Sign den = sign_of_determinant(nx,ny,nz,
|
||||||
qx,qy,qz,
|
qx,qy,qz,
|
||||||
rx,ry,rz);
|
rx,ry,rz);
|
||||||
CGAL_assertion(den != ZERO);
|
CGAL_assertion(den != ZERO);
|
||||||
|
|
@ -93,23 +93,23 @@ side_of_plane_centered_sphere_translateC3(
|
||||||
RT na =nx*ax + ny*ay + nz*az;
|
RT na =nx*ax + ny*ay + nz*az;
|
||||||
na *= RT(2.0);
|
na *= RT(2.0);
|
||||||
|
|
||||||
Sign num = sign_of_determinant4x4(qx, qy, qz, q2,
|
Sign num = sign_of_determinant(qx, qy, qz, q2,
|
||||||
ny, -nx, RT(0), RT(0),
|
ny, -nx, RT(0), RT(0),
|
||||||
nx, ny, nz, na,
|
nx, ny, nz, na,
|
||||||
rx, ry, rz, r2);
|
rx, ry, rz, r2);
|
||||||
//denumerator:
|
//denumerator:
|
||||||
Sign den = sign_of_determinant3x3(nx,ny,nz,
|
Sign den = sign_of_determinant(nx,ny,nz,
|
||||||
ny,-nx, RT(0),
|
ny,-nx, RT(0),
|
||||||
qx,qy,qz);
|
qx,qy,qz);
|
||||||
if (den==ZERO) {
|
if (den==ZERO) {
|
||||||
// bad choice: (ny,-nx,0) is coplanar with n,q.
|
// bad choice: (ny,-nx,0) is coplanar with n,q.
|
||||||
// by precondition: q and n may not be collinear
|
// by precondition: q and n may not be collinear
|
||||||
// => the cross product q*n is orthogonal to q, n and not coplanar
|
// => the cross product q*n is orthogonal to q, n and not coplanar
|
||||||
num = sign_of_determinant4x4(qx, qy, qz, q2,
|
num = sign_of_determinant(qx, qy, qz, q2,
|
||||||
ny*qz-nz*qy, nz*qx-nx*qz,nx*qy-ny*qx, RT(0),
|
ny*qz-nz*qy, nz*qx-nx*qz,nx*qy-ny*qx, RT(0),
|
||||||
nx, ny, nz, na,
|
nx, ny, nz, na,
|
||||||
rx, ry, rz, r2);
|
rx, ry, rz, r2);
|
||||||
den = sign_of_determinant3x3(nx,ny,nz,
|
den = sign_of_determinant(nx,ny,nz,
|
||||||
ny*qz-nz*qy, nz*qx - nx*qz,nx*qy-ny*qx,
|
ny*qz-nz*qy, nz*qx - nx*qz,nx*qy-ny*qx,
|
||||||
qx,qy,qz);
|
qx,qy,qz);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -736,7 +736,7 @@ void Monge_via_jet_fitting<DataKernel, LocalKernel, SvdTraits>::
|
||||||
switch_to_direct_orientation(Vector_3& v1, const Vector_3& v2,
|
switch_to_direct_orientation(Vector_3& v1, const Vector_3& v2,
|
||||||
const Vector_3& v3)
|
const Vector_3& v3)
|
||||||
{
|
{
|
||||||
CGAL::Sign orientation = CGAL::sign_of_determinant3x3(v1[0], v2[0], v3[0],
|
CGAL::Sign orientation = CGAL::sign_of_determinant(v1[0], v2[0], v3[0],
|
||||||
v1[1], v2[1], v3[1],
|
v1[1], v2[1], v3[1],
|
||||||
v1[2], v2[2], v3[2]);
|
v1[2], v2[2], v3[2]);
|
||||||
if (orientation == CGAL::NEGATIVE) v1 = -v1;
|
if (orientation == CGAL::NEGATIVE) v1 = -v1;
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ CGAL_BEGIN_NAMESPACE
|
||||||
template <class RT>
|
template <class RT>
|
||||||
inline
|
inline
|
||||||
typename Sgn<RT>::result_type
|
typename Sgn<RT>::result_type
|
||||||
sign_of_determinant2x2( const RT& a00, const RT& a01,
|
sign_of_determinant( const RT& a00, const RT& a01,
|
||||||
const RT& a10, const RT& a11)
|
const RT& a10, const RT& a11)
|
||||||
{
|
{
|
||||||
return enum_cast<Sign>(CGAL_NTS compare( a00*a11, a10*a01));
|
return enum_cast<Sign>(CGAL_NTS compare( a00*a11, a10*a01));
|
||||||
|
|
@ -41,7 +41,7 @@ sign_of_determinant2x2( const RT& a00, const RT& a01,
|
||||||
template <class RT>
|
template <class RT>
|
||||||
inline
|
inline
|
||||||
typename Sgn<RT>::result_type
|
typename Sgn<RT>::result_type
|
||||||
sign_of_determinant3x3( const RT& a00, const RT& a01, const RT& a02,
|
sign_of_determinant( const RT& a00, const RT& a01, const RT& a02,
|
||||||
const RT& a10, const RT& a11, const RT& a12,
|
const RT& a10, const RT& a11, const RT& a12,
|
||||||
const RT& a20, const RT& a21, const RT& a22)
|
const RT& a20, const RT& a21, const RT& a22)
|
||||||
{
|
{
|
||||||
|
|
@ -53,7 +53,7 @@ sign_of_determinant3x3( const RT& a00, const RT& a01, const RT& a02,
|
||||||
template <class RT>
|
template <class RT>
|
||||||
inline
|
inline
|
||||||
typename Sgn<RT>::result_type
|
typename Sgn<RT>::result_type
|
||||||
sign_of_determinant4x4(
|
sign_of_determinant(
|
||||||
const RT& a00, const RT& a01, const RT& a02, const RT& a03,
|
const RT& a00, const RT& a01, const RT& a02, const RT& a03,
|
||||||
const RT& a10, const RT& a11, const RT& a12, const RT& a13,
|
const RT& a10, const RT& a11, const RT& a12, const RT& a13,
|
||||||
const RT& a20, const RT& a21, const RT& a22, const RT& a23,
|
const RT& a20, const RT& a21, const RT& a22, const RT& a23,
|
||||||
|
|
@ -68,7 +68,7 @@ sign_of_determinant4x4(
|
||||||
template <class RT>
|
template <class RT>
|
||||||
CGAL_KERNEL_LARGE_INLINE
|
CGAL_KERNEL_LARGE_INLINE
|
||||||
typename Sgn<RT>::result_type
|
typename Sgn<RT>::result_type
|
||||||
sign_of_determinant5x5(
|
sign_of_determinant(
|
||||||
const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a04,
|
const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a04,
|
||||||
const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a14,
|
const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a14,
|
||||||
const RT& a20, const RT& a21, const RT& a22, const RT& a23, const RT& a24,
|
const RT& a20, const RT& a21, const RT& a22, const RT& a23, const RT& a24,
|
||||||
|
|
@ -85,7 +85,7 @@ sign_of_determinant5x5(
|
||||||
template <class RT>
|
template <class RT>
|
||||||
CGAL_KERNEL_LARGE_INLINE
|
CGAL_KERNEL_LARGE_INLINE
|
||||||
typename Sgn<RT>::result_type
|
typename Sgn<RT>::result_type
|
||||||
sign_of_determinant6x6(
|
sign_of_determinant(
|
||||||
const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a04,
|
const RT& a00, const RT& a01, const RT& a02, const RT& a03, const RT& a04,
|
||||||
const RT& a05,
|
const RT& a05,
|
||||||
const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a14,
|
const RT& a10, const RT& a11, const RT& a12, const RT& a13, const RT& a14,
|
||||||
|
|
|
||||||
|
|
@ -88,34 +88,34 @@ _test_fct_determinant(const NT&)
|
||||||
|
|
||||||
// sign_of_determinantDxD
|
// sign_of_determinantDxD
|
||||||
|
|
||||||
assert( CGAL::sign_of_determinant2x2<NT>( zero, one, \
|
assert( CGAL::sign_of_determinant<NT>( zero, one, \
|
||||||
one, zero) == CGAL::NEGATIVE );
|
one, zero) == CGAL::NEGATIVE );
|
||||||
|
|
||||||
assert( CGAL::sign_of_determinant2x2<NT>( one, one, \
|
assert( CGAL::sign_of_determinant<NT>( one, one, \
|
||||||
zero, -one) == CGAL::NEGATIVE );
|
zero, -one) == CGAL::NEGATIVE );
|
||||||
|
|
||||||
assert( CGAL::sign_of_determinant2x2<NT>( one, one, \
|
assert( CGAL::sign_of_determinant<NT>( one, one, \
|
||||||
zero, one) == CGAL::POSITIVE );
|
zero, one) == CGAL::POSITIVE );
|
||||||
|
|
||||||
assert( CGAL::sign_of_determinant2x2<NT>( zero, -one, \
|
assert( CGAL::sign_of_determinant<NT>( zero, -one, \
|
||||||
zero, one) == CGAL::ZERO );
|
zero, one) == CGAL::ZERO );
|
||||||
|
|
||||||
|
|
||||||
assert( CGAL::sign_of_determinant4x4<NT>( one, zero, one, -one, \
|
assert( CGAL::sign_of_determinant<NT>( one, zero, one, -one, \
|
||||||
zero, one, one, -one, \
|
zero, one, one, -one, \
|
||||||
zero, two, zero, one, \
|
zero, two, zero, one, \
|
||||||
zero, -one, zero, zero ) == \
|
zero, -one, zero, zero ) == \
|
||||||
CGAL::sign_of_determinant3x3<NT>( one, one, -one, \
|
CGAL::sign_of_determinant<NT>( one, one, -one, \
|
||||||
two, zero, one, \
|
two, zero, one, \
|
||||||
-one, zero, zero ) );
|
-one, zero, zero ) );
|
||||||
|
|
||||||
assert( CGAL::sign_of_determinant6x6<NT>( one, zero, zero, zero, zero, zero, \
|
assert( CGAL::sign_of_determinant<NT>( one, zero, zero, zero, zero, zero, \
|
||||||
zero, one, zero, one, -one, zero, \
|
zero, one, zero, one, -one, zero, \
|
||||||
zero, zero, one, one, -one, zero, \
|
zero, zero, one, one, -one, zero, \
|
||||||
zero, one, two, zero, one, two, \
|
zero, one, two, zero, one, two, \
|
||||||
zero, one, one, zero, -one, zero, \
|
zero, one, one, zero, -one, zero, \
|
||||||
zero, -one, -one, zero, zero, one )==\
|
zero, -one, -one, zero, zero, one )==\
|
||||||
CGAL::sign_of_determinant5x5<NT>( one, zero, one, -one, zero, \
|
CGAL::sign_of_determinant<NT>( one, zero, one, -one, zero, \
|
||||||
zero, one, one, -one, zero, \
|
zero, one, one, -one, zero, \
|
||||||
one, two, zero, one, two, \
|
one, two, zero, one, two, \
|
||||||
one, one, zero, -one, zero, \
|
one, one, zero, -one, zero, \
|
||||||
|
|
|
||||||
|
|
@ -688,7 +688,7 @@ public:
|
||||||
RT dtqx = q.point().x() - t.point().x();
|
RT dtqx = q.point().x() - t.point().x();
|
||||||
RT dtqy = q.point().y() - t.point().y();
|
RT dtqy = q.point().y() - t.point().y();
|
||||||
|
|
||||||
Sign s1 = sign_of_determinant2x2(dtpx, minus_dtpy, dtqy, dtqx);
|
Sign s1 = sign_of_determinant(dtpx, minus_dtpy, dtqy, dtqx);
|
||||||
|
|
||||||
CGAL_assertion( s1 != ZERO );
|
CGAL_assertion( s1 != ZERO );
|
||||||
return ( s1 == NEGATIVE );
|
return ( s1 == NEGATIVE );
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ public:
|
||||||
RT dtqx = q.point().x() - t.point().x();
|
RT dtqx = q.point().x() - t.point().x();
|
||||||
RT minus_dtqy = -q.point().y() + t.point().y();
|
RT minus_dtqy = -q.point().y() + t.point().y();
|
||||||
|
|
||||||
Sign sgn1 = sign_of_determinant2x2(dtsx, dtsy, minus_dtqy, dtqx);
|
Sign sgn1 = sign_of_determinant(dtsx, dtsy, minus_dtqy, dtqx);
|
||||||
|
|
||||||
CGAL_assertion( sgn1 != ZERO );
|
CGAL_assertion( sgn1 != ZERO );
|
||||||
|
|
||||||
|
|
@ -96,7 +96,7 @@ public:
|
||||||
RT dtqx = q.point().x() - t.point().x();
|
RT dtqx = q.point().x() - t.point().x();
|
||||||
RT minus_dtqy = -q.point().y() + t.point().y();
|
RT minus_dtqy = -q.point().y() + t.point().y();
|
||||||
|
|
||||||
Sign sgn1 = sign_of_determinant2x2(dtssx, dtssy, minus_dtqy, dtqx);
|
Sign sgn1 = sign_of_determinant(dtssx, dtssy, minus_dtqy, dtqx);
|
||||||
|
|
||||||
CGAL_assertion( sgn1 != ZERO );
|
CGAL_assertion( sgn1 != ZERO );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ private:
|
||||||
RT dtqx = qp.x() - tp.x();
|
RT dtqx = qp.x() - tp.x();
|
||||||
RT minus_dtqy = -qp.y() + tp.y();
|
RT minus_dtqy = -qp.y() + tp.y();
|
||||||
|
|
||||||
Sign s = sign_of_determinant2x2(dtpx, dtpy, minus_dtqy, dtqx);
|
Sign s = sign_of_determinant(dtpx, dtpy, minus_dtqy, dtqx);
|
||||||
|
|
||||||
CGAL_assertion( s != ZERO );
|
CGAL_assertion( s != ZERO );
|
||||||
|
|
||||||
|
|
@ -210,7 +210,7 @@ private:
|
||||||
RT dtqx = qp.x() - tp.x();
|
RT dtqx = qp.x() - tp.x();
|
||||||
RT minus_dtqy = -qp.y() + tp.y();
|
RT minus_dtqy = -qp.y() + tp.y();
|
||||||
|
|
||||||
Sign s = sign_of_determinant2x2(dtpx, dtpy, minus_dtqy, dtqx);
|
Sign s = sign_of_determinant(dtpx, dtpy, minus_dtqy, dtqx);
|
||||||
|
|
||||||
CGAL_assertion( s != ZERO );
|
CGAL_assertion( s != ZERO );
|
||||||
|
|
||||||
|
|
@ -302,7 +302,7 @@ private:
|
||||||
RT dtqx = qp.x() - tp.x();
|
RT dtqx = qp.x() - tp.x();
|
||||||
RT minus_dtqy = -qp.y() + tp.y();
|
RT minus_dtqy = -qp.y() + tp.y();
|
||||||
|
|
||||||
Sign s = sign_of_determinant2x2(dtpx, dtpy, minus_dtqy, dtqx);
|
Sign s = sign_of_determinant(dtpx, dtpy, minus_dtqy, dtqx);
|
||||||
|
|
||||||
CGAL_assertion( s != ZERO );
|
CGAL_assertion( s != ZERO );
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ power_testC2( const FT &px, const FT &py, const FT &pwt,
|
||||||
FT dry = ry - ty;
|
FT dry = ry - ty;
|
||||||
FT drz = CGAL_NTS square(drx) + CGAL_NTS square(dry) - rwt + twt;
|
FT drz = CGAL_NTS square(drx) + CGAL_NTS square(dry) - rwt + twt;
|
||||||
|
|
||||||
return sign_of_determinant3x3(dpx, dpy, dpz,
|
return sign_of_determinant(dpx, dpy, dpz,
|
||||||
dqx, dqy, dqz,
|
dqx, dqy, dqz,
|
||||||
drx, dry, drz);
|
drx, dry, drz);
|
||||||
}
|
}
|
||||||
|
|
@ -82,11 +82,11 @@ power_testC2( const FT &px, const FT &py, 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.
|
||||||
Comparison_result cmpx = CGAL_NTS compare(px, qx);
|
Comparison_result cmpx = CGAL_NTS compare(px, qx);
|
||||||
if (cmpx != EQUAL)
|
if (cmpx != EQUAL)
|
||||||
return cmpx * sign_of_determinant2x2(dpx, dpz, dqx, dqz);
|
return cmpx * sign_of_determinant(dpx, dpz, dqx, dqz);
|
||||||
|
|
||||||
// If not possible, then on the (y) axis.
|
// If not possible, then on the (y) axis.
|
||||||
Comparison_result cmpy = CGAL_NTS compare(py, qy);
|
Comparison_result cmpy = CGAL_NTS compare(py, qy);
|
||||||
return cmpy * sign_of_determinant2x2(dpy, dpz, dqy, dqz);
|
return cmpy * sign_of_determinant(dpy, dpz, dqy, dqz);
|
||||||
}
|
}
|
||||||
|
|
||||||
CGAL_END_NAMESPACE
|
CGAL_END_NAMESPACE
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ 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_determinant4x4(dphx, dphy, dpz, dphw,
|
return Oriented_side(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));
|
||||||
|
|
@ -116,7 +116,7 @@ power_testH2( const RT &phx, const RT &phy, const RT &phw, const RT &pwt,
|
||||||
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 Oriented_side(CGAL_NTS compare(pa, qa) *
|
||||||
sign_of_determinant3x3(pa, dpz, dphw,
|
sign_of_determinant(pa, dpz, dphw,
|
||||||
qa, dqz, dqhw,
|
qa, dqz, dqhw,
|
||||||
ta, dtz, dthw));
|
ta, dtz, dthw));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ 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_determinant4x4(dpx, dpy, dpz, dpt,
|
return Oriented_side( - 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));
|
||||||
|
|
@ -90,26 +90,26 @@ power_testC3( const FT &px, const FT &py, const FT &pz, const FT &pwt,
|
||||||
Sign cmp;
|
Sign cmp;
|
||||||
|
|
||||||
// Projection on the (xy) plane.
|
// Projection on the (xy) plane.
|
||||||
cmp = sign_of_determinant3x3(dpx, dpy, dpt,
|
cmp = sign_of_determinant(dpx, dpy, dpt,
|
||||||
dqx, dqy, dqt,
|
dqx, dqy, dqt,
|
||||||
drx, dry, drt);
|
drx, dry, drt);
|
||||||
if (cmp != ZERO)
|
if (cmp != ZERO)
|
||||||
return Oriented_side(cmp * sign_of_determinant2x2(px-rx, py-ry,
|
return Oriented_side(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_determinant3x3(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_determinant2x2(px-rx, pz-rz,
|
return Oriented_side(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_determinant3x3(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_determinant2x2(py-ry, pz-rz,
|
return Oriented_side(cmp * sign_of_determinant(py-ry, pz-rz,
|
||||||
qy-ry, qz-rz));
|
qy-ry, qz-rz));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -136,16 +136,16 @@ 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_determinant2x2(dpx, dpt, dqx, dqt));
|
return Oriented_side(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_determinant2x2(dpy, dpt, dqy, dqt));
|
return Oriented_side(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_determinant2x2(dpz, dpt, dqz, dqt));
|
return Oriented_side(cmp * sign_of_determinant(dpz, dpt, dqz, dqt));
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class FT>
|
template <class FT>
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ 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_determinant5x5(dphx, dphy, dphz, dpz, dphw,
|
return Oriented_side(- 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,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue