mirror of https://github.com/CGAL/cgal
Added type Voronoi_point to both traits classes; Made class Circular_arc_2 internal of the CORE traits class (avoids conflicts if CK is included)
This commit is contained in:
parent
4cdd12eab4
commit
6d0785d1a7
|
|
@ -64,7 +64,7 @@ public:
|
|||
typedef Gt Geom_traits;
|
||||
typedef typename Geom_traits::FT FT;
|
||||
typedef typename Geom_traits::Point_2 Point;
|
||||
//typedef typename Geom_traits::Circular_arc_point_2 Circular_arc_point;
|
||||
typedef typename Geom_traits::Voronoi_point Voronoi_point;
|
||||
typedef typename Geom_traits::Hyperbolic_segment_2 Hyperbolic_segment;
|
||||
|
||||
Hyperbolic_Delaunay_triangulation_2(const Gt& gt = Gt())
|
||||
|
|
@ -477,8 +477,7 @@ public:
|
|||
Finite_edges_iterator finite_edges_begin() const { return hyperbolic_edges_begin(); }
|
||||
Finite_edges_iterator finite_edges_end() const { return hyperbolic_edges_end(); }
|
||||
|
||||
//Circular_arc_point
|
||||
Point
|
||||
Voronoi_point
|
||||
dual(Face_handle f) const
|
||||
{
|
||||
CGAL_triangulation_precondition (!this->is_non_hyperbolic(f));
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#define CGAL_HYPERBOLIC_DELAUNAY_TRIANGULATION_CK_TRAITS_2_H
|
||||
|
||||
#include <CGAL/Regular_triangulation_euclidean_traits_2.h>
|
||||
#include <CGAL/Circular_kernel_2/Intersection_traits.h>
|
||||
#include "boost/tuple/tuple.hpp"
|
||||
#include "boost/variant.hpp"
|
||||
|
||||
|
|
@ -44,6 +45,7 @@ public:
|
|||
typedef typename R::Circular_arc_2 Circular_arc_2;
|
||||
typedef typename R::Line_arc_2 Line_arc_2;
|
||||
typedef typename R::Circular_arc_point_2 Circular_arc_point_2;
|
||||
typedef Circular_arc_point_2 Voronoi_point;
|
||||
typedef typename R::Segment_2 Euclidean_segment_2; //only used internally here
|
||||
typedef boost::variant<Circular_arc_2, Line_arc_2> Hyperbolic_segment_2;
|
||||
|
||||
|
|
@ -133,9 +135,8 @@ public:
|
|||
{
|
||||
public:
|
||||
|
||||
Circular_arc_point_2 operator()(Point_2 p, Point_2 q, Point_2 r)
|
||||
Voronoi_point operator()(Point_2 p, Point_2 q, Point_2 r)
|
||||
{
|
||||
std::cout << "Computing circumcenter" << std::endl;
|
||||
Origin o;
|
||||
Point_2 po = Point_2(o);
|
||||
Circle_2 l_inf(po, FT(1));
|
||||
|
|
|
|||
|
|
@ -42,13 +42,21 @@ using std::make_pair;
|
|||
namespace CGAL {
|
||||
|
||||
|
||||
template <class R>
|
||||
|
||||
template< class Kernel >
|
||||
class Hyperbolic_Delaunay_triangulation_traits_2 {
|
||||
|
||||
typedef Hyperbolic_Delaunay_triangulation_traits_2<Kernel> Self;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
class Circular_arc_2 {
|
||||
typedef typename R::FT FT;
|
||||
typedef typename Kernel::FT FT;
|
||||
typedef Exact_complex<FT> Cplx;
|
||||
typedef typename R::Point_2 Point;
|
||||
typedef typename R::Circle_2 Circle;
|
||||
typedef typename R::Orientation_2 Orientation_2;
|
||||
typedef typename Kernel::Point_2 Point;
|
||||
typedef typename Kernel::Circle_2 Circle;
|
||||
typedef typename Kernel::Orientation_2 Orientation_2;
|
||||
|
||||
private:
|
||||
Circle _c;
|
||||
|
|
@ -105,18 +113,11 @@ public:
|
|||
}
|
||||
|
||||
Bbox_2 bbox(void) const {
|
||||
return typename R::Construct_bbox_2()(*this);
|
||||
return typename Kernel::Construct_bbox_2()(*this);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
template< class Kernel >
|
||||
class Hyperbolic_Delaunay_triangulation_traits_2 {
|
||||
|
||||
typedef Hyperbolic_Delaunay_triangulation_traits_2<Kernel> Self;
|
||||
|
||||
public:
|
||||
|
||||
typedef typename Kernel::FT FT;
|
||||
|
|
@ -124,10 +125,11 @@ public:
|
|||
typedef typename Kernel::Kernel_base Kernel_base;
|
||||
typedef typename Kernel::Point_2 Point_2;
|
||||
typedef Point_2 Point;
|
||||
typedef Point_2 Voronoi_point;
|
||||
typedef typename Kernel::Circle_2 Circle_2;
|
||||
typedef typename Kernel::Line_2 Euclidean_line_2;
|
||||
typedef boost::variant<Circle_2,Euclidean_line_2> Euclidean_circle_or_line_2;
|
||||
typedef Circular_arc_2<Kernel> Circular_arc_2;
|
||||
typedef Self::Circular_arc_2 Circular_arc_2;
|
||||
typedef typename Kernel::Segment_2 Euclidean_segment_2; //only used internally here
|
||||
typedef boost::variant<Circular_arc_2, Euclidean_segment_2> Hyperbolic_segment_2;
|
||||
|
||||
|
|
@ -846,7 +848,7 @@ public:
|
|||
class Construct_hyperbolic_circumcenter_2_base {
|
||||
public:
|
||||
|
||||
typedef Point_2 result_type;
|
||||
typedef Voronoi_point result_type;
|
||||
|
||||
Construct_hyperbolic_circumcenter_2_base() {}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue