mirror of https://github.com/CGAL/cgal
Version 3.3.4 (September 16 1999)
- Use the new CGAL_CFG_TYPENAME_BUG - Added Monique's predicate coplanar_orientation - Fixed some missing std:: for cerr - Avoid using <CGAL/predicate_classes_3.h> in Tetrahedron_3.C
This commit is contained in:
parent
20e62c22ca
commit
edbc8eb82c
|
|
@ -1,3 +1,9 @@
|
|||
Version 3.3.4 (September 16 1999)
|
||||
- Use the new CGAL_CFG_TYPENAME_BUG
|
||||
- Added Monique's predicate coplanar_orientation
|
||||
- Fixed some missing std:: for cerr
|
||||
- Avoid using <CGAL/predicate_classes_3.h> in Tetrahedron_3.C
|
||||
|
||||
Version 3.3.3 (September 9 1999)
|
||||
- Renamed the script to spare the work for Geert-Jan
|
||||
(otherwise clash with C2)
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define CGAL_CTAG
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#define typename
|
||||
#endif
|
||||
|
||||
|
|
@ -281,7 +281,7 @@ std::ostream &operator<<(std::ostream &os,
|
|||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#undef typename
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define CGAL_CTAG
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#define typename
|
||||
#endif
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ Aff_transformation_repC3<R>::transpose() const
|
|||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#undef typename
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define CGAL_CTAG
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#define typename
|
||||
#endif
|
||||
|
||||
|
|
@ -233,8 +233,8 @@ std::istream &operator>>(std::istream &is, DirectionC3<R CGAL_CTAG> &p)
|
|||
read(is, z);
|
||||
break;
|
||||
default:
|
||||
cerr << "" << std::endl;
|
||||
cerr << "Stream must be in ascii or binary mode" << std::endl;
|
||||
std::cerr << "" << std::endl;
|
||||
std::cerr << "Stream must be in ascii or binary mode" << std::endl;
|
||||
break;
|
||||
}
|
||||
p = DirectionC3<R CGAL_CTAG>(x, y, z);
|
||||
|
|
@ -244,7 +244,7 @@ std::istream &operator>>(std::istream &is, DirectionC3<R CGAL_CTAG> &p)
|
|||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#undef typename
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define CGAL_CTAG
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#define typename
|
||||
#endif
|
||||
|
||||
|
|
@ -241,7 +241,7 @@ std::istream &operator>>(std::istream &is, LineC3<R CGAL_CTAG> &l)
|
|||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#undef typename
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define CGAL_CTAG
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#define typename
|
||||
#endif
|
||||
|
||||
|
|
@ -448,8 +448,8 @@ std::istream &operator>>(std::istream &is, PlaneC3<R CGAL_CTAG> &p)
|
|||
read(is, d);
|
||||
break;
|
||||
default:
|
||||
cerr << "" << std::endl;
|
||||
cerr << "Stream must be in ascii or binary mode" << std::endl;
|
||||
std::cerr << "" << std::endl;
|
||||
std::cerr << "Stream must be in ascii or binary mode" << std::endl;
|
||||
break;
|
||||
}
|
||||
p = PlaneC3<R CGAL_CTAG>(a, b, c, d);
|
||||
|
|
@ -460,7 +460,7 @@ std::istream &operator>>(std::istream &is, PlaneC3<R CGAL_CTAG> &p)
|
|||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#undef typename
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define CGAL_CTAG
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#define typename
|
||||
#endif
|
||||
|
||||
|
|
@ -286,8 +286,8 @@ std::istream &operator>>(std::istream &is, PointC3<R CGAL_CTAG> &p)
|
|||
read(is, z);
|
||||
break;
|
||||
default:
|
||||
cerr << "" << std::endl;
|
||||
cerr << "Stream must be in ascii or binary mode" << std::endl;
|
||||
std::cerr << "" << std::endl;
|
||||
std::cerr << "Stream must be in ascii or binary mode" << std::endl;
|
||||
break;
|
||||
}
|
||||
p = PointC3<R CGAL_CTAG>(x, y, z);
|
||||
|
|
@ -298,7 +298,7 @@ std::istream &operator>>(std::istream &is, PointC3<R CGAL_CTAG> &p)
|
|||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#undef typename
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define CGAL_CTAG
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#define typename
|
||||
#endif
|
||||
|
||||
|
|
@ -249,7 +249,7 @@ std::istream &operator>>(std::istream &is, RayC3<R CGAL_CTAG> &r)
|
|||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#undef typename
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define CGAL_CTAG
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#define typename
|
||||
#endif
|
||||
|
||||
|
|
@ -273,7 +273,7 @@ collinear_has_on(const typename SegmentC3<R CGAL_CTAG>::Point_3 &p) const
|
|||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#undef typename
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#define CGAL_CTAG
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#define typename
|
||||
#endif
|
||||
|
||||
|
|
@ -369,8 +369,8 @@ std::istream& operator>>(std::istream &is, SphereC3<R CGAL_CTAG> &c)
|
|||
is >> o;
|
||||
break;
|
||||
default:
|
||||
cerr << "" << std::endl;
|
||||
cerr << "Stream must be in ascii or binary mode" << endl;
|
||||
std::cerr << "" << std::endl;
|
||||
std::cerr << "Stream must be in ascii or binary mode" << endl;
|
||||
break;
|
||||
}
|
||||
c = SphereC3<R CGAL_CTAG>(center, squared_radius, (Orientation)o);
|
||||
|
|
@ -380,7 +380,7 @@ std::istream& operator>>(std::istream &is, SphereC3<R CGAL_CTAG> &c)
|
|||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#undef typename
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#define CGAL_CTAG
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#define typename
|
||||
#endif
|
||||
|
||||
|
|
@ -34,7 +34,6 @@
|
|||
#define CGAL_CARTESIAN_TETRAHEDRON_3_C
|
||||
|
||||
#include <CGAL/Cartesian/solve_3.h>
|
||||
#include <CGAL/predicate_classes_3.h>
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
|
||||
|
|
@ -83,6 +82,22 @@ TetrahedronC3<R CGAL_CTAG>::operator=(const TetrahedronC3<R CGAL_CTAG> &t)
|
|||
Handle::operator=(t);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template < class Point_3 >
|
||||
struct Less_xyzC3 {
|
||||
// cannot reuse it from predicate_classes, because of
|
||||
// problems with file inclusions...
|
||||
bool operator() (Point_3 const &p, Point_3 const &q) {
|
||||
if (p.x()<q.x()) return true;
|
||||
if (q.x()<p.x()) return false;
|
||||
if (p.y()<q.y()) return true;
|
||||
if (q.y()<p.y()) return false;
|
||||
if (p.z()<q.z()) return true;
|
||||
if (q.z()<p.z()) return false;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
template < class R >
|
||||
bool
|
||||
TetrahedronC3<R CGAL_CTAG>::operator==(const TetrahedronC3<R CGAL_CTAG> &t) const
|
||||
|
|
@ -97,8 +112,8 @@ TetrahedronC3<R CGAL_CTAG>::operator==(const TetrahedronC3<R CGAL_CTAG> &t) cons
|
|||
int k;
|
||||
for ( k=0; k < 4; k++) V1.push_back( vertex(k));
|
||||
for ( k=0; k < 4; k++) V2.push_back( t.vertex(k));
|
||||
std::sort(V1.begin(), V1.end(), Less_xyz< Point_3 >());
|
||||
std::sort(V2.begin(), V2.end(), Less_xyz< Point_3 >());
|
||||
std::sort(V1.begin(), V1.end(), Less_xyzC3<Point_3>());
|
||||
std::sort(V2.begin(), V2.end(), Less_xyzC3<Point_3>());
|
||||
uniq_end1 = std::unique( V1.begin(), V1.end());
|
||||
uniq_end2 = std::unique( V2.begin(), V2.end());
|
||||
V1.erase( uniq_end1, V1.end());
|
||||
|
|
@ -126,7 +141,6 @@ template < class R >
|
|||
typename TetrahedronC3<R CGAL_CTAG>::Point_3
|
||||
TetrahedronC3<R CGAL_CTAG>::vertex(int i) const
|
||||
{
|
||||
// modulo 4 is a logical operation, hence cheap
|
||||
if (i<0) i=(i%4)+4;
|
||||
else if (i>3) i=i%4;
|
||||
switch (i)
|
||||
|
|
@ -295,7 +309,7 @@ std::istream &operator>>(std::istream &is, TetrahedronC3<R CGAL_CTAG> &t)
|
|||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#undef typename
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define CGAL_CTAG
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#define typename
|
||||
#endif
|
||||
|
||||
|
|
@ -201,7 +201,7 @@ std::istream &operator>>(std::istream &is, TriangleC3<R CGAL_CTAG> &t)
|
|||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#undef typename
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
#define CGAL_CTAG
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#define typename
|
||||
#endif
|
||||
|
||||
|
|
@ -324,8 +324,8 @@ std::istream &operator>>(std::istream &is, VectorC3<R CGAL_CTAG> &p)
|
|||
read(is, z);
|
||||
break;
|
||||
default:
|
||||
cerr << "" << std::endl;
|
||||
cerr << "Stream must be in ascii or binary mode" << std::endl;
|
||||
std::cerr << "" << std::endl;
|
||||
std::cerr << "Stream must be in ascii or binary mode" << std::endl;
|
||||
break;
|
||||
}
|
||||
p = VectorC3<R CGAL_CTAG>(x, y, z);
|
||||
|
|
@ -335,7 +335,7 @@ std::istream &operator>>(std::istream &is, VectorC3<R CGAL_CTAG> &p)
|
|||
|
||||
CGAL_END_NAMESPACE
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#ifdef CGAL_CFG_TYPENAME_BUG
|
||||
#undef typename
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -147,9 +147,33 @@ coplanar(const PointC3<R CGAL_CTAG> &p,
|
|||
const PointC3<R CGAL_CTAG> &r,
|
||||
const PointC3<R CGAL_CTAG> &s)
|
||||
{
|
||||
return orientation(p, q, r, s) == COLLINEAR;
|
||||
return orientation(p, q, r, s) == COPLANAR;
|
||||
}
|
||||
|
||||
template < class R >
|
||||
inline
|
||||
Orientation
|
||||
coplanar_orientation(const PointC3<R CGAL_CTAG> &q,
|
||||
const PointC3<R CGAL_CTAG> &r,
|
||||
const PointC3<R CGAL_CTAG> &s,
|
||||
const PointC3<R CGAL_CTAG> &p)
|
||||
{
|
||||
// p,q,r,s supposed to be coplanar
|
||||
// q,r,s supposed to be non collinear
|
||||
// tests whether p is on the same side of q,r as s
|
||||
// returns :
|
||||
// COLLINEAR if pqr collinear
|
||||
// POSITIVE if qrp and qrs have the same orientation
|
||||
// NEGATIVE if qrp and qrs have opposite orientations
|
||||
CGAL_kernel_exactness_precondition( ! collinear(q, r, s) );
|
||||
CGAL_kernel_exactness_precondition( coplanar(p, q, r, s) );
|
||||
return coplanar_orientationC3(q.x(), q.y(), q.z(),
|
||||
r.x(), r.y(), r.z(),
|
||||
s.x(), s.y(), s.z(),
|
||||
p.x(), p.y(), p.z());
|
||||
}
|
||||
|
||||
|
||||
template < class R>
|
||||
inline
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@
|
|||
#ifndef CGAL_DETERMINANT_H
|
||||
#include <CGAL/determinant.h>
|
||||
#endif // CGAL_DETERMINANT_H
|
||||
#ifndef CGAL_PREDICATES_KERNEL_FTC2_H
|
||||
#include <CGAL/predicates/kernel_ftC2.h>
|
||||
#endif // CGAL_PREDICATES_KERNEL_FTC2_H
|
||||
#ifndef CGAL_CONSTRUCTIONS_KERNEL_FTC3_H
|
||||
#include <CGAL/constructions/kernel_ftC3.h>
|
||||
#endif // CGAL_CONSTRUCTIONS_KERNEL_FTC3_H
|
||||
|
|
@ -81,6 +84,25 @@ orientationC3(const FT &px, const FT &py, const FT &pz,
|
|||
qz-pz,rz-pz,sz-pz));
|
||||
}
|
||||
|
||||
template < class FT >
|
||||
CGAL_KERNEL_MEDIUM_INLINE
|
||||
Orientation
|
||||
coplanar_orientationC3(const FT &qx, const FT &qy, const FT &qz,
|
||||
const FT &rx, const FT &ry, const FT &rz,
|
||||
const FT &sx, const FT &sy, const FT &sz,
|
||||
const FT &px, const FT &py, const FT &pz)
|
||||
{
|
||||
Orientation oxy_qrs = orientationC2(qx,qy,rx,ry,sx,sy);
|
||||
if (oxy_qrs != COLLINEAR)
|
||||
return Orientation( oxy_qrs * orientationC2(qx,qy,rx,ry,px,py));
|
||||
Orientation oyz_qrs = orientationC2(qy,qz,ry,rz,sy,sz);
|
||||
if (oyz_qrs != COLLINEAR)
|
||||
return Orientation( oyz_qrs * orientationC2(qy,qz,ry,rz,py,pz));
|
||||
Orientation oxz_qrs = orientationC2(qx,qz,rx,rz,sx,sz);
|
||||
assert(oxz_qrs != COLLINEAR);
|
||||
return Orientation( oxz_qrs * orientationC2(qx,qz,rx,rz,px,pz));
|
||||
}
|
||||
|
||||
template < class FT >
|
||||
CGAL_KERNEL_MEDIUM_INLINE
|
||||
bool
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#endif // CGAL_BASIC_H
|
||||
#include <cassert>
|
||||
#ifndef CGAL_CARTESIAN_H
|
||||
#include <CGAL/Cartesian_3.h>
|
||||
#include <CGAL/Cartesian.h>
|
||||
#endif // CGAL_CARTESIAN_H
|
||||
#include <CGAL/leda_real.h>
|
||||
#include <CGAL/_test_3.C>
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
int
|
||||
main()
|
||||
{
|
||||
typedef CGAL::Cartesian_3<leda_real> Cls;
|
||||
typedef CGAL::Cartesian<leda_real> Cls;
|
||||
cout << "Testing 3d with Cartesian<leda_real> :" << endl;
|
||||
_test_3( Cls() );
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
3.3.3 ( 9 Sep 1999 )
|
||||
3.3.4 ( 17 Sep 1999 )
|
||||
|
|
|
|||
Loading…
Reference in New Issue