fixing the 03/06/2008 red mosaic

This commit is contained in:
Pedro Machado Manhaes de Castro 2008-06-04 07:51:25 +00:00
parent 158a455f10
commit 9b698c6039
4 changed files with 29 additions and 1 deletions

View File

@ -37,6 +37,7 @@ class SphereC3
typedef typename R_::Point_3 Point_3;
typedef typename R_::Vector_3 Vector_3;
typedef typename R_::Sphere_3 Sphere_3;
typedef typename R_::Circle_3 Circle_3;
typedef Triple<Point_3, FT, Orientation> Rep;
typedef typename R_::template Handle<Rep>::type Base;
@ -128,6 +129,7 @@ public:
//! precond: ! x.is_degenerate() (when available)
// Returns R::ON_POSITIVE_SIDE, R::ON_ORIENTED_BOUNDARY or
// R::ON_NEGATIVE_SIDE
bool has_on(const Circle_3 &p) const;
bool has_on_boundary(const Point_3 &p) const;
bool has_on_positive_side(const Point_3 &p) const;
bool has_on_negative_side(const Point_3 &p) const;
@ -180,6 +182,22 @@ bounded_side(const typename SphereC3<R>::Point_3 &p) const
squared_distance(center(),p)));
}
template < class R >
inline
bool
SphereC3<R>::
has_on(const typename SphereC3<R>::Circle_3 &c) const
{
typedef typename SphereC3<R>::Point_3 Point_3;
typedef typename SphereC3<R>::FT FT;
Point_3 proj = c.supporting_plane().projection(center());
if(!(proj == c.center())) return false;
const FT d2 = CGAL::square(center().x() - c.center().x()) +
CGAL::square(center().y() - c.center().y()) +
CGAL::square(center().z() - c.center().z());
return ((squared_radius() - d2) == c.squared_radius());
}
template < class R >
inline
bool

View File

@ -3619,6 +3619,7 @@ namespace CartesianKernelFunctors {
typedef typename K::Plane_3 Plane_3;
typedef typename K::Triangle_3 Triangle_3;
typedef typename K::Circle_3 Circle_3;
typedef typename K::Sphere_3 Sphere_3;
public:
typedef typename K::Bool_type result_type;
typedef Arity_tag< 2 > Arity;

View File

@ -247,6 +247,15 @@ public:
a.rep().orientation());
}
typename K2::Circle_3
operator()(const typename K1::Circle_3 &a) const
{
typedef typename K2::Circle_3 Circle_3;
return Circle_3(operator()(a.center()),
c(a.squared_radius()),
c(a.supporting_plane()));
}
typename K2::Triangle_3
operator()(const typename K1::Triangle_3 &a) const
{