renamed torus to dupin cyclide

This commit is contained in:
Eric Berberich 2008-01-28 10:15:02 +00:00
parent 0bfaba68c1
commit aa67e8c997
5 changed files with 116 additions and 102 deletions

View File

@ -18,11 +18,11 @@
// Author(s) : Baruch Zukerman <baruchzu@post.tau.ac.il> // Author(s) : Baruch Zukerman <baruchzu@post.tau.ac.il>
// Ron Wein <wein@post.tau.ac.il> // Ron Wein <wein@post.tau.ac.il>
#ifndef CGAL_ARR_TORUS_BATCHED_PL_HELPER_H #ifndef CGAL_ARR_DUPIN_CYCLIDE_BATCHED_PL_HELPER_H
#define CGAL_ARR_TORUS_BATCHED_PL_HELPER_H #define CGAL_ARR_DUPIN_CYCLIDE_BATCHED_PL_HELPER_H
/*! /*!
* Definition of the Arr_torus_batched_pl_helper class-template. * Definition of the Arr_dupin_cyclide_batched_pl_helper class-template.
*/ */
#include <CGAL/basic.h> #include <CGAL/basic.h>
@ -31,13 +31,13 @@ CGAL_BEGIN_NAMESPACE
#include <CGAL/Sweep_line_empty_visitor.h> #include <CGAL/Sweep_line_empty_visitor.h>
/*! \class Arr_torus_batched_pl_helper /*! \class Arr_dupin_cyclide_batched_pl_helper
* A helper class for the batched point-location sweep-line visitor, suitable * A helper class for the batched point-location sweep-line visitor, suitable
* for an Arrangement_on_surface_2 instantiated with a topology-traits class * for an Arrangement_on_surface_2 instantiated with a topology-traits class
* for unbounded curves in the plane. * for unbounded curves in the plane.
*/ */
template <class Traits_, class Arrangement_> template <class Traits_, class Arrangement_>
class Arr_torus_batched_pl_helper class Arr_dupin_cyclide_batched_pl_helper
{ {
public: public:
@ -68,7 +68,7 @@ public:
* Constructor. * Constructor.
* \param arr The arrangement. * \param arr The arrangement.
*/ */
Arr_torus_batched_pl_helper (const Arrangement_2 *arr) : Arr_dupin_cyclide_batched_pl_helper (const Arrangement_2 *arr) :
m_top_traits (arr->topology_traits()) m_top_traits (arr->topology_traits())
{} {}
@ -91,7 +91,7 @@ public:
#if 0 #if 0
return (m_top_fict->face()); return (m_top_fict->face());
#endif #endif
CGAL_error_msg( "Arr_torus_batched_pl_helper::top_face not yet implemented" ); CGAL_error_msg( "Arr_dupin_cyclide_batched_pl_helper::top_face not yet implemented" );
return; return;
} }
}; };
@ -104,7 +104,7 @@ public:
// A notification issued before the sweep process starts. // A notification issued before the sweep process starts.
// //
template <class Tr, class Arr> template <class Tr, class Arr>
void Arr_torus_batched_pl_helper<Tr, Arr>::before_sweep () void Arr_dupin_cyclide_batched_pl_helper<Tr, Arr>::before_sweep ()
{ {
#if 0 #if 0
// Initialize the fictitious halfedge lying on the top edge of the // Initialize the fictitious halfedge lying on the top edge of the
@ -129,7 +129,7 @@ void Arr_torus_batched_pl_helper<Tr, Arr>::before_sweep ()
return; return;
#endif #endif
CGAL_error_msg( "Arr_torus_batched_pl_helper::before_sweep not yet implemented" ); CGAL_error_msg( "Arr_dupin_cyclide_batched_pl_helper::before_sweep not yet implemented" );
return; return;
} }
@ -138,7 +138,7 @@ void Arr_torus_batched_pl_helper<Tr, Arr>::before_sweep ()
// event. // event.
// //
template <class Tr, class Arr> template <class Tr, class Arr>
void Arr_torus_batched_pl_helper<Tr, Arr>::after_handle_event void Arr_dupin_cyclide_batched_pl_helper<Tr, Arr>::after_handle_event
(Event* event) (Event* event)
{ {
#if 0 #if 0
@ -156,10 +156,11 @@ void Arr_torus_batched_pl_helper<Tr, Arr>::after_handle_event
return; return;
#endif #endif
CGAL_error_msg( "Arr_torus_batched_pl_helper::after_handle_event not yet implemenet" ); CGAL_error_msg( "Arr_dupin_cyclide_batched_pl_helper::after_handle_event not yet implemenet" );
return; return;
} }
CGAL_END_NAMESPACE CGAL_END_NAMESPACE
#endif // ARR_TORUS_BATCHED_PL_HELPER #endif // ARR_DUPIN_CYCLIDE_BATCHED_PL_HELPER
// EOF

