forgot to change code before last commit (after renaming classes) fixed know -

last commit will not be compiled without error.
This commit is contained in:
Claudia Werner 2012-11-27 15:56:53 +01:00
parent cb71f8fc0b
commit 3ae19a3bca
8 changed files with 72 additions and 69 deletions

View File

@ -28,7 +28,7 @@ namespace CGAL {
template <class Gt, class Fb = Triangulation_face_base_on_sphere_2<Gt> > template <class Gt, class Fb = Triangulation_face_base_on_sphere_2<Gt> >
class Regular_triangulation_face_base_on_sphere_2 class Delaunay_triangulation_face_base_sphere_2
: public Fb : public Fb
{ {
typedef Fb Fbase; typedef Fb Fbase;
@ -42,7 +42,7 @@ public:
template < typename TDS2 > template < typename TDS2 >
struct Rebind_TDS { struct Rebind_TDS {
typedef typename Fb::template Rebind_TDS<TDS2>::Other Fb2; typedef typename Fb::template Rebind_TDS<TDS2>::Other Fb2;
typedef Regular_triangulation_face_base_on_sphere_2<Gt,Fb2> Other; typedef Delaunay_triangulation_face_base_sphere_2<Gt,Fb2> Other;
}; };
typedef std::list<Vertex_handle> Vertex_list; typedef std::list<Vertex_handle> Vertex_list;
@ -55,13 +55,13 @@ public:
void set_in_conflict_flag(unsigned char f) { _in_conflict_flag = f; } void set_in_conflict_flag(unsigned char f) { _in_conflict_flag = f; }
unsigned char get_in_conflict_flag() const { return _in_conflict_flag; } unsigned char get_in_conflict_flag() const { return _in_conflict_flag; }
Regular_triangulation_face_base_on_sphere_2() Delaunay_triangulation_face_base_sphere_2()
: Fbase(), vlist() : Fbase(), vlist()
{ {
set_in_conflict_flag(0); set_in_conflict_flag(0);
} }
Regular_triangulation_face_base_on_sphere_2(Vertex_handle v0, Delaunay_triangulation_face_base_sphere_2(Vertex_handle v0,
Vertex_handle v1, Vertex_handle v1,
Vertex_handle v2) Vertex_handle v2)
: Fbase(v0,v1,v2), vlist() : Fbase(v0,v1,v2), vlist()
@ -69,7 +69,7 @@ public:
set_in_conflict_flag(0); set_in_conflict_flag(0);
} }
Regular_triangulation_face_base_on_sphere_2(Vertex_handle v0, Delaunay_triangulation_face_base_sphere_2(Vertex_handle v0,
Vertex_handle v1, Vertex_handle v1,
Vertex_handle v2, Vertex_handle v2,
Face_handle n0, Face_handle n0,
@ -80,7 +80,7 @@ public:
set_in_conflict_flag(0); set_in_conflict_flag(0);
} }
~Regular_triangulation_face_base_on_sphere_2() ~Delaunay_triangulation_face_base_sphere_2()
{ {
vlist.clear(); vlist.clear();
} }

View File

@ -1,10 +1,10 @@
#ifndef CGAL_Regular_triangulation_on_sphere_2_H #ifndef CGAL_Delaunay_triangulation_sphere_2_H
#define CGAL_Regular_triangulation_on_sphere_2_H #define CGAL_Delaunay_triangulation_sphere_2_H
#define HOLE_APPROACH #define HOLE_APPROACH
#include <CGAL/Triangulation_on_sphere_2.h> #include <CGAL/Triangulation_on_sphere_2.h>
#include <CGAL/Regular_triangulation_face_base_on_sphere_2.h> #include <CGAL/Delaunay_triangulation_face_base_sphere_2.h>
#include <CGAL/Regular_triangulation_vertex_base_2.h> #include <CGAL/Regular_triangulation_vertex_base_2.h>
#include <CGAL/utility.h> #include <CGAL/utility.h>
#include <fstream> #include <fstream>
@ -28,12 +28,12 @@ namespace CGAL {
template < class Gt, template < class Gt,
class Tds = Triangulation_data_structure_2 < class Tds = Triangulation_data_structure_2 <
Regular_triangulation_vertex_base_2<Gt>, Regular_triangulation_vertex_base_2<Gt>,
Regular_triangulation_face_base_on_sphere_2<Gt> > > Delaunay_triangulation_face_base_sphere_2<Gt> > >
class Regular_triangulation_on_sphere_2 class Delaunay_triangulation_sphere_2
: public Triangulation_on_sphere_2<Gt,Tds> : public Triangulation_on_sphere_2<Gt,Tds>
{ {
typedef Regular_triangulation_on_sphere_2<Gt, Tds> Self; typedef Delaunay_triangulation_sphere_2<Gt, Tds> Self;
typedef Triangulation_on_sphere_2<Gt,Tds> Base; typedef Triangulation_on_sphere_2<Gt,Tds> Base;
//private: double _radius; //private: double _radius;
@ -127,7 +127,7 @@ public:
public: public:
//CONSTRUCTORS //CONSTRUCTORS
Regular_triangulation_on_sphere_2(const Gt& gt=Gt()) Delaunay_triangulation_sphere_2(const Gt& gt=Gt())
//:Base(_radius(1)) ,_minDist(pow (2, -25)), _minDistSquared( pow(_minDist, 2)), Base(Gt(gt)) //:Base(_radius(1)) ,_minDist(pow (2, -25)), _minDistSquared( pow(_minDist, 2)), Base(Gt(gt))
:Base(Gt(gt)) :Base(Gt(gt))
{} {}
@ -399,7 +399,7 @@ propagate_conflicts (const Point &p, Face_handle fh, int i,
template < class Gt, class Tds > template < class Gt, class Tds >
Oriented_side Oriented_side
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
power_test(const Face_handle &f, const Point &p, bool perturb) const power_test(const Face_handle &f, const Point &p, bool perturb) const
{ {
return power_test(f->vertex(0)->point(), f->vertex(1)->point(), f->vertex(2)->point(),p, perturb); return power_test(f->vertex(0)->point(), f->vertex(1)->point(), f->vertex(2)->point(),p, perturb);
@ -407,7 +407,7 @@ propagate_conflicts (const Point &p, Face_handle fh, int i,
template < class Gt, class Tds > template < class Gt, class Tds >
Oriented_side Oriented_side
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
power_test(const Face_handle& f, int i, const Point &p) const power_test(const Face_handle& f, int i, const Point &p) const
{ {
CGAL_triangulation_precondition ( orientation(f->vertex(ccw(i))->point(), CGAL_triangulation_precondition ( orientation(f->vertex(ccw(i))->point(),
@ -420,7 +420,7 @@ propagate_conflicts (const Point &p, Face_handle fh, int i,
template < class Gt, class Tds > template < class Gt, class Tds >
inline inline
Oriented_side Oriented_side
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
power_test(const Point &p0, const Point &p1, const Point &p2, const Point &p, bool perturb) const power_test(const Point &p0, const Point &p1, const Point &p2, const Point &p, bool perturb) const
{ {
Oriented_side os = geom_traits().power_test_2_object()(p0,p1,p2,p); Oriented_side os = geom_traits().power_test_2_object()(p0,p1,p2,p);
@ -477,7 +477,7 @@ propagate_conflicts (const Point &p, Face_handle fh, int i,
template < class Gt, class Tds > template < class Gt, class Tds >
inline inline
Oriented_side Oriented_side
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
power_test(const Point &p, const Point &q, const Point &r) const power_test(const Point &p, const Point &q, const Point &r) const
{ {
if(number_of_vertices()==2) if(number_of_vertices()==2)
@ -499,7 +499,7 @@ propagate_conflicts (const Point &p, Face_handle fh, int i,
//----------------------------------------------------------------------CHECK---------------------------------------------------------------// //----------------------------------------------------------------------CHECK---------------------------------------------------------------//
template <class Gt, class Tds> template <class Gt, class Tds>
bool bool
Regular_triangulation_on_sphere_2<Gt, Tds>:: Delaunay_triangulation_sphere_2<Gt, Tds>::
is_plane()const{ is_plane()const{
bool plane = true; bool plane = true;
@ -539,7 +539,7 @@ is_plane()const{
template < class Gt, class Tds > template < class Gt, class Tds >
bool bool
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
is_valid(bool verbose, int level ) const //int level is_valid(bool verbose, int level ) const //int level
{ {
bool result = true; bool result = true;
@ -588,7 +588,7 @@ is_valid(bool verbose, int level ) const //int level
template < class Gt, class Tds > template < class Gt, class Tds >
bool bool
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
is_valid_vertex(Vertex_handle vh, bool verbose, int level) const is_valid_vertex(Vertex_handle vh, bool verbose, int level) const
{ {
bool result = vh->face()->has_vertex(vh); bool result = vh->face()->has_vertex(vh);
@ -608,7 +608,7 @@ return true;
template < class Gt, class Tds > template < class Gt, class Tds >
bool bool
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
is_valid_face(Face_handle fh, bool verbose, int level) const is_valid_face(Face_handle fh, bool verbose, int level) const
{ {
bool result = fh->get_in_conflict_flag()==0; bool result = fh->get_in_conflict_flag()==0;
@ -629,7 +629,7 @@ is_valid_face(Face_handle fh, bool verbose, int level) const
template < class Gt, class Tds > template < class Gt, class Tds >
inline bool inline bool
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
test_conflict(const Point &p, Face_handle fh) const test_conflict(const Point &p, Face_handle fh) const
{ {
return(power_test(fh,p, true) != ON_NEGATIVE_SIDE); return(power_test(fh,p, true) != ON_NEGATIVE_SIDE);
@ -641,8 +641,8 @@ test_conflict(const Point &p, Face_handle fh) const
template < class Gt, class Tds > template < class Gt, class Tds >
typename Regular_triangulation_on_sphere_2<Gt,Tds>::Vertex_handle typename Delaunay_triangulation_sphere_2<Gt,Tds>::Vertex_handle
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
insert(const Point &p, Face_handle start) insert(const Point &p, Face_handle start)
{ {
Locate_type lt; Locate_type lt;
@ -657,8 +657,8 @@ insert(const Point &p, Face_handle start)
template < class Gt, class Tds> template < class Gt, class Tds>
typename Regular_triangulation_on_sphere_2<Gt,Tds>::Vertex_handle typename Delaunay_triangulation_sphere_2<Gt,Tds>::Vertex_handle
Regular_triangulation_on_sphere_2<Gt, Tds>:: Delaunay_triangulation_sphere_2<Gt, Tds>::
insert_in_plane_triangulation(const Point &p, Locate_type lt, Face_handle loc){ insert_in_plane_triangulation(const Point &p, Locate_type lt, Face_handle loc){
CGAL_triangulation_precondition(!test_dim_up(p)); CGAL_triangulation_precondition(!test_dim_up(p));
@ -691,7 +691,7 @@ insert_in_plane_triangulation(const Point &p, Locate_type lt, Face_handle loc){
template <class Gt, class Tds > template <class Gt, class Tds >
typename Triangulation_on_sphere_2<Gt,Tds>::Vertex_handle typename Triangulation_on_sphere_2<Gt,Tds>::Vertex_handle
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
insert_first(const Point& p) insert_first(const Point& p)
{ {
CGAL_triangulation_precondition(number_of_vertices() == 0); CGAL_triangulation_precondition(number_of_vertices() == 0);
@ -702,7 +702,7 @@ insert_first(const Point& p)
template <class Gt, class Tds > template <class Gt, class Tds >
typename Triangulation_on_sphere_2<Gt,Tds>::Vertex_handle typename Triangulation_on_sphere_2<Gt,Tds>::Vertex_handle
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
insert_second(const Point& p) insert_second(const Point& p)
{ {
CGAL_triangulation_precondition(number_of_vertices() == 1); CGAL_triangulation_precondition(number_of_vertices() == 1);
@ -714,8 +714,8 @@ insert_second(const Point& p)
template < class Gt, class Tds > template < class Gt, class Tds >
typename Regular_triangulation_on_sphere_2<Gt,Tds>::Vertex_handle typename Delaunay_triangulation_sphere_2<Gt,Tds>::Vertex_handle
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
insert(const Point &p, Locate_type lt, Face_handle loc, int li) { insert(const Point &p, Locate_type lt, Face_handle loc, int li) {
Vertex_handle v; Vertex_handle v;
@ -766,7 +766,7 @@ insert(const Point &p, Locate_type lt, Face_handle loc, int li) {
template <class Gt, class Tds > template <class Gt, class Tds >
typename Triangulation_on_sphere_2<Gt,Tds>::Vertex_handle typename Triangulation_on_sphere_2<Gt,Tds>::Vertex_handle
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
insert_outside_affine_hull_regular(const Point& p) insert_outside_affine_hull_regular(const Point& p)
{ {
if(dimension()==0){ if(dimension()==0){
@ -825,7 +825,7 @@ insert_outside_affine_hull_regular(const Point& p)
template < class Gt, class Tds > template < class Gt, class Tds >
bool bool
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
update_ghost_faces(Vertex_handle v, bool first) update_ghost_faces(Vertex_handle v, bool first)
{ {
bool neg_found=false; bool neg_found=false;
@ -879,7 +879,7 @@ update_ghost_faces(Vertex_handle v, bool first)
//-------------------------------------------------------------------------------REMOVAL----------------------------------------------------// //-------------------------------------------------------------------------------REMOVAL----------------------------------------------------//
template < class Gt, class Tds > template < class Gt, class Tds >
void void
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
remove_degree_3(Vertex_handle v, Face_handle f) remove_degree_3(Vertex_handle v, Face_handle f)
{ {
if (f == Face_handle()) f=v->face(); if (f == Face_handle()) f=v->face();
@ -891,7 +891,7 @@ remove_degree_3(Vertex_handle v, Face_handle f)
template < class Gt, class Tds > template < class Gt, class Tds >
void void
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
remove(Vertex_handle v ) remove(Vertex_handle v )
{ {
CGAL_triangulation_precondition( v != Vertex_handle() ); CGAL_triangulation_precondition( v != Vertex_handle() );
@ -910,7 +910,7 @@ CGAL_triangulation_precondition( v != Vertex_handle() );
template <class Gt, class Tds > template <class Gt, class Tds >
void void
Regular_triangulation_on_sphere_2<Gt, Tds>:: Delaunay_triangulation_sphere_2<Gt, Tds>::
remove_1D(Vertex_handle v) remove_1D(Vertex_handle v)
{ {
this->_tds.remove_1D(v); this->_tds.remove_1D(v);
@ -922,7 +922,7 @@ remove_1D(Vertex_handle v)
template < class Gt, class Tds > template < class Gt, class Tds >
void void
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
remove_2D(Vertex_handle v) remove_2D(Vertex_handle v)
{ {
CGAL_triangulation_precondition(dimension()==2); CGAL_triangulation_precondition(dimension()==2);
@ -942,7 +942,7 @@ remove_2D(Vertex_handle v)
template <class Gt, class Tds > template <class Gt, class Tds >
bool bool
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
test_dim_down(Vertex_handle v) test_dim_down(Vertex_handle v)
{ {
CGAL_triangulation_precondition(dimension()==2); CGAL_triangulation_precondition(dimension()==2);
@ -969,7 +969,7 @@ test_dim_down(Vertex_handle v)
template <class Gt, class Tds > template <class Gt, class Tds >
bool bool
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
test_dim_up(const Point &p) const{ test_dim_up(const Point &p) const{
// dimension of triangulation increase from 1 to 2 iff the new vertex in not coplanar with the old vertices // dimension of triangulation increase from 1 to 2 iff the new vertex in not coplanar with the old vertices
//std::cout<<p<<std::endl; //std::cout<<p<<std::endl;
@ -987,7 +987,7 @@ test_dim_up(const Point &p) const{
template < class Gt, class Tds > template < class Gt, class Tds >
void void
Regular_triangulation_on_sphere_2<Gt,Tds>:: Delaunay_triangulation_sphere_2<Gt,Tds>::
fill_hole_regular(std::list<Edge> & first_hole) fill_hole_regular(std::list<Edge> & first_hole)
{ {
typedef std::list<Edge> Hole; typedef std::list<Edge> Hole;
@ -1140,4 +1140,4 @@ fill_hole_regular(std::list<Edge> & first_hole)
} //namespace CGAL } //namespace CGAL
#endif // CGAL_Regular_triangulation_on_sphere_2_H #endif // CGAL_Delaunay_triangulation_sphere_2_H

View File

@ -6,7 +6,7 @@
#include <CGAL/basic.h> #include <CGAL/basic.h>
#include <CGAL/Delaunay_triangulation_sphere_traits_2.h> #include <CGAL/Delaunay_triangulation_sphere_traits_2.h>
#include <CGAL/Filtered_predicate.h> #include <CGAL/Filtered_predicate.h>
#include <CGAL/static_in_cone_ntC3.h> //#include <CGAL/static_in_cone_ntC3.h>
namespace CGAL { namespace CGAL {
@ -41,6 +41,8 @@ struct Delaunay_weighted_converter_2
} }
}; };
/*
// The argument is supposed to be a Filtered_kernel like kernel. // The argument is supposed to be a Filtered_kernel like kernel.
template < typename K > template < typename K >
class Delaunay_triangulation_sphere_filtered_traits_2 class Delaunay_triangulation_sphere_filtered_traits_2
@ -123,7 +125,7 @@ public:
// The following are inherited since they are constructions : // The following are inherited since they are constructions :
// Construct_weighted_circumcenter_2 // Construct_weighted_circumcenter_2
// Construct_radical_axis_2 // Construct_radical_axis_2
}; };*/
} //namespace CGAL } //namespace CGAL

View File

@ -1,6 +1,6 @@
#ifndef CGAL_REGULAR_TRIANGULATION_SPHERE_TRAITS_2_H #ifndef CGAL_DELAUNAY_TRIANGULATION_SPHERE_TRAITS_2_H
#define CGAL_REGULAR_TRIANGULATION_SPHERE_TRAITS_2_H #define CGAL_DELAUNAY_TRIANGULATION_SPHERE_TRAITS_2_H
#include <CGAL/number_utils_classes.h> #include <CGAL/number_utils_classes.h>
#include <CGAL/triangulation_assertions.h> #include <CGAL/triangulation_assertions.h>
@ -192,7 +192,7 @@ Power_test_2(const Point_2& sphere)
template < class R > template < class R >
class Regular_triangulation_sphere_traits_2 class Delaunay_triangulation_sphere_traits_2
: public R : public R
{ {
public: public:
@ -201,7 +201,7 @@ public:
typedef typename R::Point_3 Weighted_point_2; typedef typename R::Point_3 Weighted_point_2;
typedef Regular_triangulation_sphere_traits_2<R> Self; typedef Delaunay_triangulation_sphere_traits_2<R> Self;
typedef CGAL::Power_test_2<Self> Power_test_2; typedef CGAL::Power_test_2<Self> Power_test_2;
typedef CGAL::Orientation_sphere_2<Self> Orientation_2; typedef CGAL::Orientation_sphere_2<Self> Orientation_2;
typedef CGAL::Coradial_sphere_2<Self> Coradial_sphere_2; typedef CGAL::Coradial_sphere_2<Self> Coradial_sphere_2;
@ -213,7 +213,7 @@ public:
Regular_triangulation_sphere_traits_2(const Point_2& sphere=Point_2(0,0,0)); Delaunay_triangulation_sphere_traits_2(const Point_2& sphere=Point_2(0,0,0));
Orientation_2 Orientation_2
orientation_2_object()const orientation_2_object()const
@ -243,8 +243,8 @@ protected :
}; };
template < class R > template < class R >
Regular_triangulation_sphere_traits_2<R> :: Delaunay_triangulation_sphere_traits_2<R> ::
Regular_triangulation_sphere_traits_2(const Point_2& sphere) Delaunay_triangulation_sphere_traits_2(const Point_2& sphere)
: _sphere(sphere) : _sphere(sphere)
{} {}

View File

@ -10,8 +10,8 @@
#include <CGAL/Delaunay_triangulation_sphere_traits_2.h> #include <CGAL/Delaunay_triangulation_sphere_traits_2.h>
#include <CGAL/Delaunay_triangulation_sphere_filtered_traits_2.h> #include <CGAL/Delaunay_triangulation_sphere_filtered_traits_2.h>
#include <CGAL/Regular_triangulation_sphere_traits_2.h> #include <CGAL/Delaunay_triangulation_sphere_traits_2.h>
#include <CGAL/Regular_triangulation_on_sphere_2.h> #include <CGAL/Delaunay_triangulation_sphere_2.h>
#include <CGAL/Random.h> #include <CGAL/Random.h>
#include <CGAL/Timer.h> #include <CGAL/Timer.h>
@ -25,8 +25,8 @@
#include <CGAL/Triangulation_2.h> #include <CGAL/Triangulation_2.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Regular_triangulation_sphere_traits_2<K> Gt; typedef CGAL::Delaunay_triangulation_sphere_traits_2<K> Gt;
typedef CGAL::Regular_triangulation_on_sphere_2<Gt> RTOS; typedef CGAL::Delaunay_triangulation_sphere_2<Gt> RTOS;
//typedef CGAL::Triangulation_2<Gt> RTOS; //typedef CGAL::Triangulation_2<Gt> RTOS;
typedef RTOS::Vertex_handle Vertex_handle; typedef RTOS::Vertex_handle Vertex_handle;
typedef RTOS::Face_handle Face_handle; typedef RTOS::Face_handle Face_handle;

View File

@ -1,7 +1,7 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Regular_triangulation_sphere_traits_2.h> #include <CGAL/Delaunay_triangulation_sphere_traits_2.h>
//#include <CGAL/Projection_sphere_traits_3.h> //#include <CGAL/Projection_sphere_traits_3.h>
#include <CGAL/Regular_triangulation_on_sphere_2.h> #include <CGAL/Delaunay_triangulation_sphere_2.h>
#include <CGAL/point_generators_3.h> #include <CGAL/point_generators_3.h>
#include <CGAL/point_generators_2.h> #include <CGAL/point_generators_2.h>
#include <fstream> #include <fstream>
@ -11,9 +11,9 @@
#include <cmath> #include <cmath>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Regular_triangulation_sphere_traits_2<K> Gt; typedef CGAL::Delaunay_triangulation_sphere_traits_2<K> Gt;
//typedef CGAL::Projection_sphere_traits_3<K> Gt; //typedef CGAL::Projection_sphere_traits_3<K> Gt;
typedef CGAL::Regular_triangulation_on_sphere_2<Gt> RTOS; typedef CGAL::Delaunay_triangulation_sphere_2<Gt> RTOS;
typedef RTOS::Vertex_handle Vertex_handle; typedef RTOS::Vertex_handle Vertex_handle;
typedef RTOS::Face_handle Face_handle; typedef RTOS::Face_handle Face_handle;
typedef RTOS::Point Point; typedef RTOS::Point Point;

View File

@ -1,10 +1,10 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Regular_triangulation_sphere_traits_2.h> #include <CGAL/Delaunay_triangulation_sphere_traits_2.h>
#include <CGAL/enum.h> #include <CGAL/enum.h>
#include <fstream> #include <fstream>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Regular_triangulation_sphere_traits_2<K> Gt; typedef CGAL::Delaunay_triangulation_sphere_traits_2<K> Gt;
typedef Gt::Point_2 Point; typedef Gt::Point_2 Point;
typedef Gt::Orientation_2 Orientation_2; typedef Gt::Orientation_2 Orientation_2;
typedef Gt::Power_test_2 Power_test_2; typedef Gt::Power_test_2 Power_test_2;

View File

@ -1,15 +1,16 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Triangulation_on_sphere_2.h> #include <CGAL/Triangulation_on_sphere_2.h>
#include <CGAL/Triangulation_sphere_traits_2.h> #include <CGAL/Delaunay_triangulation_sphere_traits_2.h>
#include <CGAL/enum.h> #include <CGAL/enum.h>
#include <CGAL/point_generators_3.h> #include <CGAL/point_generators_3.h>
#include <CGAL/number_utils.h> #include <CGAL/number_utils.h>
#include <fstream> #include <fstream>
int main(){}
/*
typedef CGAL::Exact_predicates_inexact_constructions_kernel K; typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Triangulation_sphere_traits_2<K> Gt; typedef CGAL::Delaunay_triangulation_sphere_traits_2<K> Gt;
typedef CGAL::Triangulation_on_sphere_2<Gt> TOS; typedef CGAL::Triangulation_on_sphere_2<Gt> TOS;
@ -60,9 +61,9 @@ int main(){
//std::ofstream hpts2("hpts2.off"); //std::ofstream hpts2("hpts2.off");
/*--------------------------*/ //--------------------------//
// TEST INPUTS // // TEST INPUTS //
/*--------------------------*/ //--------------------------//
// SPHERES // SPHERES
Point S1=Point(0,0,0); Point S1=Point(0,0,0);
@ -419,9 +420,9 @@ int main(){
assert(tr_2_s.xy_equal(Loc_result->vertex(li)->point(),P13)); assert(tr_2_s.xy_equal(Loc_result->vertex(li)->point(),P13));
/*--------------------------*/ //--------------------------//
// REMOVAL // // REMOVAL //
/*--------------------------*/ //--------------------------//
// DIM 2 // DIM 2
// DIM 0 // DIM 0
// DIM 1 // DIM 1
@ -435,7 +436,7 @@ Stream &write_triangulation_to_off_2(Stream &out,Stream &out2, Triangulation &t)
// Points of triangulation // Points of triangulation
for (Face_iterator it = t.faces_begin(); it != t.faces_end(); it++) { for (Face_iterator it = t.faces_begin(); it != t.faces_end(); it++) {
if(!it->is_negative() if(!it->is_negative()
/*(t.orientation(it->vertex(0)->point(),it->vertex(1)->point(),it->vertex(2)->point())==1)*/ //(t.orientation(it->vertex(0)->point(),it->vertex(1)->point(),it->vertex(2)->point())==1)//
){ ){
for (int i=0 ; i<3 ; i++) { for (int i=0 ; i<3 ; i++) {
if(it->vertex(i)!=Vertex_handle()) if(it->vertex(i)!=Vertex_handle())
@ -527,5 +528,5 @@ Stream &write_vertices(Stream &out, Triangulation &t)
<< p.y() << " " << p.y() << " "
<< p.z() << std::endl; << p.z() << std::endl;
} }*/
} //}