View File

@ -21,11 +21,11 @@
// Efi Fogel <efif@post.tau.ac.il> // Efi Fogel <efif@post.tau.ac.il>
// Eric Berberich <eric@mpi-inf.mpg.de> // Eric Berberich <eric@mpi-inf.mpg.de>
#ifndef CGAL_ARR_TORUS_CONSTRUCTION_HELPER_H #ifndef CGAL_ARR_DUPIN_CYCLIDE_CONSTRUCTION_HELPER_H
#define CGAL_ARR_TORUS_CONSTRUCTION_HELPER_H #define CGAL_ARR_DUPIN_CYCLIDE_CONSTRUCTION_HELPER_H
/*! \file /*! \file
* Definition of the Arr_torus_construction_helper class-template. * Definition of the Arr_dupin_cyclide_construction_helper class-template.
*/ */
#include <CGAL/Sweep_line_empty_visitor.h> #include <CGAL/Sweep_line_empty_visitor.h>
@ -33,13 +33,13 @@
CGAL_BEGIN_NAMESPACE CGAL_BEGIN_NAMESPACE
/*! \class Arr_torus_construction_helper /*! \class Arr_dupin_cyclide_construction_helper
* A helper class for the construction sweep-line visitor, suitable * A helper class for the construction sweep-line visitor, suitable
* for an Arrangement_on_surface_2 instantiated with a topology-traits class * for an Arrangement_on_surface_2 instantiated with a topology-traits class
* for curves on an ellipsoid * for curves on an ellipsoid
*/ */
template <class Traits_, class Arrangement_, class Event_, class Subcurve_> template <class Traits_, class Arrangement_, class Event_, class Subcurve_>
class Arr_torus_construction_helper class Arr_dupin_cyclide_construction_helper
{ {
public: public:
typedef Traits_ Traits_2; typedef Traits_ Traits_2;
@ -85,14 +85,14 @@ protected:
public: public:
/*! Constructor. */ /*! Constructor. */
Arr_torus_construction_helper(Arrangement_2 * arr) : Arr_dupin_cyclide_construction_helper(Arrangement_2 * arr) :
m_top_traits(arr->topology_traits()), m_top_traits(arr->topology_traits()),
m_arr_access(*arr), m_arr_access(*arr),
m_he_ind_map_p(NULL) m_he_ind_map_p(NULL)
{} {}
/*! Destructor. */ /*! Destructor. */
virtual ~Arr_torus_construction_helper() {} virtual ~Arr_dupin_cyclide_construction_helper() {}
/// \name Notification functions. /// \name Notification functions.
//@{ //@{
@ -334,4 +334,4 @@ public:
CGAL_END_NAMESPACE CGAL_END_NAMESPACE
#endif // CGAL_ARR_TORUS_CONSTRUCTION_HELPER #endif // CGAL_ARR_DUPIN_CYCLIDE_CONSTRUCTION_HELPER

View File

@ -20,26 +20,26 @@
// Ron Wein <wein@post.tau.ac.il> // Ron Wein <wein@post.tau.ac.il>
// Eric Berberich <eric@mpi-inf.mpg.de> // Eric Berberich <eric@mpi-inf.mpg.de>
#ifndef CGAL_ARR_TORUS_INSERTION_HELPER_H #ifndef CGAL_ARR_DUPIN_CYCLIDE_INSERTION_HELPER_H
#define CGAL_ARR_TORUS_INSERTION_HELPER_H #define CGAL_ARR_DUPIN_CYCLIDE_INSERTION_HELPER_H
/*! /*!
* Definition of the Arr_torus_insertion_helper class-template. * Definition of the Arr_dupin_cyclide_insertion_helper class-template.
*/ */
#include <CGAL/Sweep_line_2/Arr_construction_sl_visitor.h> #include <CGAL/Sweep_line_2/Arr_construction_sl_visitor.h>
#include <CGAL/Arr_topology_traits/Arr_torus_construction_helper.h> #include <CGAL/Arr_topology_traits/Arr_dupin_cyclide_construction_helper.h>
CGAL_BEGIN_NAMESPACE CGAL_BEGIN_NAMESPACE
/*! \class Arr_torus_insertion_helper /*! \class Arr_dupin_cyclide_insertion_helper
* A helper class for the insertion sweep-line visitors, suitable * A helper class for the insertion sweep-line visitors, suitable
* for an Arrangement_on_surface_2 instantiated with a topology-traits class * for an Arrangement_on_surface_2 instantiated with a topology-traits class
* for unbounded curves in the plane. * for unbounded curves in the plane.
*/ */
template <class Traits_, class Arrangement_, class Event_, class Subcurve_> template <class Traits_, class Arrangement_, class Event_, class Subcurve_>
class Arr_torus_insertion_helper : class Arr_dupin_cyclide_insertion_helper :
public Arr_torus_construction_helper<Traits_, Arrangement_, public Arr_dupin_cyclide_construction_helper<Traits_, Arrangement_,
Event_, Subcurve_> Event_, Subcurve_>
{ {
public: public:
@ -53,7 +53,7 @@ public:
typedef typename Traits_2::Point_2 Point_2; typedef typename Traits_2::Point_2 Point_2;
typedef Arr_torus_construction_helper<Traits_2, typedef Arr_dupin_cyclide_construction_helper<Traits_2,
Arrangement_2, Arrangement_2,
Event, Event,
Subcurve> Base; Subcurve> Base;
@ -62,7 +62,7 @@ public:
Subcurve, Subcurve,
Event> Base_visitor; Event> Base_visitor;
typedef Arr_torus_insertion_helper<Traits_2, typedef Arr_dupin_cyclide_insertion_helper<Traits_2,
Arrangement_2, Arrangement_2,
Event, Event,
Subcurve> Self; Subcurve> Self;
@ -83,12 +83,12 @@ protected:
public: public:
/*! Constructor. */ /*! Constructor. */
Arr_torus_insertion_helper (Arrangement_2 *arr) : Arr_dupin_cyclide_insertion_helper (Arrangement_2 *arr) :
Base (arr) Base (arr)
{} {}
/*! Destructor. */ /*! Destructor. */
virtual ~Arr_torus_insertion_helper(){} virtual ~Arr_dupin_cyclide_insertion_helper(){}
/// \name Notification functions. /// \name Notification functions.
//@{ //@{
@ -112,7 +112,7 @@ public:
// A notification issued before the sweep process starts. // A notification issued before the sweep process starts.
// //
template <class Tr, class Arr, class Evnt, class Sbcv> template <class Tr, class Arr, class Evnt, class Sbcv>
void Arr_torus_insertion_helper<Tr,Arr,Evnt,Sbcv>::before_sweep () void Arr_dupin_cyclide_insertion_helper<Tr,Arr,Evnt,Sbcv>::before_sweep ()
{ {
this->m_top_face = Face_handle(this->m_top_traits->bottom_face()); this->m_top_face = Face_handle(this->m_top_traits->bottom_face());
} }
@ -122,7 +122,7 @@ void Arr_torus_insertion_helper<Tr,Arr,Evnt,Sbcv>::before_sweep ()
// event. // event.
// //
template <class Tr, class Arr, class Evnt, class Sbcv> template <class Tr, class Arr, class Evnt, class Sbcv>
void Arr_torus_insertion_helper<Tr,Arr,Evnt,Sbcv>::before_handle_event void Arr_dupin_cyclide_insertion_helper<Tr,Arr,Evnt,Sbcv>::before_handle_event
(Event* event) (Event* event)
{ {
// Ignore events that do not have boundary conditions. // Ignore events that do not have boundary conditions.
@ -184,4 +184,5 @@ void Arr_torus_insertion_helper<Tr,Arr,Evnt,Sbcv>::before_handle_event
CGAL_END_NAMESPACE CGAL_END_NAMESPACE
#endif #endif // CGAL_ARR_DUPIN_CYCLIDE_INSERTION_HELPER_H
// EOF

View File

@ -18,18 +18,18 @@
// Author(s) : Eric Berberich <erric@mpi-inf.mpg.de> // Author(s) : Eric Berberich <erric@mpi-inf.mpg.de>
// Ron Wein <wein@post.tau.ac.il> // Ron Wein <wein@post.tau.ac.il>
#ifndef CGAL_ARR_TORUS_OVERLAY_HELPER_H #ifndef CGAL_ARR_DUPIN_CYCLIDE_OVERLAY_HELPER_H
#define CGAL_ARR_TORUS_OVERLAY_HELPER_H #define CGAL_ARR_DUPIN_CYCLIDE_OVERLAY_HELPER_H
/*! /*!
* Definition of the Arr_torus_overlay_helper class-template. * Definition of the Arr_dupin_cyclide_overlay_helper class-template.
*/ */
#include <CGAL/Arr_topology_traits/Arr_torus_construction_helper.h> #include <CGAL/Arr_topology_traits/Arr_dupin_cyclide_construction_helper.h>
CGAL_BEGIN_NAMESPACE CGAL_BEGIN_NAMESPACE
/*! \class Arr_torus_overlay_helper /*! \class Arr_dupin_cyclide_overlay_helper
* A helper class for the overlay sweep-line visitor, suitable for the overlay * A helper class for the overlay sweep-line visitor, suitable for the overlay
* of Arrangement_on_surface_2 objects instantiated with a topology-traits * of Arrangement_on_surface_2 objects instantiated with a topology-traits
* class for unbounded curves in the plane. * class for unbounded curves in the plane.
@ -40,7 +40,7 @@ template <class Traits_,
class Arrangement_, class Arrangement_,
class Event_, class Event_,
class Subcurve_> class Subcurve_>
class Arr_torus_overlay_helper class Arr_dupin_cyclide_overlay_helper
{ {
public: public:
@ -67,7 +67,7 @@ public:
Vertex_handle_blue; Vertex_handle_blue;
// Define the helper class for the construction visitor. // Define the helper class for the construction visitor.
typedef Arr_torus_construction_helper<Traits_2, typedef Arr_dupin_cyclide_construction_helper<Traits_2,
Arrangement_2, Arrangement_2,
Event, Event,
Subcurve> Construction_helper; Subcurve> Construction_helper;
@ -86,7 +86,7 @@ protected:
public: public:
/*! Constructor, given the input red and blue arrangements. */ /*! Constructor, given the input red and blue arrangements. */
Arr_torus_overlay_helper (const Arrangement_red_2 *red_arr, Arr_dupin_cyclide_overlay_helper (const Arrangement_red_2 *red_arr,
const Arrangement_blue_2 *blue_arr) : const Arrangement_blue_2 *blue_arr) :
m_red_top_traits (red_arr->topology_traits()), m_red_top_traits (red_arr->topology_traits()),
m_blue_top_traits (blue_arr->topology_traits()) m_blue_top_traits (blue_arr->topology_traits())
@ -213,4 +213,4 @@ public:
CGAL_END_NAMESPACE CGAL_END_NAMESPACE
#endif #endif // CGAL_ARR_DUPIN_CYCLIDE_OVERLAY_HELPER_H

View File

@ -18,12 +18,12 @@
// Author(s) : Eric Berberich <eric@mpi-inf.mpg.de> // Author(s) : Eric Berberich <eric@mpi-inf.mpg.de>
// Ron Wein <wein@post.tau.ac.il> // Ron Wein <wein@post.tau.ac.il>
#ifndef CGAL_ARR_TORUS_TOPOLOGY_TRAITS_2_IMPL_H #ifndef CGAL_ARR_DUPIN_CYCLIDE_TOPOLOGY_TRAITS_2_IMPL_H
#define CGAL_ARR_TORUS_TOPOLOGY_TRAITS_2_IMPL_H #define CGAL_ARR_DUPIN_CYCLIDE_TOPOLOGY_TRAITS_2_IMPL_H
/*! \file /*! \file
* Member-function definitions for the * Member-function definitions for the
* Arr_torus_topology_traits_2<GeomTraits> class. * Arr_dupin_cyclide_topology_traits_2<GeomTraits> class.
*/ */
CGAL_BEGIN_NAMESPACE CGAL_BEGIN_NAMESPACE
@ -32,8 +32,8 @@ CGAL_BEGIN_NAMESPACE
// Default constructor. // Default constructor.
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
Arr_torus_topology_traits_2<GeomTraits, Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::
Arr_torus_topology_traits_2() : Arr_dupin_cyclide_topology_traits_2() :
_m_own_traits (true), _m_own_traits (true),
_m_f_top(NULL) _m_f_top(NULL)
{ {
@ -48,8 +48,8 @@ Arr_torus_topology_traits_2() :
// Constructor with a geometry-traits class. // Constructor with a geometry-traits class.
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
Arr_torus_topology_traits_2<GeomTraits, Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::
Arr_torus_topology_traits_2 (Geometry_traits_2 *tr) : Arr_dupin_cyclide_topology_traits_2 (Geometry_traits_2 *tr) :
_m_own_traits(false), _m_own_traits(false),
_m_f_top(NULL) _m_f_top(NULL)
{ {
@ -64,10 +64,10 @@ Arr_torus_topology_traits_2 (Geometry_traits_2 *tr) :
// Assign the contents of another topology-traits class. // Assign the contents of another topology-traits class.
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
void Arr_torus_topology_traits_2<GeomTraits, Dcel_>::assign (const Self& other) void Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::
{ assign(const Self& other) {
// status: correct // status: correct
//std::cout << "Arr_torus_topology_traits_2 assign" << std::endl; //std::cout << "Arr_dupin_cyclide_topology_traits_2 assign" << std::endl;
// Assign the class. // Assign the class.
// Clear the current DCEL and duplicate the other DCEL. // Clear the current DCEL and duplicate the other DCEL.
@ -94,7 +94,7 @@ void Arr_torus_topology_traits_2<GeomTraits, Dcel_>::assign (const Self& other)
// Make the necessary updates after the DCEL structure have been updated. // Make the necessary updates after the DCEL structure have been updated.
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
void Arr_torus_topology_traits_2<GeomTraits, Dcel_>::dcel_updated () void Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::dcel_updated ()
{ {
// status: missing location of f_top // status: missing location of f_top
@ -245,10 +245,10 @@ void Arr_torus_topology_traits_2<GeomTraits, Dcel_>::dcel_updated ()
// Initialize an empty DCEL structure. // Initialize an empty DCEL structure.
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
void Arr_torus_topology_traits_2<GeomTraits, Dcel_>::init_dcel () void Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::init_dcel ()
{ {
// status: correct // status: correct
//std::cout << "Arr_torus_topology_traits_2 init_dcel" //std::cout << "Arr_dupin_cyclide_topology_traits_2 init_dcel"
// << std::endl; // << std::endl;
// Clear the current DCEL. // Clear the current DCEL.
@ -277,11 +277,11 @@ void Arr_torus_topology_traits_2<GeomTraits, Dcel_>::init_dcel ()
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
Comparison_result Comparison_result
Arr_torus_topology_traits_2<GeomTraits, Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::
compare_y_at_x (const Point_2& p, const Halfedge* he) const compare_y_at_x (const Point_2& p, const Halfedge* he) const
{ {
// status: correct // status: correct
//std::cout << "Arr_torus_topology_traits_2 compare_y_at_x" //std::cout << "Arr_dupin_cyclide_topology_traits_2 compare_y_at_x"
// << std::endl; // << std::endl;
// all edges are valid, therefore just compare p to its associated curve. // all edges are valid, therefore just compare p to its associated curve.
@ -292,13 +292,13 @@ compare_y_at_x (const Point_2& p, const Halfedge* he) const
// Check if the given vertex is associated with the given curve end. // Check if the given vertex is associated with the given curve end.
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
bool Arr_torus_topology_traits_2<GeomTraits, Dcel_>:: bool Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::
are_equal (const Vertex *v, are_equal (const Vertex *v,
const X_monotone_curve_2& cv, Arr_curve_end ind, const X_monotone_curve_2& cv, Arr_curve_end ind,
Arr_parameter_space ps_x, Arr_parameter_space ps_y) const Arr_parameter_space ps_x, Arr_parameter_space ps_y) const
{ {
// status: correct // status: correct
//std::cout << "Arr_torus_topology_traits_2 are_equal" //std::cout << "Arr_dupin_cyclide_topology_traits_2 are_equal"
// << std::endl; // << std::endl;
CGAL_precondition(_valid(ps_x, ps_y)); CGAL_precondition(_valid(ps_x, ps_y));
@ -346,13 +346,13 @@ are_equal (const Vertex *v,
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
CGAL::Object CGAL::Object
Arr_torus_topology_traits_2<GeomTraits, Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::
place_boundary_vertex (Face *f, place_boundary_vertex (Face *f,
const X_monotone_curve_2& cv, Arr_curve_end ind, const X_monotone_curve_2& cv, Arr_curve_end ind,
Arr_parameter_space ps_x, Arr_parameter_space ps_y) Arr_parameter_space ps_x, Arr_parameter_space ps_y)
{ {
// status: correct // status: correct
//std::cout << "Arr_torus_topology_traits_2 place_boundary_vertex" //std::cout << "Arr_dupin_cyclide_topology_traits_2 place_boundary_vertex"
// << std::endl; // << std::endl;
CGAL_precondition(_valid(ps_x, ps_y)); CGAL_precondition(_valid(ps_x, ps_y));
@ -397,15 +397,16 @@ place_boundary_vertex (Face *f,
// vertex with boundary conditions. // vertex with boundary conditions.
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
typename Arr_torus_topology_traits_2<GeomTraits,Dcel_>::Halfedge* typename Arr_dupin_cyclide_topology_traits_2<GeomTraits,Dcel_>::Halfedge*
Arr_torus_topology_traits_2<GeomTraits,Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits,Dcel_>::
locate_around_boundary_vertex (Vertex *v, locate_around_boundary_vertex (Vertex *v,
const X_monotone_curve_2& cv, Arr_curve_end ind, const X_monotone_curve_2& cv, Arr_curve_end ind,
Arr_parameter_space ps_x, Arr_parameter_space ps_x,
Arr_parameter_space ps_y) const Arr_parameter_space ps_y) const
{ {
// status: correct // status: correct
//std::cout << "Arr_torus_topology_traits_2 locate_around_boundary_vertex" //std::cout << "Arr_dupin_cyclide_topology_traits_2 "
// << "locate_around_boundary_vertex"
// << std::endl; // << std::endl;
CGAL_precondition(_valid(ps_x, ps_y)); CGAL_precondition(_valid(ps_x, ps_y));
@ -502,7 +503,7 @@ locate_around_boundary_vertex (Vertex *v,
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
void void
Arr_torus_topology_traits_2<GeomTraits,Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits,Dcel_>::
notify_on_boundary_vertex_creation (Vertex *v, notify_on_boundary_vertex_creation (Vertex *v,
const X_monotone_curve_2& cv, const X_monotone_curve_2& cv,
Arr_curve_end ind, Arr_curve_end ind,
@ -510,7 +511,7 @@ notify_on_boundary_vertex_creation (Vertex *v,
Arr_parameter_space ps_y) const Arr_parameter_space ps_y) const
{ {
// status: correct // status: correct
//std::cout << "Arr_torus_topology_traits_2::" //std::cout << "Arr_dupin_cyclide_topology_traits_2::"
// << "notify_on_boundary_vertex_creation" // << "notify_on_boundary_vertex_creation"
// << std::endl; // << std::endl;
@ -612,16 +613,16 @@ notify_on_boundary_vertex_creation (Vertex *v,
// Locate curve end with respect to dcel // Locate curve end with respect to dcel
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
CGAL::Object CGAL::Object
Arr_torus_topology_traits_2<GeomTraits,Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits,Dcel_>::
locate_curve_end (const X_monotone_curve_2& cv, Arr_curve_end ind, locate_curve_end (const X_monotone_curve_2& cv, Arr_curve_end ind,
Arr_parameter_space ps_x, Arr_parameter_space ps_y) const Arr_parameter_space ps_x, Arr_parameter_space ps_y) const
{ {
// status: to implement // status: to implement
//std::cout << "Arr_torus_topology_traits_2 locate_curve_end" //std::cout << "Arr_dupin_cyclide_topology_traits_2 locate_curve_end"
// << std::endl; // << std::endl;
CGAL_precondition(_valid(ps_x, ps_y)); CGAL_precondition(_valid(ps_x, ps_y));
// torus does not contain unbounded curves // dupin_cyclide does not contain unbounded curves
Vertex* v = NULL; Vertex* v = NULL;
typename Identification_NS::iterator ns_it; typename Identification_NS::iterator ns_it;
@ -678,13 +679,14 @@ locate_curve_end (const X_monotone_curve_2& cv, Arr_curve_end ind,
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
std::pair<bool, bool> std::pair<bool, bool>
Arr_torus_topology_traits_2<GeomTraits,Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits,Dcel_>::
face_split_after_edge_insertion (const Halfedge *prev1, face_split_after_edge_insertion (const Halfedge *prev1,
const Halfedge *prev2, const Halfedge *prev2,
const X_monotone_curve_2& cv) const const X_monotone_curve_2& cv) const
{ {
// status: correct // status: correct
//std::cout << "Arr_torus_topology_traits_2 face_split" << std::endl; //std::cout << "Arr_dupin_cyclide_topology_traits_2 face_split"
// << std::endl;
CGAL_precondition (prev1->is_on_inner_ccb()); CGAL_precondition (prev1->is_on_inner_ccb());
CGAL_precondition (prev2->is_on_inner_ccb()); CGAL_precondition (prev2->is_on_inner_ccb());
@ -700,7 +702,7 @@ face_split_after_edge_insertion (const Halfedge *prev1,
// TODO use arr function for to check perimetry // TODO use arr function for to check perimetry
bool perimetric = (sign_12 != CGAL::ZERO && sign_21 != CGAL::ZERO); bool perimetric = (sign_12 != CGAL::ZERO && sign_21 != CGAL::ZERO);
// on a torus except for one case, there is a face split // on a dupin_cyclide except for one case, there is a face split
if (perimetric) { if (perimetric) {
// must be topface // must be topface
if (prev1->inner_ccb()->face() == top_face()) { if (prev1->inner_ccb()->face() == top_face()) {
@ -730,18 +732,19 @@ face_split_after_edge_insertion (const Halfedge *prev1,
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
bool bool
Arr_torus_topology_traits_2<GeomTraits,Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits,Dcel_>::
hole_creation_after_edge_removal (const Halfedge *he) const hole_creation_after_edge_removal (const Halfedge *he) const
{ {
// status: to implement // status: to implement
std::cout << "Arr_torus_topology_traits_2 hole_creation" << std::endl; std::cout << "Arr_dupin_cyclide_topology_traits_2 hole_creation"
<< std::endl;
CGAL_error(); // hole_creation not finally implemented for torus CGAL_error(); // hole_creation not finally implemented for dupin_cyclide
CGAL_precondition (! he->is_on_inner_ccb()); CGAL_precondition (! he->is_on_inner_ccb());
CGAL_precondition (! he->opposite()->is_on_inner_ccb()); CGAL_precondition (! he->opposite()->is_on_inner_ccb());
// TODO hole_creation for torus // TODO hole_creation for dupin_cyclide
// TODO use arr function for to check perimetry // TODO use arr function for to check perimetry
@ -782,7 +785,8 @@ hole_creation_after_edge_removal (const Halfedge *he) const
return (true); return (true);
} }
// else // else
// In this case we disconnect a perimetric cycle around the torus, // In this case we disconnect a perimetric cycle
// around the dupin_cyclide,
// causing two perimetric faces to merge. // causing two perimetric faces to merge.
// The remainder of the cycle // The remainder of the cycle
// becomes an inner CCB (a hole) in the merged face. // becomes an inner CCB (a hole) in the merged face.
@ -800,13 +804,13 @@ hole_creation_after_edge_removal (const Halfedge *he) const
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
bool bool
Arr_torus_topology_traits_2<GeomTraits,Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits,Dcel_>::
is_on_new_perimetric_face_boundary (const Halfedge *prev1, is_on_new_perimetric_face_boundary (const Halfedge *prev1,
const Halfedge *prev2, const Halfedge *prev2,
const X_monotone_curve_2& cv) const const X_monotone_curve_2& cv) const
{ {
// status: correct // status: correct
//std::cout << "Arr_torus_topology_traits_2::" //std::cout << "Arr_dupin_cyclide_topology_traits_2::"
// << "is_on_new_perimetric_face_boundary" // << "is_on_new_perimetric_face_boundary"
// << std::endl; // << std::endl;
@ -830,11 +834,12 @@ is_on_new_perimetric_face_boundary (const Halfedge *prev1,
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
bool bool
Arr_torus_topology_traits_2<GeomTraits,Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits,Dcel_>::
boundaries_of_same_face (const Halfedge *e1, const Halfedge *e2) const { boundaries_of_same_face (const Halfedge *e1, const Halfedge *e2) const {
// status: correct // status: correct
//std::cout << " Arr_torus_topology_traits_2::boundaries_of_same_face" //std::cout << " Arr_dupin_cyclide_topology_traits_2::"
// << "boundaries_of_same_face"
// << std::endl; // << std::endl;
// This predicate is only used for case 3.3.2 of the insertion process // This predicate is only used for case 3.3.2 of the insertion process
@ -860,14 +865,14 @@ boundaries_of_same_face (const Halfedge *e1, const Halfedge *e2) const {
// Determine whether the given vertex lies in the interior of the given face. // Determine whether the given vertex lies in the interior of the given face.
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
bool Arr_torus_topology_traits_2<GeomTraits, Dcel_>:: bool Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::
is_in_face (const Face *f, const Point_2& p, const Vertex *v) const is_in_face (const Face *f, const Point_2& p, const Vertex *v) const
{ {
// status: not implemented // status: not implemented
std::cout << "TODO: Arr_torus_topology_traits_2::is_in_face" std::cout << "TODO: Arr_dupin_cyclide_topology_traits_2::is_in_face"
<< std::endl; << std::endl;
CGAL_error(); // is_in_face not implemented for torus CGAL_error(); // is_in_face not implemented for dupin_cyclide
// TODO is_in_face NEEDED for incremental insertion // TODO is_in_face NEEDED for incremental insertion
return false; return false;
@ -877,12 +882,14 @@ is_in_face (const Face *f, const Point_2& p, const Vertex *v) const
// Determine whether a boundary vertex is redundant // Determine whether a boundary vertex is redundant
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
bool Arr_torus_topology_traits_2<GeomTraits, Dcel_>::is_redundant bool Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::is_redundant
(const Vertex *v) const (const Vertex *v) const
{ {
// status: correct // status: correct
//std::cout << "Arr_torus_topology_traits_2 is_redundant" << std::endl; //std::cout << "Arr_dupin_cyclide_topology_traits_2 is_redundant"
CGAL_precondition(_valid(v->parameter_space_in_x(),v->parameter_space_in_y())); // << std::endl;
CGAL_precondition(_valid(v->parameter_space_in_x(),
v->parameter_space_in_y()));
// if there are not incident edges just remove it // if there are not incident edges just remove it
// TASK: check whether isolated or degree == 0 is needed! // TASK: check whether isolated or degree == 0 is needed!
@ -893,15 +900,17 @@ bool Arr_torus_topology_traits_2<GeomTraits, Dcel_>::is_redundant
// Determine whether a boundary vertex is redundant // Determine whether a boundary vertex is redundant
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
typename Arr_torus_topology_traits_2<GeomTraits, Dcel_>::Halfedge* typename Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::Halfedge*
Arr_torus_topology_traits_2<GeomTraits, Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::
erase_redundant_vertex (Vertex *v) erase_redundant_vertex (Vertex *v)
{ {
// status: correct // status: correct
//std::cout << "Arr_torus_topology_traits_2 erase_redundant_vertex" //std::cout << "Arr_dupin_cyclide_topology_traits_2 "
// << "erase_redundant_vertex"
// << std::endl; // << std::endl;
CGAL_precondition(_valid(v->parameter_space_in_x(),v->parameter_space_in_y())); CGAL_precondition(_valid(v->parameter_space_in_x(),
v->parameter_space_in_y()));
// no incident curve-end can give us the key // no incident curve-end can give us the key
// -> but we stored something else useful: find iterator // -> but we stored something else useful: find iterator
@ -937,7 +946,7 @@ erase_redundant_vertex (Vertex *v)
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
CGAL::Sign CGAL::Sign
Arr_torus_topology_traits_2<GeomTraits, Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::
_sign_of_subpath(const Halfedge* he1, const Halfedge* he2) const { _sign_of_subpath(const Halfedge* he1, const Halfedge* he2) const {
CGAL::Sign result = CGAL::ZERO; CGAL::Sign result = CGAL::ZERO;
@ -1043,7 +1052,7 @@ _sign_of_subpath(const Halfedge* he1, const Halfedge* he2) const {
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
CGAL::Sign CGAL::Sign
Arr_torus_topology_traits_2<GeomTraits, Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::
_sign_of_subpath (const Halfedge* he1, _sign_of_subpath (const Halfedge* he1,
const X_monotone_curve_2& cv2, const X_monotone_curve_2& cv2,
const CGAL::Arr_curve_end& end2) const { const CGAL::Arr_curve_end& end2) const {
@ -1195,12 +1204,12 @@ _sign_of_subpath (const Halfedge* he1,
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
CGAL::Sign CGAL::Sign
Arr_torus_topology_traits_2<GeomTraits, Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::
_sign_of_path(const Halfedge* he1, const Halfedge* he2) const { _sign_of_path(const Halfedge* he1, const Halfedge* he2) const {
// status: move to arr // status: move to arr
//std::cout << "Arr_torus_topology_traits: " //std::cout << "Arr_dupin_cyclide_topology_traits: "
// << "_sign_of_subpath" << std::endl; // << "_sign_of_subpath" << std::endl;
CGAL::Sign result = CGAL::ZERO; CGAL::Sign result = CGAL::ZERO;
@ -1260,7 +1269,7 @@ _sign_of_path(const Halfedge* he1, const Halfedge* he2) const {
// //
template <class GeomTraits, class Dcel_> template <class GeomTraits, class Dcel_>
CGAL::Sign CGAL::Sign
Arr_torus_topology_traits_2<GeomTraits, Dcel_>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel_>::
_sign_of_path (const Halfedge* he1, const Halfedge* he2, _sign_of_path (const Halfedge* he1, const Halfedge* he2,
const X_monotone_curve_2& cv) const { const X_monotone_curve_2& cv) const {
@ -1372,8 +1381,8 @@ _sign_of_path (const Halfedge* he1, const Halfedge* he2,
* on the line of discontinuity. * on the line of discontinuity.
*/ */
template <class GeomTraits, class Dcel> template <class GeomTraits, class Dcel>
typename Arr_torus_topology_traits_2<GeomTraits, Dcel>::Face * typename Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel>::Face *
Arr_torus_topology_traits_2<GeomTraits, Dcel>:: Arr_dupin_cyclide_topology_traits_2<GeomTraits, Dcel>::
_face_before_vertex_on_identifications (Vertex * v) const { _face_before_vertex_on_identifications (Vertex * v) const {
// status: correct // status: correct
@ -1466,9 +1475,11 @@ _face_before_vertex_on_identifications (Vertex * v) const {
Halfedge *rightmost_bottom = NULL; Halfedge *rightmost_bottom = NULL;
do { do {
typename Traits_adaptor_2::Parameter_space_in_x_2 parameter_space_in_x = typename Traits_adaptor_2::Parameter_space_in_x_2
parameter_space_in_x =
_m_traits->parameter_space_in_x_2_object(); _m_traits->parameter_space_in_x_2_object();
typename Traits_adaptor_2::Parameter_space_in_y_2 parameter_space_in_y = typename Traits_adaptor_2::Parameter_space_in_y_2
parameter_space_in_y =
_m_traits->parameter_space_in_y_2_object(); _m_traits->parameter_space_in_y_2_object();
CGAL::Arr_curve_end ind = CGAL::ARR_MIN_END; CGAL::Arr_curve_end ind = CGAL::ARR_MIN_END;
@ -1498,7 +1509,8 @@ _face_before_vertex_on_identifications (Vertex * v) const {
// same for BOTTOM-side // same for BOTTOM-side
if ((rightmost_bottom == NULL) || if ((rightmost_bottom == NULL) ||
(rightmost_bottom->direction() == CGAL::ARR_RIGHT_TO_LEFT && (rightmost_bottom->direction() == CGAL::ARR_RIGHT_TO_LEFT
&&
rightmost_bottom->direction() != curr->direction()) || rightmost_bottom->direction() != curr->direction()) ||
(rightmost_bottom->direction() == curr->direction() && (rightmost_bottom->direction() == curr->direction() &&
compare_x(curr->curve(), ind, compare_x(curr->curve(), ind,