mirror of https://github.com/CGAL/cgal
Morte replacements
This commit is contained in:
parent
5532b84b4f
commit
4581f1b7a8
|
|
@ -487,7 +487,7 @@ public:
|
||||||
if( size() > 1 ) {
|
if( size() > 1 ) {
|
||||||
delete [] m_p_root_node;
|
delete [] m_p_root_node;
|
||||||
}
|
}
|
||||||
m_p_root_node = NULL;
|
m_p_root_node = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// clears internal KD tree
|
// clears internal KD tree
|
||||||
|
|
@ -495,9 +495,9 @@ public:
|
||||||
{
|
{
|
||||||
if ( m_search_tree_constructed )
|
if ( m_search_tree_constructed )
|
||||||
{
|
{
|
||||||
CGAL_assertion( m_p_search_tree!=NULL );
|
CGAL_assertion( m_p_search_tree!=nullptr );
|
||||||
delete m_p_search_tree;
|
delete m_p_search_tree;
|
||||||
m_p_search_tree = NULL;
|
m_p_search_tree = nullptr;
|
||||||
m_search_tree_constructed = false;
|
m_search_tree_constructed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -607,8 +607,8 @@ public:
|
||||||
AABB_tree<Tr>::AABB_tree(const Tr& traits)
|
AABB_tree<Tr>::AABB_tree(const Tr& traits)
|
||||||
: m_traits(traits)
|
: m_traits(traits)
|
||||||
, m_primitives()
|
, m_primitives()
|
||||||
, m_p_root_node(NULL)
|
, m_p_root_node(nullptr)
|
||||||
, m_p_search_tree(NULL)
|
, m_p_search_tree(nullptr)
|
||||||
, m_search_tree_constructed(false)
|
, m_search_tree_constructed(false)
|
||||||
, m_default_search_tree_constructed(false)
|
, m_default_search_tree_constructed(false)
|
||||||
, m_need_build(false)
|
, m_need_build(false)
|
||||||
|
|
@ -621,8 +621,8 @@ public:
|
||||||
T&& ... t)
|
T&& ... t)
|
||||||
: m_traits()
|
: m_traits()
|
||||||
, m_primitives()
|
, m_primitives()
|
||||||
, m_p_root_node(NULL)
|
, m_p_root_node(nullptr)
|
||||||
, m_p_search_tree(NULL)
|
, m_p_search_tree(nullptr)
|
||||||
, m_search_tree_constructed(false)
|
, m_search_tree_constructed(false)
|
||||||
, m_default_search_tree_constructed(false)
|
, m_default_search_tree_constructed(false)
|
||||||
, m_need_build(false)
|
, m_need_build(false)
|
||||||
|
|
@ -687,10 +687,10 @@ public:
|
||||||
|
|
||||||
// allocates tree nodes
|
// allocates tree nodes
|
||||||
m_p_root_node = new Node[m_primitives.size()-1]();
|
m_p_root_node = new Node[m_primitives.size()-1]();
|
||||||
if(m_p_root_node == NULL)
|
if(m_p_root_node == nullptr)
|
||||||
{
|
{
|
||||||
std::cerr << "Unable to allocate memory for AABB tree" << std::endl;
|
std::cerr << "Unable to allocate memory for AABB tree" << std::endl;
|
||||||
CGAL_assertion(m_p_root_node != NULL);
|
CGAL_assertion(m_p_root_node != nullptr);
|
||||||
m_primitives.clear();
|
m_primitives.clear();
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
@ -738,7 +738,7 @@ public:
|
||||||
{
|
{
|
||||||
m_p_search_tree = new Search_tree(first, beyond);
|
m_p_search_tree = new Search_tree(first, beyond);
|
||||||
m_default_search_tree_constructed = true;
|
m_default_search_tree_constructed = true;
|
||||||
if(m_p_search_tree != NULL)
|
if(m_p_search_tree != nullptr)
|
||||||
{
|
{
|
||||||
m_search_tree_constructed = true;
|
m_search_tree_constructed = true;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -47,8 +47,8 @@ public:
|
||||||
/// Constructor
|
/// Constructor
|
||||||
AABB_node()
|
AABB_node()
|
||||||
: m_bbox()
|
: m_bbox()
|
||||||
, m_p_left_child(NULL)
|
, m_p_left_child(nullptr)
|
||||||
, m_p_right_child(NULL) { };
|
, m_p_right_child(nullptr) { };
|
||||||
|
|
||||||
/// Non virtual Destructor
|
/// Non virtual Destructor
|
||||||
/// Do not delete children because the tree hosts and delete them
|
/// Do not delete children because the tree hosts and delete them
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ namespace CGAL
|
||||||
public:
|
public:
|
||||||
template <class ConstPointIterator>
|
template <class ConstPointIterator>
|
||||||
AABB_search_tree(ConstPointIterator begin, ConstPointIterator beyond)
|
AABB_search_tree(ConstPointIterator begin, ConstPointIterator beyond)
|
||||||
: m_p_tree(NULL)
|
: m_p_tree(nullptr)
|
||||||
{
|
{
|
||||||
typedef typename Add_decorated_point<Traits, typename Traits::Primitive::Id>::Point_3 Decorated_point;
|
typedef typename Add_decorated_point<Traits, typename Traits::Primitive::Id>::Point_3 Decorated_point;
|
||||||
std::vector<Decorated_point> points;
|
std::vector<Decorated_point> points;
|
||||||
|
|
@ -117,7 +117,7 @@ namespace CGAL
|
||||||
++begin;
|
++begin;
|
||||||
}
|
}
|
||||||
m_p_tree = new Tree(points.begin(), points.end());
|
m_p_tree = new Tree(points.begin(), points.end());
|
||||||
if(m_p_tree != NULL)
|
if(m_p_tree != nullptr)
|
||||||
m_p_tree->build();
|
m_p_tree->build();
|
||||||
else
|
else
|
||||||
std::cerr << "unable to build the search tree!" << std::endl;
|
std::cerr << "unable to build the search tree!" << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -66,13 +66,13 @@ struct Cstr_shared_data<Graph, Base, ObjectPropertyMap, PointPropertyMap, ::CGAL
|
||||||
typedef void* Shared_data;
|
typedef void* Shared_data;
|
||||||
static Shared_data construct_shared_data(Graph&)
|
static Shared_data construct_shared_data(Graph&)
|
||||||
{
|
{
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class VertexPmap>
|
template <class VertexPmap>
|
||||||
static Shared_data construct_shared_data(Graph&, VertexPmap)
|
static Shared_data construct_shared_data(Graph&, VertexPmap)
|
||||||
{
|
{
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
|
|
||||||
Advancing_front_surface_reconstruction_boundary_iterator(const Surface& S_)
|
Advancing_front_surface_reconstruction_boundary_iterator(const Surface& S_)
|
||||||
: S(S_), pos(NULL)
|
: S(S_), pos(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Advancing_front_surface_reconstruction_boundary_iterator(const Self& s)
|
Advancing_front_surface_reconstruction_boundary_iterator(const Self& s)
|
||||||
|
|
@ -108,7 +108,7 @@ namespace CGAL {
|
||||||
|
|
||||||
Self operator++()
|
Self operator++()
|
||||||
{
|
{
|
||||||
if(pos == NULL) {
|
if(pos == nullptr) {
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
if(first){
|
if(first){
|
||||||
|
|
@ -134,7 +134,7 @@ namespace CGAL {
|
||||||
|
|
||||||
void advance_on_boundary()
|
void advance_on_boundary()
|
||||||
{
|
{
|
||||||
if(pos == NULL) {
|
if(pos == nullptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
pos = pos->first_incident()->first;
|
pos = pos->first_incident()->first;
|
||||||
|
|
@ -143,7 +143,7 @@ namespace CGAL {
|
||||||
|
|
||||||
void advance_to_next_boundary()
|
void advance_to_next_boundary()
|
||||||
{
|
{
|
||||||
if(pos == NULL) {
|
if(pos == nullptr) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
|
|
@ -157,7 +157,7 @@ namespace CGAL {
|
||||||
CGAL_assertion(pos->is_on_border());
|
CGAL_assertion(pos->is_on_border());
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
pos = NULL;
|
pos = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
@ -400,18 +400,18 @@ namespace CGAL {
|
||||||
|
|
||||||
Intern_successors_type* ret = &ist_pool.back();
|
Intern_successors_type* ret = &ist_pool.back();
|
||||||
|
|
||||||
ret->first->first = NULL;
|
ret->first->first = nullptr;
|
||||||
ret->second->first = NULL;
|
ret->second->first = nullptr;
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool is_on_border(Vertex_handle vh, const int& i) const
|
inline bool is_on_border(Vertex_handle vh, const int& i) const
|
||||||
{
|
{
|
||||||
if (vh->m_incident_border == NULL) return false; //vh is interior
|
if (vh->m_incident_border == nullptr) return false; //vh is interior
|
||||||
if (vh->m_incident_border->first->first != NULL)
|
if (vh->m_incident_border->first->first != nullptr)
|
||||||
{
|
{
|
||||||
if (vh->m_incident_border->second->first != NULL)
|
if (vh->m_incident_border->second->first != nullptr)
|
||||||
return ((vh->m_incident_border->first->second.second == i)||
|
return ((vh->m_incident_border->first->second.second == i)||
|
||||||
(vh->m_incident_border->second->second.second == i));
|
(vh->m_incident_border->second->second.second == i));
|
||||||
return (vh->m_incident_border->first->second.second == i);
|
return (vh->m_incident_border->first->second.second == i);
|
||||||
|
|
@ -422,28 +422,28 @@ namespace CGAL {
|
||||||
|
|
||||||
void remove_border_edge(Vertex_handle w, Vertex_handle v)
|
void remove_border_edge(Vertex_handle w, Vertex_handle v)
|
||||||
{
|
{
|
||||||
if (w->m_incident_border != NULL)
|
if (w->m_incident_border != nullptr)
|
||||||
{
|
{
|
||||||
if (w->m_incident_border->second->first == v)
|
if (w->m_incident_border->second->first == v)
|
||||||
{
|
{
|
||||||
w->m_incident_border->second->first = NULL;
|
w->m_incident_border->second->first = nullptr;
|
||||||
set_interior_edge(w,v);
|
set_interior_edge(w,v);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (w->m_incident_border->first->first == v)
|
if (w->m_incident_border->first->first == v)
|
||||||
{
|
{
|
||||||
if (w->m_incident_border->second->first != NULL)
|
if (w->m_incident_border->second->first != nullptr)
|
||||||
{
|
{
|
||||||
Next_border_elt* tmp = w->m_incident_border->first;
|
Next_border_elt* tmp = w->m_incident_border->first;
|
||||||
w->m_incident_border->first = w->m_incident_border->second;
|
w->m_incident_border->first = w->m_incident_border->second;
|
||||||
w->m_incident_border->second = tmp;
|
w->m_incident_border->second = tmp;
|
||||||
w->m_incident_border->second->first = NULL;
|
w->m_incident_border->second->first = nullptr;
|
||||||
set_interior_edge(w,v);
|
set_interior_edge(w,v);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
w->m_incident_border->first->first = NULL;
|
w->m_incident_border->first->first = nullptr;
|
||||||
set_interior_edge(w,v);
|
set_interior_edge(w,v);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -571,7 +571,7 @@ namespace CGAL {
|
||||||
|
|
||||||
void re_init(Vertex_handle w)
|
void re_init(Vertex_handle w)
|
||||||
{
|
{
|
||||||
if (w->m_incident_border != NULL)
|
if (w->m_incident_border != nullptr)
|
||||||
{
|
{
|
||||||
w->delete_border();
|
w->delete_border();
|
||||||
}
|
}
|
||||||
|
|
@ -629,7 +629,7 @@ namespace CGAL {
|
||||||
|
|
||||||
void clear_vertex(Vertex_handle w)
|
void clear_vertex(Vertex_handle w)
|
||||||
{
|
{
|
||||||
if (w->m_incident_border != NULL)
|
if (w->m_incident_border != nullptr)
|
||||||
{
|
{
|
||||||
w->delete_border();
|
w->delete_border();
|
||||||
}
|
}
|
||||||
|
|
@ -956,14 +956,14 @@ namespace CGAL {
|
||||||
bool is_border_elt(Edge_like& key, Border_elt& result) const
|
bool is_border_elt(Edge_like& key, Border_elt& result) const
|
||||||
{
|
{
|
||||||
Next_border_elt* it12 = border_elt(key.first, key.second);
|
Next_border_elt* it12 = border_elt(key.first, key.second);
|
||||||
if (it12 != NULL)
|
if (it12 != nullptr)
|
||||||
{
|
{
|
||||||
result = it12->second;
|
result = it12->second;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Next_border_elt* it21 = border_elt(key.second, key.first);
|
Next_border_elt* it21 = border_elt(key.second, key.first);
|
||||||
if (it21 != NULL)
|
if (it21 != nullptr)
|
||||||
{
|
{
|
||||||
result = it21->second;
|
result = it21->second;
|
||||||
std::swap(key.first, key.second);
|
std::swap(key.first, key.second);
|
||||||
|
|
@ -975,13 +975,13 @@ namespace CGAL {
|
||||||
//---------------------------------------------------------------------
|
//---------------------------------------------------------------------
|
||||||
bool is_border_elt(Edge_like& key) const {
|
bool is_border_elt(Edge_like& key) const {
|
||||||
Next_border_elt* it12 = border_elt(key.first, key.second);
|
Next_border_elt* it12 = border_elt(key.first, key.second);
|
||||||
if (it12 != NULL)
|
if (it12 != nullptr)
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Next_border_elt* it21 = border_elt(key.second, key.first);
|
Next_border_elt* it21 = border_elt(key.second, key.first);
|
||||||
if (it21 != NULL)
|
if (it21 != nullptr)
|
||||||
{
|
{
|
||||||
std::swap(key.first, key.second);
|
std::swap(key.first, key.second);
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -993,7 +993,7 @@ namespace CGAL {
|
||||||
bool is_ordered_border_elt(const Edge_like& key, Border_elt& result) const
|
bool is_ordered_border_elt(const Edge_like& key, Border_elt& result) const
|
||||||
{
|
{
|
||||||
Next_border_elt* it12 = border_elt(key.first, key.second);
|
Next_border_elt* it12 = border_elt(key.first, key.second);
|
||||||
if (it12 != NULL)
|
if (it12 != nullptr)
|
||||||
{
|
{
|
||||||
result = it12->second;
|
result = it12->second;
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -1015,7 +1015,7 @@ namespace CGAL {
|
||||||
Vertex_handle v1 = e.first;
|
Vertex_handle v1 = e.first;
|
||||||
|
|
||||||
Next_border_elt* it12 = border_elt(v1, e.second);
|
Next_border_elt* it12 = border_elt(v1, e.second);
|
||||||
if (it12 != NULL)
|
if (it12 != nullptr)
|
||||||
{
|
{
|
||||||
ptr = &it12->second.first.second;
|
ptr = &it12->second.first.second;
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -1047,7 +1047,7 @@ namespace CGAL {
|
||||||
|
|
||||||
coord_type lazy_squared_radius(const Cell_handle& c)
|
coord_type lazy_squared_radius(const Cell_handle& c)
|
||||||
{
|
{
|
||||||
if (c->lazy_squared_radius() != NULL)
|
if (c->lazy_squared_radius() != nullptr)
|
||||||
return *(c->lazy_squared_radius());
|
return *(c->lazy_squared_radius());
|
||||||
|
|
||||||
c->set_lazy_squared_radius
|
c->set_lazy_squared_radius
|
||||||
|
|
@ -1060,7 +1060,7 @@ namespace CGAL {
|
||||||
|
|
||||||
Point lazy_circumcenter(const Cell_handle& c)
|
Point lazy_circumcenter(const Cell_handle& c)
|
||||||
{
|
{
|
||||||
if (c->lazy_circumcenter() != NULL)
|
if (c->lazy_circumcenter() != nullptr)
|
||||||
return *(c->lazy_circumcenter());
|
return *(c->lazy_circumcenter());
|
||||||
|
|
||||||
c->set_lazy_circumcenter
|
c->set_lazy_circumcenter
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,9 @@ namespace CGAL {
|
||||||
|
|
||||||
Advancing_front_surface_reconstruction_cell_base_3()
|
Advancing_front_surface_reconstruction_cell_base_3()
|
||||||
: Cb(),
|
: Cb(),
|
||||||
_smallest_radius_facet_tab(NULL), selected_facet(0)
|
_smallest_radius_facet_tab(nullptr), selected_facet(0)
|
||||||
#ifdef AFSR_LAZY
|
#ifdef AFSR_LAZY
|
||||||
, _circumcenter(NULL), _squared_radius(NULL)
|
, _circumcenter(nullptr), _squared_radius(nullptr)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef AFSR_FACET_NUMBER
|
#ifdef AFSR_FACET_NUMBER
|
||||||
|
|
@ -89,9 +89,9 @@ namespace CGAL {
|
||||||
|
|
||||||
Advancing_front_surface_reconstruction_cell_base_3(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3)
|
Advancing_front_surface_reconstruction_cell_base_3(Vertex_handle v0, Vertex_handle v1, Vertex_handle v2, Vertex_handle v3)
|
||||||
: Cb( v0, v1, v2, v3),
|
: Cb( v0, v1, v2, v3),
|
||||||
_smallest_radius_facet_tab(NULL), selected_facet(0)
|
_smallest_radius_facet_tab(nullptr), selected_facet(0)
|
||||||
#ifdef AFSR_LAZY
|
#ifdef AFSR_LAZY
|
||||||
, _circumcenter(NULL), _squared_radius(NULL)
|
, _circumcenter(nullptr), _squared_radius(nullptr)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef FACET_NUMBER
|
#ifdef FACET_NUMBER
|
||||||
|
|
@ -105,9 +105,9 @@ namespace CGAL {
|
||||||
Cell_handle n0, Cell_handle n1, Cell_handle n2, Cell_handle n3)
|
Cell_handle n0, Cell_handle n1, Cell_handle n2, Cell_handle n3)
|
||||||
: Cb(v0, v1, v2, v3,
|
: Cb(v0, v1, v2, v3,
|
||||||
n0, n1, n2, n3),
|
n0, n1, n2, n3),
|
||||||
_smallest_radius_facet_tab(NULL), selected_facet(0)
|
_smallest_radius_facet_tab(nullptr), selected_facet(0)
|
||||||
#ifdef AFSR_LAZY
|
#ifdef AFSR_LAZY
|
||||||
, _circumcenter(NULL), _squared_radius(NULL)
|
, _circumcenter(nullptr), _squared_radius(nullptr)
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
#ifdef AFSR_FACET_NUMBER
|
#ifdef AFSR_FACET_NUMBER
|
||||||
|
|
@ -121,12 +121,12 @@ namespace CGAL {
|
||||||
|
|
||||||
inline ~Advancing_front_surface_reconstruction_cell_base_3()
|
inline ~Advancing_front_surface_reconstruction_cell_base_3()
|
||||||
{
|
{
|
||||||
if (_smallest_radius_facet_tab != NULL)
|
if (_smallest_radius_facet_tab != nullptr)
|
||||||
delete[] _smallest_radius_facet_tab;
|
delete[] _smallest_radius_facet_tab;
|
||||||
#ifdef AFSR_LAZY
|
#ifdef AFSR_LAZY
|
||||||
if (_circumcenter != NULL)
|
if (_circumcenter != nullptr)
|
||||||
delete _circumcenter;
|
delete _circumcenter;
|
||||||
if (_squared_radius != NULL)
|
if (_squared_radius != nullptr)
|
||||||
delete _squared_radius;
|
delete _squared_radius;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
@ -136,31 +136,31 @@ namespace CGAL {
|
||||||
|
|
||||||
inline void clear()
|
inline void clear()
|
||||||
{
|
{
|
||||||
if (_smallest_radius_facet_tab != NULL)
|
if (_smallest_radius_facet_tab != nullptr)
|
||||||
delete[] _smallest_radius_facet_tab;
|
delete[] _smallest_radius_facet_tab;
|
||||||
_smallest_radius_facet_tab = NULL;
|
_smallest_radius_facet_tab = nullptr;
|
||||||
selected_facet = 0;
|
selected_facet = 0;
|
||||||
#ifdef AFSR_LAZY
|
#ifdef AFSR_LAZY
|
||||||
if (_circumcenter != NULL)
|
if (_circumcenter != nullptr)
|
||||||
delete _circumcenter;
|
delete _circumcenter;
|
||||||
_circumcenter = NULL;
|
_circumcenter = nullptr;
|
||||||
if (_squared_radius != NULL)
|
if (_squared_radius != nullptr)
|
||||||
delete _squared_radius;
|
delete _squared_radius;
|
||||||
_squared_radius = NULL;
|
_squared_radius = nullptr;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------
|
//-------------------------------------------------------------------
|
||||||
inline coord_type smallest_radius(const int& i)
|
inline coord_type smallest_radius(const int& i)
|
||||||
{
|
{
|
||||||
if (_smallest_radius_facet_tab == NULL)
|
if (_smallest_radius_facet_tab == nullptr)
|
||||||
return -1;
|
return -1;
|
||||||
return _smallest_radius_facet_tab[i];
|
return _smallest_radius_facet_tab[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void set_smallest_radius(const int& i, const coord_type& c)
|
inline void set_smallest_radius(const int& i, const coord_type& c)
|
||||||
{
|
{
|
||||||
if (_smallest_radius_facet_tab == NULL)
|
if (_smallest_radius_facet_tab == nullptr)
|
||||||
{
|
{
|
||||||
_smallest_radius_facet_tab = new coord_type[4];
|
_smallest_radius_facet_tab = new coord_type[4];
|
||||||
for(int i = 0; i < 4; i++)
|
for(int i = 0; i < 4; i++)
|
||||||
|
|
@ -172,7 +172,7 @@ namespace CGAL {
|
||||||
// pour un controle de l'allocation memoire... utile???
|
// pour un controle de l'allocation memoire... utile???
|
||||||
inline bool alloc_smallest_radius_tab(coord_type* ptr)
|
inline bool alloc_smallest_radius_tab(coord_type* ptr)
|
||||||
{
|
{
|
||||||
if (_smallest_radius_facet_tab==NULL)
|
if (_smallest_radius_facet_tab==nullptr)
|
||||||
{
|
{
|
||||||
_smallest_radius_facet_tab = ptr;
|
_smallest_radius_facet_tab = ptr;
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -174,20 +174,20 @@ namespace CGAL {
|
||||||
|
|
||||||
void delete_border()
|
void delete_border()
|
||||||
{
|
{
|
||||||
m_incident_border = NULL;
|
m_incident_border = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline Next_border_elt* next_on_border(const int& i) const
|
inline Next_border_elt* next_on_border(const int& i) const
|
||||||
{
|
{
|
||||||
if (m_incident_border == NULL) return NULL; //vh is interior
|
if (m_incident_border == nullptr) return nullptr; //vh is interior
|
||||||
if (m_incident_border->first->first != NULL)
|
if (m_incident_border->first->first != nullptr)
|
||||||
if (m_incident_border->first->second.second == i)
|
if (m_incident_border->first->second.second == i)
|
||||||
return m_incident_border->first;
|
return m_incident_border->first;
|
||||||
if (m_incident_border->second->first != NULL)
|
if (m_incident_border->second->first != nullptr)
|
||||||
if (m_incident_border->second->second.second == i)
|
if (m_incident_border->second->second.second == i)
|
||||||
return m_incident_border->second;
|
return m_incident_border->second;
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -195,40 +195,40 @@ namespace CGAL {
|
||||||
|
|
||||||
inline bool is_border_edge(Vertex_handle v) const
|
inline bool is_border_edge(Vertex_handle v) const
|
||||||
{
|
{
|
||||||
if (m_incident_border == NULL) return false;
|
if (m_incident_border == nullptr) return false;
|
||||||
return ((m_incident_border->first->first == v)||
|
return ((m_incident_border->first->first == v)||
|
||||||
(m_incident_border->second->first == v));
|
(m_incident_border->second->first == v));
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Next_border_elt* border_elt(Vertex_handle v) const
|
inline Next_border_elt* border_elt(Vertex_handle v) const
|
||||||
{
|
{
|
||||||
if (m_incident_border == NULL) return NULL;
|
if (m_incident_border == nullptr) return nullptr;
|
||||||
if (m_incident_border->first->first == v) return m_incident_border->first;
|
if (m_incident_border->first->first == v) return m_incident_border->first;
|
||||||
if (m_incident_border->second->first == v) return m_incident_border->second;
|
if (m_incident_border->second->first == v) return m_incident_border->second;
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
inline Next_border_elt* first_incident() const
|
inline Next_border_elt* first_incident() const
|
||||||
{
|
{
|
||||||
if (m_incident_border == NULL) return NULL;
|
if (m_incident_border == nullptr) return nullptr;
|
||||||
return m_incident_border->first;
|
return m_incident_border->first;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
inline Next_border_elt* second_incident() const
|
inline Next_border_elt* second_incident() const
|
||||||
{
|
{
|
||||||
if (m_incident_border == NULL) return NULL;
|
if (m_incident_border == nullptr) return nullptr;
|
||||||
return m_incident_border->second;
|
return m_incident_border->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void set_next_border_elt(const Next_border_elt& elt)
|
inline void set_next_border_elt(const Next_border_elt& elt)
|
||||||
{
|
{
|
||||||
if (m_incident_border->first->first == NULL)
|
if (m_incident_border->first->first == nullptr)
|
||||||
*m_incident_border->first = elt;
|
*m_incident_border->first = elt;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (m_incident_border->second->first != NULL)
|
if (m_incident_border->second->first != nullptr)
|
||||||
std::cerr << "+++probleme de MAJ du bord <Vertex_base>" << std::endl;
|
std::cerr << "+++probleme de MAJ du bord <Vertex_base>" << std::endl;
|
||||||
*m_incident_border->second = elt;
|
*m_incident_border->second = elt;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -417,7 +417,7 @@ void test_algebraic_structure_intern(
|
||||||
assert( a != AS (0));
|
assert( a != AS (0));
|
||||||
assert( b != AS (0));
|
assert( b != AS (0));
|
||||||
assert( c != AS (0));
|
assert( c != AS (0));
|
||||||
// AS (0) == NULL of IntegralDomain
|
// AS (0) == nullptr of IntegralDomain
|
||||||
assert(a* AS (0)== AS (0));
|
assert(a* AS (0)== AS (0));
|
||||||
assert(a+ AS (0)==a);
|
assert(a+ AS (0)==a);
|
||||||
assert(b* AS (0)== AS (0));
|
assert(b* AS (0)== AS (0));
|
||||||
|
|
|
||||||
|
|
@ -1333,7 +1333,7 @@ Alpha_shape_2<Dt,EACT>::number_of_solid_components(const Type_of_alpha& alpha) c
|
||||||
++face_it)
|
++face_it)
|
||||||
{
|
{
|
||||||
Face_handle pFace = face_it;
|
Face_handle pFace = face_it;
|
||||||
CGAL_triangulation_postcondition( pFace != NULL);
|
CGAL_triangulation_postcondition( pFace != nullptr);
|
||||||
|
|
||||||
if (classify(pFace, alpha) == INTERIOR){
|
if (classify(pFace, alpha) == INTERIOR){
|
||||||
Data& data = marked_face_set[pFace];
|
Data& data = marked_face_set[pFace];
|
||||||
|
|
@ -1367,7 +1367,7 @@ Alpha_shape_2<Dt,EACT>::traverse(const Face_handle& pFace,
|
||||||
for (int i=0; i<3; i++)
|
for (int i=0; i<3; i++)
|
||||||
{
|
{
|
||||||
pNeighbor = fh->neighbor(i);
|
pNeighbor = fh->neighbor(i);
|
||||||
CGAL_triangulation_assertion(pNeighbor != NULL);
|
CGAL_triangulation_assertion(pNeighbor != nullptr);
|
||||||
if (classify(pNeighbor, alpha) == INTERIOR){
|
if (classify(pNeighbor, alpha) == INTERIOR){
|
||||||
Data& data = marked_face_set[pNeighbor];
|
Data& data = marked_face_set[pNeighbor];
|
||||||
if(data == false){
|
if(data == false){
|
||||||
|
|
|
||||||
|
|
@ -260,26 +260,26 @@ public:
|
||||||
: exact_(Exact_nt(0)), approx_(0)
|
: exact_(Exact_nt(0)), approx_(0)
|
||||||
{
|
{
|
||||||
data().nbpts=0;
|
data().nbpts=0;
|
||||||
data().p0=NULL;
|
data().p0=nullptr;
|
||||||
data().p1=NULL;
|
data().p1=nullptr;
|
||||||
data().p2=NULL;
|
data().p2=nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Lazy_alpha_nt_2(double d)
|
Lazy_alpha_nt_2(double d)
|
||||||
: exact_(Exact_nt(d)), approx_(d)
|
: exact_(Exact_nt(d)), approx_(d)
|
||||||
{
|
{
|
||||||
data().nbpts=0;
|
data().nbpts=0;
|
||||||
data().p0=NULL;
|
data().p0=nullptr;
|
||||||
data().p1=NULL;
|
data().p1=nullptr;
|
||||||
data().p2=NULL;
|
data().p2=nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Lazy_alpha_nt_2(const Input_point& wp0)
|
Lazy_alpha_nt_2(const Input_point& wp0)
|
||||||
{
|
{
|
||||||
data().nbpts=1;
|
data().nbpts=1;
|
||||||
data().p0=&wp0;
|
data().p0=&wp0;
|
||||||
data().p1=NULL;
|
data().p1=nullptr;
|
||||||
data().p2=NULL;
|
data().p2=nullptr;
|
||||||
set_approx();
|
set_approx();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -289,7 +289,7 @@ public:
|
||||||
data().nbpts=2;
|
data().nbpts=2;
|
||||||
data().p0=&wp0;
|
data().p0=&wp0;
|
||||||
data().p1=&wp1;
|
data().p1=&wp1;
|
||||||
data().p2=NULL;
|
data().p2=nullptr;
|
||||||
set_approx();
|
set_approx();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1731,7 +1731,7 @@ Alpha_shape_3<Dt,EACT>::number_of_solid_components(const NT& alpha) const
|
||||||
for( cell_it = finite_cells_begin(); cell_it != done; ++cell_it)
|
for( cell_it = finite_cells_begin(); cell_it != done; ++cell_it)
|
||||||
{
|
{
|
||||||
Cell_handle pCell = cell_it;
|
Cell_handle pCell = cell_it;
|
||||||
CGAL_triangulation_assertion(pCell != NULL);
|
CGAL_triangulation_assertion(pCell != nullptr);
|
||||||
|
|
||||||
if (classify(pCell, alpha) == INTERIOR){
|
if (classify(pCell, alpha) == INTERIOR){
|
||||||
Data& data = marked_cell_set[pCell];
|
Data& data = marked_cell_set[pCell];
|
||||||
|
|
@ -1763,7 +1763,7 @@ void Alpha_shape_3<Dt,EACT>::traverse(Cell_handle pCell,
|
||||||
for (int i=0; i<=3; i++)
|
for (int i=0; i<=3; i++)
|
||||||
{
|
{
|
||||||
pNeighbor = pCell->neighbor(i);
|
pNeighbor = pCell->neighbor(i);
|
||||||
CGAL_triangulation_assertion(pNeighbor != NULL);
|
CGAL_triangulation_assertion(pNeighbor != nullptr);
|
||||||
if (classify(pNeighbor, alpha) == INTERIOR){
|
if (classify(pNeighbor, alpha) == INTERIOR){
|
||||||
Data& data = marked_cell_set[pNeighbor];
|
Data& data = marked_cell_set[pNeighbor];
|
||||||
if(data == false){
|
if(data == false){
|
||||||
|
|
|
||||||
|
|
@ -253,29 +253,29 @@ public:
|
||||||
: exact_(Exact_nt(0)),approx_(0)
|
: exact_(Exact_nt(0)),approx_(0)
|
||||||
{
|
{
|
||||||
data().nbpts=0;
|
data().nbpts=0;
|
||||||
data().p0=NULL;
|
data().p0=nullptr;
|
||||||
data().p1=NULL;
|
data().p1=nullptr;
|
||||||
data().p2=NULL;
|
data().p2=nullptr;
|
||||||
data().p3=NULL;
|
data().p3=nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Lazy_alpha_nt_3(double d)
|
Lazy_alpha_nt_3(double d)
|
||||||
: exact_(Exact_nt(d)),approx_(d)
|
: exact_(Exact_nt(d)),approx_(d)
|
||||||
{
|
{
|
||||||
data().nbpts=0;
|
data().nbpts=0;
|
||||||
data().p0=NULL;
|
data().p0=nullptr;
|
||||||
data().p1=NULL;
|
data().p1=nullptr;
|
||||||
data().p2=NULL;
|
data().p2=nullptr;
|
||||||
data().p3=NULL;
|
data().p3=nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Lazy_alpha_nt_3(const Input_point& wp1)
|
Lazy_alpha_nt_3(const Input_point& wp1)
|
||||||
{
|
{
|
||||||
data().nbpts=1;
|
data().nbpts=1;
|
||||||
data().p0=&wp1;
|
data().p0=&wp1;
|
||||||
data().p1=NULL;
|
data().p1=nullptr;
|
||||||
data().p2=NULL;
|
data().p2=nullptr;
|
||||||
data().p3=NULL;
|
data().p3=nullptr;
|
||||||
set_approx();
|
set_approx();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -285,8 +285,8 @@ public:
|
||||||
data().nbpts=2;
|
data().nbpts=2;
|
||||||
data().p0=&wp1;
|
data().p0=&wp1;
|
||||||
data().p1=&wp2;
|
data().p1=&wp2;
|
||||||
data().p2=NULL;
|
data().p2=nullptr;
|
||||||
data().p3=NULL;
|
data().p3=nullptr;
|
||||||
set_approx();
|
set_approx();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -298,7 +298,7 @@ public:
|
||||||
data().p0=&wp1;
|
data().p0=&wp1;
|
||||||
data().p1=&wp2;
|
data().p1=&wp2;
|
||||||
data().p2=&wp3;
|
data().p2=&wp3;
|
||||||
data().p3=NULL;
|
data().p3=nullptr;
|
||||||
set_approx();
|
set_approx();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ ApolloniusGraphHierarchyVertexBase_2(Site_2 s, Face_handle f).;
|
||||||
/*!
|
/*!
|
||||||
Returns a handle to the corresponding
|
Returns a handle to the corresponding
|
||||||
vertex of the next level Apollonius graph. If such a vertex does not
|
vertex of the next level Apollonius graph. If such a vertex does not
|
||||||
exist `Vertex_handle(NULL)` is returned.
|
exist `Vertex_handle(nullptr)` is returned.
|
||||||
*/
|
*/
|
||||||
Vertex_handle up();
|
Vertex_handle up();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ bool is_unbounded() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
returns an incident halfedge along the outer boundary of the face.
|
returns an incident halfedge along the outer boundary of the face.
|
||||||
If `f` has no outer boundary, the function returns `NULL`.
|
If `f` has no outer boundary, the function returns `nullptr`.
|
||||||
*/
|
*/
|
||||||
Halfedge* halfedge();
|
Halfedge* halfedge();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ void read_arrangement_end ();
|
||||||
/*!
|
/*!
|
||||||
reads a size value, which is supposed to be preceded by the given label.
|
reads a size value, which is supposed to be preceded by the given label.
|
||||||
*/
|
*/
|
||||||
Size read_size (const char *label = NULL);
|
Size read_size (const char *label = nullptr);
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
reads a message indicating the beginning of the vertex records.
|
reads a message indicating the beginning of the vertex records.
|
||||||
|
|
|
||||||
|
|
@ -167,8 +167,8 @@ public:
|
||||||
delete p_cache;
|
delete p_cache;
|
||||||
delete p_inter_map;
|
delete p_inter_map;
|
||||||
}
|
}
|
||||||
p_cache = NULL;
|
p_cache = nullptr;
|
||||||
p_inter_map = NULL;
|
p_inter_map = nullptr;
|
||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ public:
|
||||||
|
|
||||||
DHalfedge* he = p_arr->_locate_around_vertex(p_arr->_vertex (vh), cv, ind);
|
DHalfedge* he = p_arr->_locate_around_vertex(p_arr->_vertex (vh), cv, ind);
|
||||||
|
|
||||||
CGAL_assertion(he != NULL);
|
CGAL_assertion(he != nullptr);
|
||||||
return (p_arr->_handle_for (he));
|
return (p_arr->_handle_for (he));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -198,7 +198,7 @@ public:
|
||||||
DHalfedge* he = p_arr->topology_traits()->
|
DHalfedge* he = p_arr->topology_traits()->
|
||||||
locate_around_boundary_vertex(p_arr->_vertex (vh), cv, ind, ps_x, ps_y);
|
locate_around_boundary_vertex(p_arr->_vertex (vh), cv, ind, ps_x, ps_y);
|
||||||
|
|
||||||
CGAL_assertion(he != NULL);
|
CGAL_assertion(he != nullptr);
|
||||||
return (p_arr->_handle_for (he));
|
return (p_arr->_handle_for (he));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -219,10 +219,10 @@ public:
|
||||||
|
|
||||||
if (he1 == he2) return (0);
|
if (he1 == he2) return (0);
|
||||||
|
|
||||||
const DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
|
const DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : nullptr;
|
||||||
const DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
|
const DOuter_ccb* oc1 = (ic1 == nullptr) ? he1->outer_ccb() : nullptr;
|
||||||
const DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
|
const DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : nullptr;
|
||||||
const DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
|
const DOuter_ccb* oc2 = (ic2 == nullptr) ? he2->outer_ccb() : nullptr;
|
||||||
|
|
||||||
if ((oc1 != oc2) || (ic1 != ic2)) return (-1);
|
if ((oc1 != oc2) || (ic1 != ic2)) return (-1);
|
||||||
|
|
||||||
|
|
@ -305,7 +305,7 @@ public:
|
||||||
Vertex_handle create_vertex(const Point_2& p)
|
Vertex_handle create_vertex(const Point_2& p)
|
||||||
{
|
{
|
||||||
DVertex* v = p_arr->_create_vertex (p);
|
DVertex* v = p_arr->_create_vertex (p);
|
||||||
CGAL_assertion(v != NULL);
|
CGAL_assertion(v != nullptr);
|
||||||
return (p_arr->_handle_for (v));
|
return (p_arr->_handle_for (v));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -328,7 +328,7 @@ public:
|
||||||
{
|
{
|
||||||
DVertex* v = p_arr->_create_boundary_vertex (cv, ind, ps_x, ps_y);
|
DVertex* v = p_arr->_create_boundary_vertex (cv, ind, ps_x, ps_y);
|
||||||
|
|
||||||
CGAL_assertion(v != NULL);
|
CGAL_assertion(v != nullptr);
|
||||||
|
|
||||||
// Notify the topology traits on the creation of the boundary vertex.
|
// Notify the topology traits on the creation of the boundary vertex.
|
||||||
if (notify)
|
if (notify)
|
||||||
|
|
@ -359,7 +359,7 @@ public:
|
||||||
DVertex* v = p_arr->_place_and_set_curve_end(p_arr->_face (f), cv, ind,
|
DVertex* v = p_arr->_place_and_set_curve_end(p_arr->_face (f), cv, ind,
|
||||||
ps_x, ps_y, &pred);
|
ps_x, ps_y, &pred);
|
||||||
|
|
||||||
if (pred == NULL)
|
if (pred == nullptr)
|
||||||
// No predecessor halfedge, return just the vertex:
|
// No predecessor halfedge, return just the vertex:
|
||||||
return (std::make_pair(p_arr->_handle_for(v), Halfedge_handle()));
|
return (std::make_pair(p_arr->_handle_for(v), Halfedge_handle()));
|
||||||
|
|
||||||
|
|
@ -401,7 +401,7 @@ public:
|
||||||
new_face, swapped_predecessors,
|
new_face, swapped_predecessors,
|
||||||
allow_swap_of_predecessors);
|
allow_swap_of_predecessors);
|
||||||
|
|
||||||
CGAL_assertion(he != NULL);
|
CGAL_assertion(he != nullptr);
|
||||||
return (p_arr->_handle_for(he));
|
return (p_arr->_handle_for(he));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -438,7 +438,7 @@ public:
|
||||||
DHalfedge* he =
|
DHalfedge* he =
|
||||||
p_arr->_insert_from_vertex(p_arr->_halfedge(he_to), cv, cv_dir, p_v);
|
p_arr->_insert_from_vertex(p_arr->_halfedge(he_to), cv, cv_dir, p_v);
|
||||||
|
|
||||||
CGAL_assertion(he != NULL);
|
CGAL_assertion(he != nullptr);
|
||||||
return (p_arr->_handle_for (he));
|
return (p_arr->_handle_for (he));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -485,7 +485,7 @@ public:
|
||||||
DHalfedge* he = p_arr->_insert_in_face_interior(p_arr->_face (f),
|
DHalfedge* he = p_arr->_insert_in_face_interior(p_arr->_face (f),
|
||||||
cv, cv_dir, p_v1, p_v2);
|
cv, cv_dir, p_v1, p_v2);
|
||||||
|
|
||||||
CGAL_assertion(he != NULL);
|
CGAL_assertion(he != nullptr);
|
||||||
return (p_arr->_handle_for (he));
|
return (p_arr->_handle_for (he));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -613,7 +613,7 @@ public:
|
||||||
{
|
{
|
||||||
DHalfedge* he = p_arr->_split_edge (p_arr->_halfedge(e), p, cv1, cv2);
|
DHalfedge* he = p_arr->_split_edge (p_arr->_halfedge(e), p, cv1, cv2);
|
||||||
|
|
||||||
CGAL_assertion(he != NULL);
|
CGAL_assertion(he != nullptr);
|
||||||
return (p_arr->_handle_for(he));
|
return (p_arr->_handle_for(he));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -636,7 +636,7 @@ public:
|
||||||
DHalfedge* he = p_arr->_split_edge(p_arr->_halfedge(e), p_arr->_vertex(v),
|
DHalfedge* he = p_arr->_split_edge(p_arr->_halfedge(e), p_arr->_vertex(v),
|
||||||
cv1, cv2);
|
cv1, cv2);
|
||||||
|
|
||||||
CGAL_assertion (he != NULL);
|
CGAL_assertion (he != nullptr);
|
||||||
return (p_arr->_handle_for(he));
|
return (p_arr->_handle_for(he));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -673,7 +673,7 @@ public:
|
||||||
{
|
{
|
||||||
DFace* f =
|
DFace* f =
|
||||||
p_arr->_remove_edge(p_arr->_halfedge (e), remove_source, remove_target);
|
p_arr->_remove_edge(p_arr->_halfedge (e), remove_source, remove_target);
|
||||||
CGAL_assertion(f != NULL);
|
CGAL_assertion(f != nullptr);
|
||||||
return (p_arr->_handle_for(f));
|
return (p_arr->_handle_for(f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -687,9 +687,9 @@ public:
|
||||||
{
|
{
|
||||||
DHalfedge* he1 = p_arr->_halfedge(e1);
|
DHalfedge* he1 = p_arr->_halfedge(e1);
|
||||||
DHalfedge* he2 = p_arr->_halfedge(e2);
|
DHalfedge* he2 = p_arr->_halfedge(e2);
|
||||||
const DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
|
const DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : nullptr;
|
||||||
if (ic1 == NULL) return (false);
|
if (ic1 == nullptr) return (false);
|
||||||
const DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
|
const DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : nullptr;
|
||||||
return (ic1 == ic2);
|
return (ic1 == ic2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -703,9 +703,9 @@ public:
|
||||||
{
|
{
|
||||||
DHalfedge* he1 = p_arr->_halfedge(e1);
|
DHalfedge* he1 = p_arr->_halfedge(e1);
|
||||||
DHalfedge* he2 = p_arr->_halfedge(e2);
|
DHalfedge* he2 = p_arr->_halfedge(e2);
|
||||||
const DOuter_ccb* oc1 = (he1->is_on_outer_ccb()) ? he1->outer_ccb() : NULL;
|
const DOuter_ccb* oc1 = (he1->is_on_outer_ccb()) ? he1->outer_ccb() : nullptr;
|
||||||
if (oc1 == NULL) return (false);
|
if (oc1 == nullptr) return (false);
|
||||||
const DOuter_ccb* oc2 = (he2->is_on_outer_ccb()) ? he2->outer_ccb() : NULL;
|
const DOuter_ccb* oc2 = (he2->is_on_outer_ccb()) ? he2->outer_ccb() : nullptr;
|
||||||
return (oc1 == oc2);
|
return (oc1 == oc2);
|
||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
@ -797,7 +797,7 @@ public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Create a new vertex.
|
* Create a new vertex.
|
||||||
* \param p A pointer to the point (may be NULL in case of a vertex at
|
* \param p A pointer to the point (may be nullptr in case of a vertex at
|
||||||
* infinity).
|
* infinity).
|
||||||
* \param ps_x The boundary condition at x.
|
* \param ps_x The boundary condition at x.
|
||||||
* \param ps_y The boundary condition at y.
|
* \param ps_y The boundary condition at y.
|
||||||
|
|
@ -807,14 +807,14 @@ public:
|
||||||
Arr_parameter_space ps_x, Arr_parameter_space ps_y)
|
Arr_parameter_space ps_x, Arr_parameter_space ps_y)
|
||||||
{
|
{
|
||||||
Dcel_vertex* new_v = p_arr->_dcel().new_vertex();
|
Dcel_vertex* new_v = p_arr->_dcel().new_vertex();
|
||||||
if (p != NULL) {
|
if (p != nullptr) {
|
||||||
typename Dcel::Vertex::Point* p_pt = p_arr->_new_point(*p);
|
typename Dcel::Vertex::Point* p_pt = p_arr->_new_point(*p);
|
||||||
new_v->set_point(p_pt);
|
new_v->set_point(p_pt);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
CGAL_precondition (p_arr->is_open(ps_x, ps_y));
|
CGAL_precondition (p_arr->is_open(ps_x, ps_y));
|
||||||
new_v->set_point (NULL);
|
new_v->set_point (nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
new_v->set_boundary (ps_x, ps_y);
|
new_v->set_boundary (ps_x, ps_y);
|
||||||
|
|
@ -823,7 +823,7 @@ public:
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Create a new edge (halfedge pair), associated with the given curve.
|
* Create a new edge (halfedge pair), associated with the given curve.
|
||||||
* \param cv A pointer to the x-monotone curve (may be NULL in case of
|
* \param cv A pointer to the x-monotone curve (may be nullptr in case of
|
||||||
* a fictitious edge).
|
* a fictitious edge).
|
||||||
* \return A pointer to one of the created DCEL halfedge.
|
* \return A pointer to one of the created DCEL halfedge.
|
||||||
*/
|
*/
|
||||||
|
|
@ -831,11 +831,11 @@ public:
|
||||||
{
|
{
|
||||||
Dcel_halfedge* new_he = p_arr->_dcel().new_edge();
|
Dcel_halfedge* new_he = p_arr->_dcel().new_edge();
|
||||||
|
|
||||||
if (cv != NULL) {
|
if (cv != nullptr) {
|
||||||
typename Dcel::Halfedge::X_monotone_curve* p_cv = p_arr->_new_curve(*cv);
|
typename Dcel::Halfedge::X_monotone_curve* p_cv = p_arr->_new_curve(*cv);
|
||||||
new_he->set_curve(p_cv);
|
new_he->set_curve(p_cv);
|
||||||
}
|
}
|
||||||
else new_he->set_curve(NULL);
|
else new_he->set_curve(nullptr);
|
||||||
return new_he;
|
return new_he;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -132,13 +132,13 @@ public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_bounded_planar_topology_traits_2() :
|
Arr_bounded_planar_topology_traits_2() :
|
||||||
Base(),
|
Base(),
|
||||||
unb_face(NULL)
|
unb_face(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor from a geometry-traits object. */
|
/*! Constructor from a geometry-traits object. */
|
||||||
Arr_bounded_planar_topology_traits_2(const Gt2* traits) :
|
Arr_bounded_planar_topology_traits_2(const Gt2* traits) :
|
||||||
Base(traits),
|
Base(traits),
|
||||||
unb_face(NULL)
|
unb_face(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Assign the contents of another topology-traits class. */
|
/*! Assign the contents of another topology-traits class. */
|
||||||
|
|
@ -347,7 +347,7 @@ public:
|
||||||
Arr_parameter_space /* ps_y */) const
|
Arr_parameter_space /* ps_y */) const
|
||||||
{
|
{
|
||||||
CGAL_error();
|
CGAL_error();
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Locate a DCEL feature that contains the given curve end.
|
/*! Locate a DCEL feature that contains the given curve end.
|
||||||
|
|
@ -379,7 +379,7 @@ public:
|
||||||
{
|
{
|
||||||
// This function should never be called:
|
// This function should never be called:
|
||||||
CGAL_error();
|
CGAL_error();
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Determine whether the given face is unbounded.
|
/*! Determine whether the given face is unbounded.
|
||||||
|
|
@ -406,7 +406,7 @@ public:
|
||||||
{
|
{
|
||||||
// This function should never be called:
|
// This function should never be called:
|
||||||
CGAL_error();
|
CGAL_error();
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! reference_face (const version).
|
//! reference_face (const version).
|
||||||
|
|
|
||||||
|
|
@ -137,13 +137,13 @@ public:
|
||||||
base_objects.begin(); it != base_objects.end(); ++it)
|
base_objects.begin(); it != base_objects.end(); ++it)
|
||||||
{
|
{
|
||||||
base_x_curve = object_cast<Base_x_monotone_curve_2>(&(*it));
|
base_x_curve = object_cast<Base_x_monotone_curve_2>(&(*it));
|
||||||
if (base_x_curve != NULL) {
|
if (base_x_curve != nullptr) {
|
||||||
// Current object is an x-monotone curve: Attach data to it.
|
// Current object is an x-monotone curve: Attach data to it.
|
||||||
*oi++ = make_object(X_monotone_curve_2(*base_x_curve, xdata));
|
*oi++ = make_object(X_monotone_curve_2(*base_x_curve, xdata));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Current object is an isolated point: Leave it as is.
|
// Current object is an isolated point: Leave it as is.
|
||||||
CGAL_assertion(object_cast<Point_2>(&(*it)) != NULL);
|
CGAL_assertion(object_cast<Point_2>(&(*it)) != nullptr);
|
||||||
*oi++ = *it;
|
*oi++ = *it;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -219,7 +219,7 @@ public:
|
||||||
for (typename std::list<CGAL::Object>::const_iterator it =
|
for (typename std::list<CGAL::Object>::const_iterator it =
|
||||||
base_objects.begin(); it != base_objects.end(); ++it)
|
base_objects.begin(); it != base_objects.end(); ++it)
|
||||||
{
|
{
|
||||||
if ((base_cv = object_cast<Base_x_monotone_curve_2>(&(*it))) != NULL) {
|
if ((base_cv = object_cast<Base_x_monotone_curve_2>(&(*it))) != nullptr) {
|
||||||
// The current intersection object is an overlapping x-monotone
|
// The current intersection object is an overlapping x-monotone
|
||||||
// curve: Merge the data fields of both intersecting curves and
|
// curve: Merge the data fields of both intersecting curves and
|
||||||
// associate the result with the overlapping curve.
|
// associate the result with the overlapping curve.
|
||||||
|
|
|
||||||
|
|
@ -92,31 +92,31 @@ protected:
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_vertex_base() :
|
Arr_vertex_base() :
|
||||||
p_inc(NULL),
|
p_inc(nullptr),
|
||||||
p_pt(NULL)
|
p_pt(nullptr)
|
||||||
{ pss[0] = pss[1] = static_cast<char>(CGAL::ARR_INTERIOR); }
|
{ pss[0] = pss[1] = static_cast<char>(CGAL::ARR_INTERIOR); }
|
||||||
|
|
||||||
/*! Destructor. */
|
/*! Destructor. */
|
||||||
virtual ~Arr_vertex_base() {}
|
virtual ~Arr_vertex_base() {}
|
||||||
|
|
||||||
/*! Check if the point pointer is NULL. */
|
/*! Check if the point pointer is nullptr. */
|
||||||
bool has_null_point() const { return (p_pt == NULL); }
|
bool has_null_point() const { return (p_pt == nullptr); }
|
||||||
|
|
||||||
/*! Get the point (const version). */
|
/*! Get the point (const version). */
|
||||||
const Point& point() const
|
const Point& point() const
|
||||||
{
|
{
|
||||||
CGAL_assertion(p_pt != NULL);
|
CGAL_assertion(p_pt != nullptr);
|
||||||
return (*p_pt);
|
return (*p_pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the point (non-const version). */
|
/*! Get the point (non-const version). */
|
||||||
Point& point()
|
Point& point()
|
||||||
{
|
{
|
||||||
CGAL_assertion(p_pt != NULL);
|
CGAL_assertion(p_pt != nullptr);
|
||||||
return (*p_pt);
|
return (*p_pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Set the point (may be a NULL point). */
|
/*! Set the point (may be a nullptr point). */
|
||||||
void set_point(Point* p) { p_pt = p; }
|
void set_point(Point* p) { p_pt = p; }
|
||||||
|
|
||||||
/*! Get the boundary type in x. */
|
/*! Get the boundary type in x. */
|
||||||
|
|
@ -175,31 +175,31 @@ protected:
|
||||||
public:
|
public:
|
||||||
/*! Default constructor */
|
/*! Default constructor */
|
||||||
Arr_halfedge_base() :
|
Arr_halfedge_base() :
|
||||||
p_opp(NULL),
|
p_opp(nullptr),
|
||||||
p_prev(NULL),
|
p_prev(nullptr),
|
||||||
p_next(NULL),
|
p_next(nullptr),
|
||||||
p_v(NULL),
|
p_v(nullptr),
|
||||||
p_comp(NULL),
|
p_comp(nullptr),
|
||||||
p_cv(NULL)
|
p_cv(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Destructor. */
|
/*! Destructor. */
|
||||||
virtual ~Arr_halfedge_base() {}
|
virtual ~Arr_halfedge_base() {}
|
||||||
|
|
||||||
/*! Check if the curve pointer is NULL. */
|
/*! Check if the curve pointer is nullptr. */
|
||||||
bool has_null_curve() const { return (p_cv == NULL); }
|
bool has_null_curve() const { return (p_cv == nullptr); }
|
||||||
|
|
||||||
/*! Get the x-monotone curve (const version). */
|
/*! Get the x-monotone curve (const version). */
|
||||||
const X_monotone_curve& curve() const
|
const X_monotone_curve& curve() const
|
||||||
{
|
{
|
||||||
CGAL_precondition(p_cv != NULL);
|
CGAL_precondition(p_cv != nullptr);
|
||||||
return (*p_cv);
|
return (*p_cv);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the x-monotone curve (non-const version). */
|
/*! Get the x-monotone curve (non-const version). */
|
||||||
X_monotone_curve& curve()
|
X_monotone_curve& curve()
|
||||||
{
|
{
|
||||||
CGAL_precondition(p_cv != NULL);
|
CGAL_precondition(p_cv != nullptr);
|
||||||
return (*p_cv);
|
return (*p_cv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -712,7 +712,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_outer_ccb() : p_f(NULL), iter_is_not_singular(false) {}
|
Arr_outer_ccb() : p_f(nullptr), iter_is_not_singular(false) {}
|
||||||
|
|
||||||
/*! Copy constructor. */
|
/*! Copy constructor. */
|
||||||
Arr_outer_ccb(const Arr_outer_ccb& other) :
|
Arr_outer_ccb(const Arr_outer_ccb& other) :
|
||||||
|
|
@ -778,7 +778,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_inner_ccb() : p_f(NULL), iter_is_not_singular(false) {}
|
Arr_inner_ccb() : p_f(nullptr), iter_is_not_singular(false) {}
|
||||||
|
|
||||||
/*! Copy constructor. */
|
/*! Copy constructor. */
|
||||||
Arr_inner_ccb(const Arr_inner_ccb& other) :
|
Arr_inner_ccb(const Arr_inner_ccb& other) :
|
||||||
|
|
@ -843,7 +843,7 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_isolated_vertex() : p_f(NULL), iter_is_not_singular(false) {}
|
Arr_isolated_vertex() : p_f(nullptr), iter_is_not_singular(false) {}
|
||||||
|
|
||||||
/*! Copy constructor. */
|
/*! Copy constructor. */
|
||||||
Arr_isolated_vertex(const Arr_isolated_vertex& other) :
|
Arr_isolated_vertex(const Arr_isolated_vertex& other) :
|
||||||
|
|
|
||||||
|
|
@ -117,10 +117,10 @@ public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
_Bezier_curve_2_rep () :
|
_Bezier_curve_2_rep () :
|
||||||
_no_self_inter (true),
|
_no_self_inter (true),
|
||||||
p_polyX(NULL),
|
p_polyX(nullptr),
|
||||||
p_normX(NULL),
|
p_normX(nullptr),
|
||||||
p_polyY(NULL),
|
p_polyY(nullptr),
|
||||||
p_normY(NULL)
|
p_normY(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Copy constructor (isn't really used). */
|
/*! Copy constructor (isn't really used). */
|
||||||
|
|
@ -128,18 +128,18 @@ public:
|
||||||
_ctrl_pts(other._ctrl_pts),
|
_ctrl_pts(other._ctrl_pts),
|
||||||
_bbox(other._bbox),
|
_bbox(other._bbox),
|
||||||
_no_self_inter(other._no_self_inter),
|
_no_self_inter(other._no_self_inter),
|
||||||
p_polyX(NULL),
|
p_polyX(nullptr),
|
||||||
p_normX(NULL),
|
p_normX(nullptr),
|
||||||
p_polyY(NULL),
|
p_polyY(nullptr),
|
||||||
p_normY(NULL)
|
p_normY(nullptr)
|
||||||
{
|
{
|
||||||
if (other.p_polyX != NULL)
|
if (other.p_polyX != nullptr)
|
||||||
p_polyX = new Polynomial(*(other.p_polyX));
|
p_polyX = new Polynomial(*(other.p_polyX));
|
||||||
if (other.p_polyY != NULL)
|
if (other.p_polyY != nullptr)
|
||||||
p_polyY = new Polynomial(*(other.p_polyY));
|
p_polyY = new Polynomial(*(other.p_polyY));
|
||||||
if (other.p_normX != NULL)
|
if (other.p_normX != nullptr)
|
||||||
p_normX = new Integer(*(other.p_normX));
|
p_normX = new Integer(*(other.p_normX));
|
||||||
if (other.p_normY != NULL)
|
if (other.p_normY != nullptr)
|
||||||
p_normY = new Integer(*(other.p_normY));
|
p_normY = new Integer(*(other.p_normY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -152,10 +152,10 @@ public:
|
||||||
*/
|
*/
|
||||||
template <class InputIterator>
|
template <class InputIterator>
|
||||||
_Bezier_curve_2_rep (InputIterator pts_begin, InputIterator pts_end) :
|
_Bezier_curve_2_rep (InputIterator pts_begin, InputIterator pts_end) :
|
||||||
p_polyX(NULL),
|
p_polyX(nullptr),
|
||||||
p_normX(NULL),
|
p_normX(nullptr),
|
||||||
p_polyY(NULL),
|
p_polyY(nullptr),
|
||||||
p_normY(NULL)
|
p_normY(nullptr)
|
||||||
{
|
{
|
||||||
// Copy the control points and compute their bounding box.
|
// Copy the control points and compute their bounding box.
|
||||||
const int pts_size = static_cast<int>(std::distance (pts_begin, pts_end));
|
const int pts_size = static_cast<int>(std::distance (pts_begin, pts_end));
|
||||||
|
|
@ -218,13 +218,13 @@ public:
|
||||||
/*! Destructor. */
|
/*! Destructor. */
|
||||||
~_Bezier_curve_2_rep ()
|
~_Bezier_curve_2_rep ()
|
||||||
{
|
{
|
||||||
if (p_polyX != NULL)
|
if (p_polyX != nullptr)
|
||||||
delete p_polyX;
|
delete p_polyX;
|
||||||
if (p_normX != NULL)
|
if (p_normX != nullptr)
|
||||||
delete p_normX;
|
delete p_normX;
|
||||||
if (p_polyY != NULL)
|
if (p_polyY != nullptr)
|
||||||
delete p_polyY;
|
delete p_polyY;
|
||||||
if (p_normY != NULL)
|
if (p_normY != nullptr)
|
||||||
delete p_normY;
|
delete p_normY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -234,14 +234,14 @@ public:
|
||||||
/*! Check if the polynomials are already constructed. */
|
/*! Check if the polynomials are already constructed. */
|
||||||
bool has_polynomials () const
|
bool has_polynomials () const
|
||||||
{
|
{
|
||||||
return (p_polyX != NULL && p_normX != NULL &&
|
return (p_polyX != nullptr && p_normX != nullptr &&
|
||||||
p_polyY != NULL && p_normY != NULL);
|
p_polyY != nullptr && p_normY != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the polynomial X(t). */
|
/*! Get the polynomial X(t). */
|
||||||
const Polynomial& x_polynomial () const
|
const Polynomial& x_polynomial () const
|
||||||
{
|
{
|
||||||
if (p_polyX == NULL)
|
if (p_polyX == nullptr)
|
||||||
_construct_polynomials ();
|
_construct_polynomials ();
|
||||||
|
|
||||||
return (*p_polyX);
|
return (*p_polyX);
|
||||||
|
|
@ -250,7 +250,7 @@ public:
|
||||||
/*! Get the normalizing factor for X(t). */
|
/*! Get the normalizing factor for X(t). */
|
||||||
const Integer& x_norm () const
|
const Integer& x_norm () const
|
||||||
{
|
{
|
||||||
if (p_normX == NULL)
|
if (p_normX == nullptr)
|
||||||
_construct_polynomials ();
|
_construct_polynomials ();
|
||||||
|
|
||||||
return (*p_normX);
|
return (*p_normX);
|
||||||
|
|
@ -259,7 +259,7 @@ public:
|
||||||
/*! Get the polynomial Y(t). */
|
/*! Get the polynomial Y(t). */
|
||||||
const Polynomial& y_polynomial () const
|
const Polynomial& y_polynomial () const
|
||||||
{
|
{
|
||||||
if (p_polyY == NULL)
|
if (p_polyY == nullptr)
|
||||||
_construct_polynomials ();
|
_construct_polynomials ();
|
||||||
|
|
||||||
return (*p_polyY);
|
return (*p_polyY);
|
||||||
|
|
@ -268,7 +268,7 @@ public:
|
||||||
/*! Get the normalizing factor for Y(t). */
|
/*! Get the normalizing factor for Y(t). */
|
||||||
const Integer& y_norm () const
|
const Integer& y_norm () const
|
||||||
{
|
{
|
||||||
if (p_normY == NULL)
|
if (p_normY == nullptr)
|
||||||
_construct_polynomials ();
|
_construct_polynomials ();
|
||||||
|
|
||||||
return (*p_normY);
|
return (*p_normY);
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ private:
|
||||||
Originator (const Curve_2& c, const Algebraic& t) :
|
Originator (const Curve_2& c, const Algebraic& t) :
|
||||||
_curve (c),
|
_curve (c),
|
||||||
_xid (0),
|
_xid (0),
|
||||||
p_t (NULL)
|
p_t (nullptr)
|
||||||
{
|
{
|
||||||
set_parameter (t);
|
set_parameter (t);
|
||||||
}
|
}
|
||||||
|
|
@ -118,7 +118,7 @@ private:
|
||||||
const Algebraic& t) :
|
const Algebraic& t) :
|
||||||
_curve (c),
|
_curve (c),
|
||||||
_xid (xid),
|
_xid (xid),
|
||||||
p_t (NULL)
|
p_t (nullptr)
|
||||||
{
|
{
|
||||||
set_parameter (t);
|
set_parameter (t);
|
||||||
}
|
}
|
||||||
|
|
@ -128,7 +128,7 @@ private:
|
||||||
_curve (c),
|
_curve (c),
|
||||||
_xid (0),
|
_xid (0),
|
||||||
_bpb (bpb),
|
_bpb (bpb),
|
||||||
p_t (NULL)
|
p_t (nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor with bounding information and no exact representation. */
|
/*! Constructor with bounding information and no exact representation. */
|
||||||
|
|
@ -137,7 +137,7 @@ private:
|
||||||
_curve (c),
|
_curve (c),
|
||||||
_xid (xid),
|
_xid (xid),
|
||||||
_bpb (bpb),
|
_bpb (bpb),
|
||||||
p_t (NULL)
|
p_t (nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Copy constructor. */
|
/*! Copy constructor. */
|
||||||
|
|
@ -145,17 +145,17 @@ private:
|
||||||
_curve (other._curve),
|
_curve (other._curve),
|
||||||
_xid (other._xid),
|
_xid (other._xid),
|
||||||
_bpb (other._bpb),
|
_bpb (other._bpb),
|
||||||
p_t (NULL)
|
p_t (nullptr)
|
||||||
{
|
{
|
||||||
// Deep copy of lazy instantiation
|
// Deep copy of lazy instantiation
|
||||||
if (other.p_t != NULL)
|
if (other.p_t != nullptr)
|
||||||
p_t = new Algebraic (*(other.p_t));
|
p_t = new Algebraic (*(other.p_t));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Destructor. */
|
/*! Destructor. */
|
||||||
~Originator()
|
~Originator()
|
||||||
{
|
{
|
||||||
if (p_t != NULL)
|
if (p_t != nullptr)
|
||||||
delete p_t;
|
delete p_t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -167,9 +167,9 @@ private:
|
||||||
return (*this);
|
return (*this);
|
||||||
|
|
||||||
// Free memory, if necessary.
|
// Free memory, if necessary.
|
||||||
if (p_t != NULL)
|
if (p_t != nullptr)
|
||||||
delete p_t;
|
delete p_t;
|
||||||
p_t = NULL;
|
p_t = nullptr;
|
||||||
|
|
||||||
// Copy the data members.
|
// Copy the data members.
|
||||||
_curve = other._curve;
|
_curve = other._curve;
|
||||||
|
|
@ -177,7 +177,7 @@ private:
|
||||||
_bpb = other._bpb;
|
_bpb = other._bpb;
|
||||||
|
|
||||||
// Deep copy of lazy instantiation
|
// Deep copy of lazy instantiation
|
||||||
if (other.p_t != NULL)
|
if (other.p_t != nullptr)
|
||||||
p_t = new Algebraic (*(other.p_t));
|
p_t = new Algebraic (*(other.p_t));
|
||||||
|
|
||||||
return (*this);
|
return (*this);
|
||||||
|
|
@ -211,7 +211,7 @@ private:
|
||||||
/*! Check if the algberaic parameter is available. */
|
/*! Check if the algberaic parameter is available. */
|
||||||
bool has_parameter () const
|
bool has_parameter () const
|
||||||
{
|
{
|
||||||
return (p_t != NULL);
|
return (p_t != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -220,7 +220,7 @@ private:
|
||||||
*/
|
*/
|
||||||
const Algebraic& parameter () const
|
const Algebraic& parameter () const
|
||||||
{
|
{
|
||||||
CGAL_precondition (p_t != NULL);
|
CGAL_precondition (p_t != nullptr);
|
||||||
return (*p_t);
|
return (*p_t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -230,7 +230,7 @@ private:
|
||||||
*/
|
*/
|
||||||
void set_parameter (const Algebraic& t)
|
void set_parameter (const Algebraic& t)
|
||||||
{
|
{
|
||||||
CGAL_precondition (p_t == NULL);
|
CGAL_precondition (p_t == nullptr);
|
||||||
|
|
||||||
p_t = new Algebraic (t);
|
p_t = new Algebraic (t);
|
||||||
|
|
||||||
|
|
@ -305,28 +305,28 @@ public:
|
||||||
|
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
_Bezier_point_2_rep () :
|
_Bezier_point_2_rep () :
|
||||||
p_alg_x (NULL),
|
p_alg_x (nullptr),
|
||||||
p_rat_x (NULL),
|
p_rat_x (nullptr),
|
||||||
p_alg_y (NULL),
|
p_alg_y (nullptr),
|
||||||
p_rat_y (NULL)
|
p_rat_y (nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Copy constructor. */
|
/*! Copy constructor. */
|
||||||
_Bezier_point_2_rep (const Self& pt) :
|
_Bezier_point_2_rep (const Self& pt) :
|
||||||
p_alg_x (NULL),
|
p_alg_x (nullptr),
|
||||||
p_rat_x (NULL),
|
p_rat_x (nullptr),
|
||||||
p_alg_y (NULL),
|
p_alg_y (nullptr),
|
||||||
p_rat_y (NULL),
|
p_rat_y (nullptr),
|
||||||
_origs (pt._origs),
|
_origs (pt._origs),
|
||||||
_bbox (pt._bbox)
|
_bbox (pt._bbox)
|
||||||
{
|
{
|
||||||
if (pt.p_alg_x != NULL)
|
if (pt.p_alg_x != nullptr)
|
||||||
p_alg_x = new Algebraic (*(pt.p_alg_x));
|
p_alg_x = new Algebraic (*(pt.p_alg_x));
|
||||||
if (pt.p_rat_x != NULL)
|
if (pt.p_rat_x != nullptr)
|
||||||
p_rat_x = new Rational (*(pt.p_rat_x));
|
p_rat_x = new Rational (*(pt.p_rat_x));
|
||||||
if (pt.p_alg_y != NULL)
|
if (pt.p_alg_y != nullptr)
|
||||||
p_alg_y = new Algebraic (*(pt.p_alg_y));
|
p_alg_y = new Algebraic (*(pt.p_alg_y));
|
||||||
if (pt.p_rat_y != NULL)
|
if (pt.p_rat_y != nullptr)
|
||||||
p_rat_y = new Rational (*(pt.p_rat_y));
|
p_rat_y = new Rational (*(pt.p_rat_y));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -336,8 +336,8 @@ public:
|
||||||
* \param y The exact y-coordinate.
|
* \param y The exact y-coordinate.
|
||||||
*/
|
*/
|
||||||
_Bezier_point_2_rep (const Algebraic& x, const Algebraic& y, bool) :
|
_Bezier_point_2_rep (const Algebraic& x, const Algebraic& y, bool) :
|
||||||
p_rat_x (NULL),
|
p_rat_x (nullptr),
|
||||||
p_rat_y (NULL)
|
p_rat_y (nullptr)
|
||||||
{
|
{
|
||||||
p_alg_x = new Algebraic (x);
|
p_alg_x = new Algebraic (x);
|
||||||
p_alg_y = new Algebraic (y);
|
p_alg_y = new Algebraic (y);
|
||||||
|
|
@ -407,13 +407,13 @@ public:
|
||||||
/*! Destructor. */
|
/*! Destructor. */
|
||||||
~_Bezier_point_2_rep ()
|
~_Bezier_point_2_rep ()
|
||||||
{
|
{
|
||||||
if (p_rat_x != NULL)
|
if (p_rat_x != nullptr)
|
||||||
delete p_rat_x;
|
delete p_rat_x;
|
||||||
if (p_alg_x != NULL)
|
if (p_alg_x != nullptr)
|
||||||
delete p_alg_x;
|
delete p_alg_x;
|
||||||
if (p_rat_y != NULL)
|
if (p_rat_y != nullptr)
|
||||||
delete p_rat_y;
|
delete p_rat_y;
|
||||||
if (p_alg_y != NULL)
|
if (p_alg_y != nullptr)
|
||||||
delete p_alg_y;
|
delete p_alg_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -423,24 +423,24 @@ public:
|
||||||
if (this == &pt)
|
if (this == &pt)
|
||||||
return (*this);
|
return (*this);
|
||||||
|
|
||||||
if (p_rat_x != NULL)
|
if (p_rat_x != nullptr)
|
||||||
delete p_rat_x;
|
delete p_rat_x;
|
||||||
if (p_alg_x != NULL)
|
if (p_alg_x != nullptr)
|
||||||
delete p_alg_x;
|
delete p_alg_x;
|
||||||
if (p_rat_y != NULL)
|
if (p_rat_y != nullptr)
|
||||||
delete p_rat_y;
|
delete p_rat_y;
|
||||||
if (p_alg_y != NULL)
|
if (p_alg_y != nullptr)
|
||||||
delete p_alg_y;
|
delete p_alg_y;
|
||||||
p_alg_x = p_rat_x = p_alg_y = p_rat_y = NULL;
|
p_alg_x = p_rat_x = p_alg_y = p_rat_y = nullptr;
|
||||||
|
|
||||||
|
|
||||||
if (pt.p_alg_x != NULL)
|
if (pt.p_alg_x != nullptr)
|
||||||
p_alg_x = new Algebraic (*(pt.p_alg_x));
|
p_alg_x = new Algebraic (*(pt.p_alg_x));
|
||||||
if (pt.p_rat_x != NULL)
|
if (pt.p_rat_x != nullptr)
|
||||||
p_rat_x = new Rational (*(pt.p_rat_x));
|
p_rat_x = new Rational (*(pt.p_rat_x));
|
||||||
if (pt.p_alg_y != NULL)
|
if (pt.p_alg_y != nullptr)
|
||||||
p_alg_y = new Algebraic (*(pt.p_alg_y));
|
p_alg_y = new Algebraic (*(pt.p_alg_y));
|
||||||
if (pt.p_rat_y != NULL)
|
if (pt.p_rat_y != nullptr)
|
||||||
p_rat_y = new Rational (*(pt.p_rat_y));
|
p_rat_y = new Rational (*(pt.p_rat_y));
|
||||||
|
|
||||||
_origs = pt._origs;
|
_origs = pt._origs;
|
||||||
|
|
@ -452,13 +452,13 @@ public:
|
||||||
/*! Check if the point is exactly computed. */
|
/*! Check if the point is exactly computed. */
|
||||||
inline bool is_exact () const
|
inline bool is_exact () const
|
||||||
{
|
{
|
||||||
return (p_alg_x != NULL && p_alg_y != NULL);
|
return (p_alg_x != nullptr && p_alg_y != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Check if the point has rational coordinates. */
|
/*! Check if the point has rational coordinates. */
|
||||||
inline bool is_rational () const
|
inline bool is_rational () const
|
||||||
{
|
{
|
||||||
return (p_rat_x != NULL && p_rat_y != NULL);
|
return (p_rat_x != nullptr && p_rat_y != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -1060,8 +1060,8 @@ _Bezier_point_2_rep<RatKer, AlgKer, NtTrt, BndTrt>::_Bezier_point_2_rep
|
||||||
template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
|
template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
|
||||||
_Bezier_point_2_rep<RatKer, AlgKer, NtTrt, BndTrt>::_Bezier_point_2_rep
|
_Bezier_point_2_rep<RatKer, AlgKer, NtTrt, BndTrt>::_Bezier_point_2_rep
|
||||||
(const Curve_2& B, const Algebraic& t0) :
|
(const Curve_2& B, const Algebraic& t0) :
|
||||||
p_rat_x (NULL),
|
p_rat_x (nullptr),
|
||||||
p_rat_y (NULL)
|
p_rat_y (nullptr)
|
||||||
{
|
{
|
||||||
// Create the originator pair <B(t), t0>.
|
// Create the originator pair <B(t), t0>.
|
||||||
// Note that this constructor also takes care of the Bez_bound
|
// Note that this constructor also takes care of the Bez_bound
|
||||||
|
|
@ -1095,8 +1095,8 @@ template <class RatKer, class AlgKer, class NtTrt, class BndTrt>
|
||||||
_Bezier_point_2_rep<RatKer, AlgKer, NtTrt, BndTrt>::_Bezier_point_2_rep
|
_Bezier_point_2_rep<RatKer, AlgKer, NtTrt, BndTrt>::_Bezier_point_2_rep
|
||||||
(const Curve_2& B, unsigned int xid,
|
(const Curve_2& B, unsigned int xid,
|
||||||
const Algebraic& t0) :
|
const Algebraic& t0) :
|
||||||
p_rat_x (NULL),
|
p_rat_x (nullptr),
|
||||||
p_rat_y (NULL)
|
p_rat_y (nullptr)
|
||||||
{
|
{
|
||||||
// Create the originator pair <B(t), t0>.
|
// Create the originator pair <B(t), t0>.
|
||||||
// Note that this constructor also takes care of the Bez_bound
|
// Note that this constructor also takes care of the Bez_bound
|
||||||
|
|
|
||||||
|
|
@ -1187,7 +1187,7 @@ public:
|
||||||
*/
|
*/
|
||||||
template <class OutputIterator>
|
template <class OutputIterator>
|
||||||
OutputIterator intersect (const Self& cv, OutputIterator oi,
|
OutputIterator intersect (const Self& cv, OutputIterator oi,
|
||||||
Intersection_map *inter_map = NULL) const
|
Intersection_map *inter_map = nullptr) const
|
||||||
{
|
{
|
||||||
// First check whether the two arcs have the same supporting curve.
|
// First check whether the two arcs have the same supporting curve.
|
||||||
if (has_same_supporting_curve (cv))
|
if (has_same_supporting_curve (cv))
|
||||||
|
|
@ -1232,7 +1232,7 @@ public:
|
||||||
Intersection_list inter_list;
|
Intersection_list inter_list;
|
||||||
bool invalid_ids = false;
|
bool invalid_ids = false;
|
||||||
|
|
||||||
if (inter_map != NULL && _index() != 0 && cv._index() != 0)
|
if (inter_map != nullptr && _index() != 0 && cv._index() != 0)
|
||||||
{
|
{
|
||||||
if (_index() < cv._index())
|
if (_index() < cv._index())
|
||||||
id_pair = Curve_id_pair (_index(), cv._index());
|
id_pair = Curve_id_pair (_index(), cv._index());
|
||||||
|
|
@ -1245,12 +1245,12 @@ public:
|
||||||
{
|
{
|
||||||
// In case one of the IDs is invalid, we do not look in the map neither
|
// In case one of the IDs is invalid, we do not look in the map neither
|
||||||
// we cache the results.
|
// we cache the results.
|
||||||
if (inter_map != NULL)
|
if (inter_map != nullptr)
|
||||||
map_iter = inter_map->end();
|
map_iter = inter_map->end();
|
||||||
invalid_ids = true;
|
invalid_ids = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inter_map == NULL || map_iter == inter_map->end())
|
if (inter_map == nullptr || map_iter == inter_map->end())
|
||||||
{
|
{
|
||||||
// Compute the intersections points between the two supporting curves.
|
// Compute the intersections points between the two supporting curves.
|
||||||
if (is_linear())
|
if (is_linear())
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
Extra_data *_extra_data_P; // The extra data stored with the arc
|
Extra_data *_extra_data_P; // The extra data stored with the arc
|
||||||
// (may be NULL).
|
// (may be nullptr).
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
@ -128,7 +128,7 @@ public:
|
||||||
_r(0), _s(0), _t(0), _u(0), _v(0), _w(0),
|
_r(0), _s(0), _t(0), _u(0), _v(0), _w(0),
|
||||||
_orient (COLLINEAR),
|
_orient (COLLINEAR),
|
||||||
_info (0),
|
_info (0),
|
||||||
_extra_data_P (NULL)
|
_extra_data_P (nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -142,10 +142,10 @@ public:
|
||||||
_source(arc._source),
|
_source(arc._source),
|
||||||
_target(arc._target)
|
_target(arc._target)
|
||||||
{
|
{
|
||||||
if (arc._extra_data_P != NULL)
|
if (arc._extra_data_P != nullptr)
|
||||||
_extra_data_P = new Extra_data (*(arc._extra_data_P));
|
_extra_data_P = new Extra_data (*(arc._extra_data_P));
|
||||||
else
|
else
|
||||||
_extra_data_P = NULL;
|
_extra_data_P = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -155,7 +155,7 @@ public:
|
||||||
*/
|
*/
|
||||||
_Conic_arc_2 (const Rational& r, const Rational& s, const Rational& t,
|
_Conic_arc_2 (const Rational& r, const Rational& s, const Rational& t,
|
||||||
const Rational& u, const Rational& v, const Rational& w) :
|
const Rational& u, const Rational& v, const Rational& w) :
|
||||||
_extra_data_P (NULL)
|
_extra_data_P (nullptr)
|
||||||
{
|
{
|
||||||
// Make sure the given curve is an ellipse (4rs - t^2 should be positive).
|
// Make sure the given curve is an ellipse (4rs - t^2 should be positive).
|
||||||
CGAL_precondition (CGAL::sign (4*r*s - t*t) == POSITIVE);
|
CGAL_precondition (CGAL::sign (4*r*s - t*t) == POSITIVE);
|
||||||
|
|
@ -189,7 +189,7 @@ public:
|
||||||
_orient (orient),
|
_orient (orient),
|
||||||
_source (source),
|
_source (source),
|
||||||
_target (target),
|
_target (target),
|
||||||
_extra_data_P (NULL)
|
_extra_data_P (nullptr)
|
||||||
{
|
{
|
||||||
// Make sure that the source and the taget are not the same.
|
// Make sure that the source and the taget are not the same.
|
||||||
CGAL_precondition (Alg_kernel().compare_xy_2_object() (source,
|
CGAL_precondition (Alg_kernel().compare_xy_2_object() (source,
|
||||||
|
|
@ -214,7 +214,7 @@ public:
|
||||||
*/
|
*/
|
||||||
_Conic_arc_2 (const Rat_segment_2& seg) :
|
_Conic_arc_2 (const Rat_segment_2& seg) :
|
||||||
_orient (COLLINEAR),
|
_orient (COLLINEAR),
|
||||||
_extra_data_P (NULL)
|
_extra_data_P (nullptr)
|
||||||
{
|
{
|
||||||
// Set the source and target.
|
// Set the source and target.
|
||||||
Rat_kernel ker;
|
Rat_kernel ker;
|
||||||
|
|
@ -271,7 +271,7 @@ public:
|
||||||
*/
|
*/
|
||||||
_Conic_arc_2 (const Rat_circle_2& circ) :
|
_Conic_arc_2 (const Rat_circle_2& circ) :
|
||||||
_orient (CLOCKWISE),
|
_orient (CLOCKWISE),
|
||||||
_extra_data_P (NULL)
|
_extra_data_P (nullptr)
|
||||||
{
|
{
|
||||||
// Get the circle properties.
|
// Get the circle properties.
|
||||||
Rat_kernel ker;
|
Rat_kernel ker;
|
||||||
|
|
@ -316,7 +316,7 @@ public:
|
||||||
_orient(orient),
|
_orient(orient),
|
||||||
_source(source),
|
_source(source),
|
||||||
_target(target),
|
_target(target),
|
||||||
_extra_data_P (NULL)
|
_extra_data_P (nullptr)
|
||||||
{
|
{
|
||||||
// Make sure that the source and the taget are not the same.
|
// Make sure that the source and the taget are not the same.
|
||||||
CGAL_precondition (Alg_kernel().compare_xy_2_object() (source,
|
CGAL_precondition (Alg_kernel().compare_xy_2_object() (source,
|
||||||
|
|
@ -378,7 +378,7 @@ public:
|
||||||
_Conic_arc_2 (const Rat_point_2& p1,
|
_Conic_arc_2 (const Rat_point_2& p1,
|
||||||
const Rat_point_2& p2,
|
const Rat_point_2& p2,
|
||||||
const Rat_point_2& p3):
|
const Rat_point_2& p3):
|
||||||
_extra_data_P (NULL)
|
_extra_data_P (nullptr)
|
||||||
{
|
{
|
||||||
// Set the source and target.
|
// Set the source and target.
|
||||||
Rational x1 = p1.x();
|
Rational x1 = p1.x();
|
||||||
|
|
@ -467,7 +467,7 @@ public:
|
||||||
const Rat_point_2& p3,
|
const Rat_point_2& p3,
|
||||||
const Rat_point_2& p4,
|
const Rat_point_2& p4,
|
||||||
const Rat_point_2& p5) :
|
const Rat_point_2& p5) :
|
||||||
_extra_data_P(NULL)
|
_extra_data_P(nullptr)
|
||||||
{
|
{
|
||||||
// Make sure that no three points are collinear.
|
// Make sure that no three points are collinear.
|
||||||
Rat_kernel ker;
|
Rat_kernel ker;
|
||||||
|
|
@ -574,7 +574,7 @@ public:
|
||||||
const Rational& r_2, const Rational& s_2, const Rational& t_2,
|
const Rational& r_2, const Rational& s_2, const Rational& t_2,
|
||||||
const Rational& u_2, const Rational& v_2, const Rational& w_2):
|
const Rational& u_2, const Rational& v_2, const Rational& w_2):
|
||||||
_orient(orient),
|
_orient(orient),
|
||||||
_extra_data_P(NULL)
|
_extra_data_P(nullptr)
|
||||||
{
|
{
|
||||||
// Create the integer coefficients of the base conic.
|
// Create the integer coefficients of the base conic.
|
||||||
Rational rat_coeffs [6];
|
Rational rat_coeffs [6];
|
||||||
|
|
@ -753,7 +753,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual ~_Conic_arc_2 ()
|
virtual ~_Conic_arc_2 ()
|
||||||
{
|
{
|
||||||
if (_extra_data_P != NULL)
|
if (_extra_data_P != nullptr)
|
||||||
delete _extra_data_P;
|
delete _extra_data_P;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -767,7 +767,7 @@ public:
|
||||||
return (*this);
|
return (*this);
|
||||||
|
|
||||||
// Free any existing data.
|
// Free any existing data.
|
||||||
if (_extra_data_P != NULL)
|
if (_extra_data_P != nullptr)
|
||||||
delete _extra_data_P;
|
delete _extra_data_P;
|
||||||
|
|
||||||
// Copy the arc's attributes.
|
// Copy the arc's attributes.
|
||||||
|
|
@ -784,10 +784,10 @@ public:
|
||||||
_target = arc._target;
|
_target = arc._target;
|
||||||
|
|
||||||
// Duplicate the extra data, if necessary.
|
// Duplicate the extra data, if necessary.
|
||||||
if (arc._extra_data_P != NULL)
|
if (arc._extra_data_P != nullptr)
|
||||||
_extra_data_P = new Extra_data (*(arc._extra_data_P));
|
_extra_data_P = new Extra_data (*(arc._extra_data_P));
|
||||||
else
|
else
|
||||||
_extra_data_P = NULL;
|
_extra_data_P = nullptr;
|
||||||
|
|
||||||
return (*this);
|
return (*this);
|
||||||
}
|
}
|
||||||
|
|
@ -1204,7 +1204,7 @@ private:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_extra_data_P = NULL;
|
_extra_data_P = nullptr;
|
||||||
|
|
||||||
// Check whether we have a degree 2 curve.
|
// Check whether we have a degree 2 curve.
|
||||||
if ((CGAL::sign (_r) != ZERO ||
|
if ((CGAL::sign (_r) != ZERO ||
|
||||||
|
|
@ -1339,7 +1339,7 @@ private:
|
||||||
CGAL_assertion (is_ellipse);
|
CGAL_assertion (is_ellipse);
|
||||||
|
|
||||||
// We do not have to store any extra data with the arc.
|
// We do not have to store any extra data with the arc.
|
||||||
_extra_data_P = NULL;
|
_extra_data_P = nullptr;
|
||||||
|
|
||||||
// Mark that this arc is a full conic curve.
|
// Mark that this arc is a full conic curve.
|
||||||
if (is_ellipse)
|
if (is_ellipse)
|
||||||
|
|
@ -1470,9 +1470,9 @@ protected:
|
||||||
Sign _sign_of_extra_data (const Algebraic& px,
|
Sign _sign_of_extra_data (const Algebraic& px,
|
||||||
const Algebraic& py) const
|
const Algebraic& py) const
|
||||||
{
|
{
|
||||||
CGAL_assertion (_extra_data_P != NULL);
|
CGAL_assertion (_extra_data_P != nullptr);
|
||||||
|
|
||||||
if (_extra_data_P == NULL)
|
if (_extra_data_P == nullptr)
|
||||||
return (ZERO);
|
return (ZERO);
|
||||||
|
|
||||||
Algebraic val = (_extra_data_P->a*px + _extra_data_P->b*py +
|
Algebraic val = (_extra_data_P->a*px + _extra_data_P->b*py +
|
||||||
|
|
@ -1542,7 +1542,7 @@ protected:
|
||||||
return (true);
|
return (true);
|
||||||
|
|
||||||
// Check if we have extra data available.
|
// Check if we have extra data available.
|
||||||
if (_extra_data_P != NULL)
|
if (_extra_data_P != nullptr)
|
||||||
{
|
{
|
||||||
if (_extra_data_P->side != ZERO)
|
if (_extra_data_P->side != ZERO)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -522,7 +522,7 @@ public:
|
||||||
}
|
}
|
||||||
else if (this->_orient == COLLINEAR)
|
else if (this->_orient == COLLINEAR)
|
||||||
{
|
{
|
||||||
CGAL_assertion (this->_extra_data_P != NULL);
|
CGAL_assertion (this->_extra_data_P != nullptr);
|
||||||
|
|
||||||
// In this case the equation of the supporting line is given by the
|
// In this case the equation of the supporting line is given by the
|
||||||
// extra data structure.
|
// extra data structure.
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,7 @@ public:
|
||||||
m_cvP(cvP),
|
m_cvP(cvP),
|
||||||
m_index(index)
|
m_index(index)
|
||||||
{
|
{
|
||||||
m_num_pts = (m_cvP == NULL) ? 0 :
|
m_num_pts = (m_cvP == nullptr) ? 0 :
|
||||||
((m_cvP->number_of_subcurves() == 0) ?
|
((m_cvP->number_of_subcurves() == 0) ?
|
||||||
0 : (m_cvP->number_of_subcurves() + 1));
|
0 : (m_cvP->number_of_subcurves() + 1));
|
||||||
}
|
}
|
||||||
|
|
@ -246,7 +246,7 @@ public:
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Point_const_iterator() :
|
Point_const_iterator() :
|
||||||
m_cvP(NULL),
|
m_cvP(nullptr),
|
||||||
m_num_pts(0),
|
m_num_pts(0),
|
||||||
m_index(std::numeric_limits<size_type>::max BOOST_PREVENT_MACRO_SUBSTITUTION ())
|
m_index(std::numeric_limits<size_type>::max BOOST_PREVENT_MACRO_SUBSTITUTION ())
|
||||||
{}
|
{}
|
||||||
|
|
@ -256,7 +256,7 @@ public:
|
||||||
*/
|
*/
|
||||||
const Point_type_2& operator*() const
|
const Point_type_2& operator*() const
|
||||||
{
|
{
|
||||||
CGAL_assertion(m_cvP != NULL);
|
CGAL_assertion(m_cvP != nullptr);
|
||||||
CGAL_assertion((is_index_valid()) && (m_index < m_num_pts));
|
CGAL_assertion((is_index_valid()) && (m_index < m_num_pts));
|
||||||
|
|
||||||
// First point is the source of the first subcurve.
|
// First point is the source of the first subcurve.
|
||||||
|
|
@ -273,28 +273,28 @@ public:
|
||||||
/*! Increment operators. */
|
/*! Increment operators. */
|
||||||
Point_const_iterator& operator++()
|
Point_const_iterator& operator++()
|
||||||
{
|
{
|
||||||
if ((m_cvP != NULL) && (m_index < m_num_pts)) ++m_index;
|
if ((m_cvP != nullptr) && (m_index < m_num_pts)) ++m_index;
|
||||||
return (*this);
|
return (*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Point_const_iterator operator++(int)
|
Point_const_iterator operator++(int)
|
||||||
{
|
{
|
||||||
Point_const_iterator temp = *this;
|
Point_const_iterator temp = *this;
|
||||||
if ((m_cvP != NULL) && (m_index < m_num_pts)) ++m_index;
|
if ((m_cvP != nullptr) && (m_index < m_num_pts)) ++m_index;
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Decrement operators. */
|
/*! Decrement operators. */
|
||||||
Point_const_iterator& operator--()
|
Point_const_iterator& operator--()
|
||||||
{
|
{
|
||||||
if ((m_cvP != NULL) && (is_index_valid())) --m_index;
|
if ((m_cvP != nullptr) && (is_index_valid())) --m_index;
|
||||||
return (*this);
|
return (*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Point_const_iterator operator--(int)
|
Point_const_iterator operator--(int)
|
||||||
{
|
{
|
||||||
Point_const_iterator temp = *this;
|
Point_const_iterator temp = *this;
|
||||||
if ((m_cvP != NULL) && (is_index_valid())) --m_index;
|
if ((m_cvP != nullptr) && (is_index_valid())) --m_index;
|
||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -114,9 +114,9 @@ protected:
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_landmarks_point_location() :
|
Arr_landmarks_point_location() :
|
||||||
p_arr(NULL),
|
p_arr(nullptr),
|
||||||
m_traits(NULL),
|
m_traits(nullptr),
|
||||||
lm_gen(NULL),
|
lm_gen(nullptr),
|
||||||
own_gen(false)
|
own_gen(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
@ -141,25 +141,25 @@ public:
|
||||||
{
|
{
|
||||||
if (own_gen) {
|
if (own_gen) {
|
||||||
delete lm_gen;
|
delete lm_gen;
|
||||||
lm_gen = NULL;
|
lm_gen = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Attach an arrangement object (and a generator, if supplied). */
|
/*! Attach an arrangement object (and a generator, if supplied). */
|
||||||
void attach(const Arrangement_2& arr, Generator* gen = NULL)
|
void attach(const Arrangement_2& arr, Generator* gen = nullptr)
|
||||||
{
|
{
|
||||||
// Keep a pointer to the associated arrangement.
|
// Keep a pointer to the associated arrangement.
|
||||||
p_arr = &arr;
|
p_arr = &arr;
|
||||||
m_traits = static_cast<const Traits_adaptor_2*>(p_arr->geometry_traits());
|
m_traits = static_cast<const Traits_adaptor_2*>(p_arr->geometry_traits());
|
||||||
|
|
||||||
// Update the landmarks generator.
|
// Update the landmarks generator.
|
||||||
if (gen != NULL) {
|
if (gen != nullptr) {
|
||||||
// In case a generator is given, keep a pointer to it.
|
// In case a generator is given, keep a pointer to it.
|
||||||
CGAL_assertion(lm_gen == NULL);
|
CGAL_assertion(lm_gen == nullptr);
|
||||||
lm_gen = gen;
|
lm_gen = gen;
|
||||||
own_gen = false;
|
own_gen = false;
|
||||||
}
|
}
|
||||||
else if (lm_gen != NULL) {
|
else if (lm_gen != nullptr) {
|
||||||
// In case a generator exists internally, make sure it is attached to
|
// In case a generator exists internally, make sure it is attached to
|
||||||
// the given arrangement.
|
// the given arrangement.
|
||||||
Arrangement_2& non_const_arr = const_cast<Arrangement_2&>(*p_arr);
|
Arrangement_2& non_const_arr = const_cast<Arrangement_2&>(*p_arr);
|
||||||
|
|
@ -175,10 +175,10 @@ public:
|
||||||
/*! Detach the instance from the arrangement object. */
|
/*! Detach the instance from the arrangement object. */
|
||||||
void detach()
|
void detach()
|
||||||
{
|
{
|
||||||
p_arr = NULL;
|
p_arr = nullptr;
|
||||||
m_traits = NULL;
|
m_traits = nullptr;
|
||||||
|
|
||||||
CGAL_assertion(lm_gen != NULL);
|
CGAL_assertion(lm_gen != nullptr);
|
||||||
if (lm_gen)
|
if (lm_gen)
|
||||||
lm_gen->detach();
|
lm_gen->detach();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1519,7 +1519,7 @@ public:
|
||||||
// Check whether we have a single intersection point.
|
// Check whether we have a single intersection point.
|
||||||
const Point_2 *ip = object_cast<Point_2> (&obj);
|
const Point_2 *ip = object_cast<Point_2> (&obj);
|
||||||
|
|
||||||
if (ip != NULL)
|
if (ip != nullptr)
|
||||||
{
|
{
|
||||||
// Check whether the intersection point ip lies on both segments.
|
// Check whether the intersection point ip lies on both segments.
|
||||||
const bool ip_on_cv1 = cv1.is_vertical() ? cv1.is_in_y_range(*ip) :
|
const bool ip_on_cv1 = cv1.is_vertical() ? cv1.is_in_y_range(*ip) :
|
||||||
|
|
|
||||||
|
|
@ -78,9 +78,9 @@ protected:
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_naive_point_location() :
|
Arr_naive_point_location() :
|
||||||
p_arr(NULL),
|
p_arr(nullptr),
|
||||||
geom_traits(NULL),
|
geom_traits(nullptr),
|
||||||
top_traits(NULL)
|
top_traits(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor given an arrangement. */
|
/*! Constructor given an arrangement. */
|
||||||
|
|
@ -101,9 +101,9 @@ public:
|
||||||
/*! Detach from the current arrangement object. */
|
/*! Detach from the current arrangement object. */
|
||||||
void detach()
|
void detach()
|
||||||
{
|
{
|
||||||
p_arr = NULL;
|
p_arr = nullptr;
|
||||||
geom_traits = NULL;
|
geom_traits = nullptr;
|
||||||
top_traits = NULL;
|
top_traits = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
|
|
@ -241,7 +241,7 @@ public:
|
||||||
// Chack if the intersection is a point:
|
// Chack if the intersection is a point:
|
||||||
const Point_2 *ip;
|
const Point_2 *ip;
|
||||||
|
|
||||||
if ((ip = object_cast<Point_2> (&res)) != NULL)
|
if ((ip = object_cast<Point_2> (&res)) != nullptr)
|
||||||
{
|
{
|
||||||
// Create a pair representing the point with its multiplicity,
|
// Create a pair representing the point with its multiplicity,
|
||||||
// which is always 1 for line segments for all practical purposes.
|
// which is always 1 for line segments for all practical purposes.
|
||||||
|
|
@ -257,7 +257,7 @@ public:
|
||||||
// The intersection is a segment.
|
// The intersection is a segment.
|
||||||
|
|
||||||
const X_monotone_curve_2 *ov = object_cast<X_monotone_curve_2>(&res);
|
const X_monotone_curve_2 *ov = object_cast<X_monotone_curve_2>(&res);
|
||||||
CGAL_assertion (ov != NULL);
|
CGAL_assertion (ov != nullptr);
|
||||||
|
|
||||||
Self self;
|
Self self;
|
||||||
Comparison_result cmp1 = self.compare_endpoints_xy_2_object()(cv1);
|
Comparison_result cmp1 = self.compare_endpoints_xy_2_object()(cv1);
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ public:
|
||||||
|
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_observer () :
|
Arr_observer () :
|
||||||
p_arr (NULL)
|
p_arr (nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor with an associated arrangement. */
|
/*! Constructor with an associated arrangement. */
|
||||||
|
|
@ -87,7 +87,7 @@ public:
|
||||||
virtual ~Arr_observer ()
|
virtual ~Arr_observer ()
|
||||||
{
|
{
|
||||||
// Unregister the observer object from the arrangement.
|
// Unregister the observer object from the arrangement.
|
||||||
if (p_arr != NULL)
|
if (p_arr != nullptr)
|
||||||
p_arr->_unregister_observer (this);
|
p_arr->_unregister_observer (this);
|
||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
@ -118,9 +118,9 @@ public:
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// The observer is not already attached to an arrangement.
|
// The observer is not already attached to an arrangement.
|
||||||
CGAL_precondition (p_arr == NULL);
|
CGAL_precondition (p_arr == nullptr);
|
||||||
|
|
||||||
if (p_arr != NULL)
|
if (p_arr != nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Notify the concrete oberver (the sub-class) about the attachment.
|
// Notify the concrete oberver (the sub-class) about the attachment.
|
||||||
|
|
@ -139,7 +139,7 @@ public:
|
||||||
/*! Detach the observer from the arrangement. */
|
/*! Detach the observer from the arrangement. */
|
||||||
void detach ()
|
void detach ()
|
||||||
{
|
{
|
||||||
if (p_arr == NULL)
|
if (p_arr == nullptr)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Notify the concrete oberver (the sub-class) about the detachment.
|
// Notify the concrete oberver (the sub-class) about the detachment.
|
||||||
|
|
@ -148,7 +148,7 @@ public:
|
||||||
// Unregister the observer object from the current arrangement, and mark
|
// Unregister the observer object from the current arrangement, and mark
|
||||||
// that the oberver is not attached to an arrangement.
|
// that the oberver is not attached to an arrangement.
|
||||||
p_arr->_unregister_observer (this);
|
p_arr->_unregister_observer (this);
|
||||||
p_arr = NULL;
|
p_arr = nullptr;
|
||||||
|
|
||||||
// Notify the concrete oberver that the detachment took place.
|
// Notify the concrete oberver that the detachment took place.
|
||||||
after_detach();
|
after_detach();
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ _walk_from_vertex(Vertex_const_handle nearest_vertex,
|
||||||
// We found a vertex closer to p; Continue using this vertex.
|
// We found a vertex closer to p; Continue using this vertex.
|
||||||
const Vertex_const_handle* p_vh =
|
const Vertex_const_handle* p_vh =
|
||||||
Result().template assign<Vertex_const_handle>(obj);
|
Result().template assign<Vertex_const_handle>(obj);
|
||||||
CGAL_assertion(p_vh != NULL);
|
CGAL_assertion(p_vh != nullptr);
|
||||||
vh = *p_vh;
|
vh = *p_vh;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -504,7 +504,7 @@ _walk_from_face(Face_const_handle face,
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// Check whether p lies inside the current face (including its holes):
|
// Check whether p lies inside the current face (including its holes):
|
||||||
if (p_arr->topology_traits()->is_in_face(&(*face), p, NULL))
|
if (p_arr->topology_traits()->is_in_face(&(*face), p, nullptr))
|
||||||
{
|
{
|
||||||
// We know that p is located inside the current face, and we check
|
// We know that p is located inside the current face, and we check
|
||||||
// whether it lies inside one of its holes (or on the boundary of
|
// whether it lies inside one of its holes (or on the boundary of
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ private:
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_landmarks_nearest_neighbor () :
|
Arr_landmarks_nearest_neighbor () :
|
||||||
m_tree(NULL),
|
m_tree(nullptr),
|
||||||
m_is_empty(true)
|
m_is_empty(true)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
@ -177,7 +177,7 @@ public:
|
||||||
template <class InputIterator>
|
template <class InputIterator>
|
||||||
void init(InputIterator begin, InputIterator end)
|
void init(InputIterator begin, InputIterator end)
|
||||||
{
|
{
|
||||||
CGAL_precondition_msg(m_tree == NULL,
|
CGAL_precondition_msg(m_tree == nullptr,
|
||||||
"The search tree is already initialized.");
|
"The search tree is already initialized.");
|
||||||
|
|
||||||
if (begin != end) {
|
if (begin != end) {
|
||||||
|
|
@ -193,9 +193,9 @@ public:
|
||||||
/*! Clear the search tree. */
|
/*! Clear the search tree. */
|
||||||
void clear()
|
void clear()
|
||||||
{
|
{
|
||||||
if (m_tree != NULL)
|
if (m_tree != nullptr)
|
||||||
delete m_tree;
|
delete m_tree;
|
||||||
m_tree = NULL;
|
m_tree = nullptr;
|
||||||
m_is_empty = true;
|
m_is_empty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -209,7 +209,7 @@ public:
|
||||||
*/
|
*/
|
||||||
Point_2 find_nearest_neighbor(const Point_2& q, PL_result_type &obj) const
|
Point_2 find_nearest_neighbor(const Point_2& q, PL_result_type &obj) const
|
||||||
{
|
{
|
||||||
CGAL_precondition_msg(m_tree != NULL && ! m_is_empty,
|
CGAL_precondition_msg(m_tree != nullptr && ! m_is_empty,
|
||||||
"The search tree is not initialized.");
|
"The search tree is not initialized.");
|
||||||
|
|
||||||
// Create an NN_Point_2 object from the query point and use it to
|
// Create an NN_Point_2 object from the query point and use it to
|
||||||
|
|
|
||||||
|
|
@ -79,7 +79,7 @@ Arr_naive_point_location<Arrangement>::locate(const Point_2& p) const
|
||||||
for (fit = p_arr->faces_begin(); fit != p_arr->faces_end(); ++fit) {
|
for (fit = p_arr->faces_begin(); fit != p_arr->faces_end(); ++fit) {
|
||||||
fh = fit;
|
fh = fit;
|
||||||
|
|
||||||
if (top_traits->is_in_face(&(*fh), p, NULL)) {
|
if (top_traits->is_in_face(&(*fh), p, nullptr)) {
|
||||||
// The current face contains p in its interior.
|
// The current face contains p in its interior.
|
||||||
if (f_inner == invalid_f ||
|
if (f_inner == invalid_f ||
|
||||||
f_inner->is_unbounded() ||
|
f_inner->is_unbounded() ||
|
||||||
|
|
@ -102,7 +102,7 @@ Arr_naive_point_location<Arrangement>::locate(const Point_2& p) const
|
||||||
fh->outer_ccbs_begin();
|
fh->outer_ccbs_begin();
|
||||||
Vertex_const_handle v = (*it)->source();
|
Vertex_const_handle v = (*it)->source();
|
||||||
|
|
||||||
if (top_traits->is_in_face(&(*f_inner), v->point(), NULL))
|
if (top_traits->is_in_face(&(*f_inner), v->point(), nullptr))
|
||||||
f_inner = fh;
|
f_inner = fh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -135,9 +135,9 @@ _base_vertical_ray_shoot(const Point_2& p, bool shoot_up) const
|
||||||
Comparison_result res = EQUAL;
|
Comparison_result res = EQUAL;
|
||||||
Comparison_result y_res;
|
Comparison_result y_res;
|
||||||
bool in_x_range;
|
bool in_x_range;
|
||||||
const typename Dcel::Halfedge* closest_he = NULL; // The closest so far.
|
const typename Dcel::Halfedge* closest_he = nullptr; // The closest so far.
|
||||||
const typename Dcel::Vertex* cl_vs = NULL; // Its source.
|
const typename Dcel::Vertex* cl_vs = nullptr; // Its source.
|
||||||
const typename Dcel::Vertex* cl_vt = NULL; // Its target.
|
const typename Dcel::Vertex* cl_vt = nullptr; // Its target.
|
||||||
|
|
||||||
while (eit != e_end) {
|
while (eit != e_end) {
|
||||||
// Get the current edge and its source and target vertices.
|
// Get the current edge and its source and target vertices.
|
||||||
|
|
@ -158,7 +158,7 @@ _base_vertical_ray_shoot(const Point_2& p, bool shoot_up) const
|
||||||
res = m_topol_traits->compare_y_at_x(p, he);
|
res = m_topol_traits->compare_y_at_x(p, he);
|
||||||
|
|
||||||
if (in_x_range && (res == point_above_under)) {
|
if (in_x_range && (res == point_above_under)) {
|
||||||
if (closest_he == NULL) {
|
if (closest_he == nullptr) {
|
||||||
// If no other x-monotone curve containing p in its x-range has been
|
// If no other x-monotone curve containing p in its x-range has been
|
||||||
// found yet, take the current one as the vertically closest to p.
|
// found yet, take the current one as the vertically closest to p.
|
||||||
closest_he = he;
|
closest_he = he;
|
||||||
|
|
@ -242,7 +242,7 @@ _base_vertical_ray_shoot(const Point_2& p, bool shoot_up) const
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we did not locate a closest halfedge, return an empty object.
|
// If we did not locate a closest halfedge, return an empty object.
|
||||||
if (closest_he == NULL)
|
if (closest_he == nullptr)
|
||||||
return make_optional_result();
|
return make_optional_result();
|
||||||
|
|
||||||
// If we found a fictitious edge, return it now.
|
// If we found a fictitious edge, return it now.
|
||||||
|
|
@ -305,7 +305,7 @@ Arr_simple_point_location<Arrangement>::_vertical_ray_shoot(const Point_2& p,
|
||||||
else {
|
else {
|
||||||
const Halfedge_const_handle* p_hh =
|
const Halfedge_const_handle* p_hh =
|
||||||
Result().template assign<Halfedge_const_handle>(obj);
|
Result().template assign<Halfedge_const_handle>(obj);
|
||||||
CGAL_assertion(p_hh != NULL);
|
CGAL_assertion(p_hh != nullptr);
|
||||||
found_halfedge = true;
|
found_halfedge = true;
|
||||||
closest_he = *p_hh;
|
closest_he = *p_hh;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p,
|
||||||
Td_map_item& left_v_item = td.locate(tr.left(),td_lt);
|
Td_map_item& left_v_item = td.locate(tr.left(),td_lt);
|
||||||
CGAL_assertion(td_lt == TD::POINT);
|
CGAL_assertion(td_lt == TD::POINT);
|
||||||
Halfedge_const_handle he;
|
Halfedge_const_handle he;
|
||||||
if (boost::get<Td_active_vertex>(&left_v_item) != NULL) {
|
if (boost::get<Td_active_vertex>(&left_v_item) != nullptr) {
|
||||||
Td_active_vertex v(boost::get<Td_active_vertex>(left_v_item));
|
Td_active_vertex v(boost::get<Td_active_vertex>(left_v_item));
|
||||||
he = v.cw_he();
|
he = v.cw_he();
|
||||||
}
|
}
|
||||||
|
|
@ -225,7 +225,7 @@ _get_unbounded_face(const Td_map_item& item,const Point_2& p,
|
||||||
Td_map_item& right_v_item = td.locate(tr.right(),td_lt);
|
Td_map_item& right_v_item = td.locate(tr.right(),td_lt);
|
||||||
CGAL_assertion(td_lt == TD::POINT);
|
CGAL_assertion(td_lt == TD::POINT);
|
||||||
Halfedge_const_handle he;
|
Halfedge_const_handle he;
|
||||||
if (boost::get<Td_active_vertex>(&right_v_item)!= NULL) {
|
if (boost::get<Td_active_vertex>(&right_v_item)!= nullptr) {
|
||||||
Td_active_vertex v(boost::get<Td_active_vertex>(right_v_item));
|
Td_active_vertex v(boost::get<Td_active_vertex>(right_v_item));
|
||||||
he = v.cw_he();
|
he = v.cw_he();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -248,7 +248,7 @@ public:
|
||||||
|
|
||||||
Curve_end v_ce(left()->curve_end());
|
Curve_end v_ce(left()->curve_end());
|
||||||
ptr()->e2 = (boost::shared_ptr<X_monotone_curve_2>)(new X_monotone_curve_2(v_ce.cv()));
|
ptr()->e2 = (boost::shared_ptr<X_monotone_curve_2>)(new X_monotone_curve_2(v_ce.cv()));
|
||||||
//CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2>>( &(ptr()->e2)) != NULL);
|
//CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2>>( &(ptr()->e2)) != nullptr);
|
||||||
|
|
||||||
ptr()->e1 = (v_ce.ce() == ARR_MIN_END ) ? CGAL_TD_CV_MIN_END : CGAL_TD_CV_MAX_END;
|
ptr()->e1 = (v_ce.ce() == ARR_MIN_END ) ? CGAL_TD_CV_MIN_END : CGAL_TD_CV_MAX_END;
|
||||||
|
|
||||||
|
|
@ -452,7 +452,7 @@ public:
|
||||||
CGAL_TD_INLINE Vertex_const_handle left_unsafe() const
|
CGAL_TD_INLINE Vertex_const_handle left_unsafe() const
|
||||||
{
|
{
|
||||||
CGAL_precondition(is_active());
|
CGAL_precondition(is_active());
|
||||||
CGAL_assertion(boost::get<Vertex_const_handle>(&(ptr()->e0)) != NULL);
|
CGAL_assertion(boost::get<Vertex_const_handle>(&(ptr()->e0)) != nullptr);
|
||||||
return boost::get<Vertex_const_handle>(ptr()->e0);
|
return boost::get<Vertex_const_handle>(ptr()->e0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -475,7 +475,7 @@ public:
|
||||||
CGAL_TD_INLINE Vertex_const_handle right_unsafe() const
|
CGAL_TD_INLINE Vertex_const_handle right_unsafe() const
|
||||||
{
|
{
|
||||||
CGAL_precondition(is_active());
|
CGAL_precondition(is_active());
|
||||||
CGAL_assertion(boost::get<Vertex_const_handle>(&(ptr()->e1)) != NULL);
|
CGAL_assertion(boost::get<Vertex_const_handle>(&(ptr()->e1)) != nullptr);
|
||||||
return boost::get<Vertex_const_handle>(ptr()->e1);
|
return boost::get<Vertex_const_handle>(ptr()->e1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -498,7 +498,7 @@ public:
|
||||||
CGAL_TD_INLINE Halfedge_const_handle bottom_unsafe () const
|
CGAL_TD_INLINE Halfedge_const_handle bottom_unsafe () const
|
||||||
{
|
{
|
||||||
CGAL_precondition(is_active());
|
CGAL_precondition(is_active());
|
||||||
CGAL_assertion(boost::get<Halfedge_const_handle>(&(ptr()->e2)) != NULL);
|
CGAL_assertion(boost::get<Halfedge_const_handle>(&(ptr()->e2)) != nullptr);
|
||||||
return boost::get<Halfedge_const_handle>(ptr()->e2);
|
return boost::get<Halfedge_const_handle>(ptr()->e2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -535,7 +535,7 @@ public:
|
||||||
CGAL_precondition(type() == TD_VERTEX);
|
CGAL_precondition(type() == TD_VERTEX);
|
||||||
CGAL_precondition(!is_on_boundaries());
|
CGAL_precondition(!is_on_boundaries());
|
||||||
|
|
||||||
CGAL_assertion(boost::get<Point>( &(ptr()->e0)) != NULL);
|
CGAL_assertion(boost::get<Point>( &(ptr()->e0)) != nullptr);
|
||||||
return boost::get<Point>( ptr()->e0 );
|
return boost::get<Point>( ptr()->e0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -545,10 +545,10 @@ public:
|
||||||
CGAL_precondition(type() == TD_VERTEX);
|
CGAL_precondition(type() == TD_VERTEX);
|
||||||
CGAL_precondition(is_on_boundaries());
|
CGAL_precondition(is_on_boundaries());
|
||||||
|
|
||||||
CGAL_assertion(boost::get<unsigned char>( &(ptr()->e1)) != NULL);
|
CGAL_assertion(boost::get<unsigned char>( &(ptr()->e1)) != nullptr);
|
||||||
CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != NULL);
|
CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != nullptr);
|
||||||
X_monotone_curve_2* cv_ptr = (boost::get<boost::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
|
X_monotone_curve_2* cv_ptr = (boost::get<boost::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
|
||||||
CGAL_assertion(cv_ptr != NULL);
|
CGAL_assertion(cv_ptr != nullptr);
|
||||||
|
|
||||||
Arr_curve_end ce =
|
Arr_curve_end ce =
|
||||||
(boost::get<unsigned char>(ptr()->e1) == CGAL_TD_CV_MIN_END) ?
|
(boost::get<unsigned char>(ptr()->e1) == CGAL_TD_CV_MIN_END) ?
|
||||||
|
|
@ -563,10 +563,10 @@ public:
|
||||||
CGAL_precondition(type() == TD_VERTEX);
|
CGAL_precondition(type() == TD_VERTEX);
|
||||||
CGAL_precondition(is_on_boundaries());
|
CGAL_precondition(is_on_boundaries());
|
||||||
|
|
||||||
CGAL_assertion(boost::get<unsigned char>( &(ptr()->e1)) != NULL);
|
CGAL_assertion(boost::get<unsigned char>( &(ptr()->e1)) != nullptr);
|
||||||
CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != NULL);
|
CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != nullptr);
|
||||||
X_monotone_curve_2* cv_ptr = (boost::get<boost::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
|
X_monotone_curve_2* cv_ptr = (boost::get<boost::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
|
||||||
CGAL_assertion(cv_ptr != NULL);
|
CGAL_assertion(cv_ptr != nullptr);
|
||||||
|
|
||||||
Arr_curve_end ce =
|
Arr_curve_end ce =
|
||||||
(boost::get<unsigned char>(ptr()->e1) == CGAL_TD_CV_MIN_END) ?
|
(boost::get<unsigned char>(ptr()->e1) == CGAL_TD_CV_MIN_END) ?
|
||||||
|
|
@ -580,10 +580,10 @@ public:
|
||||||
CGAL_precondition(!is_active());
|
CGAL_precondition(!is_active());
|
||||||
CGAL_precondition(type() == TD_VERTEX);
|
CGAL_precondition(type() == TD_VERTEX);
|
||||||
|
|
||||||
CGAL_assertion(boost::get<unsigned char>( &(ptr()->e1)) != NULL);
|
CGAL_assertion(boost::get<unsigned char>( &(ptr()->e1)) != nullptr);
|
||||||
CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != NULL);
|
CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != nullptr);
|
||||||
X_monotone_curve_2* cv_ptr = (boost::get<boost::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
|
X_monotone_curve_2* cv_ptr = (boost::get<boost::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
|
||||||
CGAL_assertion(cv_ptr != NULL);
|
CGAL_assertion(cv_ptr != nullptr);
|
||||||
|
|
||||||
Arr_curve_end ce =
|
Arr_curve_end ce =
|
||||||
(boost::get<unsigned char>(ptr()->e1) == CGAL_TD_CV_MIN_END) ?
|
(boost::get<unsigned char>(ptr()->e1) == CGAL_TD_CV_MIN_END) ?
|
||||||
|
|
@ -596,9 +596,9 @@ public:
|
||||||
{
|
{
|
||||||
CGAL_precondition(!is_active() && type() == TD_EDGE);
|
CGAL_precondition(!is_active() && type() == TD_EDGE);
|
||||||
|
|
||||||
CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != NULL);
|
CGAL_assertion(boost::get<boost::shared_ptr<X_monotone_curve_2> >(&(ptr()->e2)) != nullptr);
|
||||||
X_monotone_curve_2* cv_ptr = (boost::get<boost::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
|
X_monotone_curve_2* cv_ptr = (boost::get<boost::shared_ptr<X_monotone_curve_2> >(ptr()->e2)).get();
|
||||||
CGAL_assertion(cv_ptr != NULL);
|
CGAL_assertion(cv_ptr != nullptr);
|
||||||
return *cv_ptr;
|
return *cv_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -200,8 +200,8 @@ public:
|
||||||
{
|
{
|
||||||
|
|
||||||
PTR = new Data
|
PTR = new Data
|
||||||
(Traits::empty_he_handle(), Td_map_item(0), NULL);
|
(Traits::empty_he_handle(), Td_map_item(0), nullptr);
|
||||||
//m_dag_node = NULL;
|
//m_dag_node = nullptr;
|
||||||
}
|
}
|
||||||
/*! Constructor given Vertex & Halfedge handles. */
|
/*! Constructor given Vertex & Halfedge handles. */
|
||||||
Td_active_edge (Halfedge_const_handle he ,
|
Td_active_edge (Halfedge_const_handle he ,
|
||||||
|
|
|
||||||
|
|
@ -189,7 +189,7 @@ public:
|
||||||
|
|
||||||
Td_active_fictitious_vertex()
|
Td_active_fictitious_vertex()
|
||||||
{
|
{
|
||||||
PTR = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), NULL);
|
PTR = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Constructor given Vertex & Halfedge handles. */
|
/*! Constructor given Vertex & Halfedge handles. */
|
||||||
|
|
|
||||||
|
|
@ -261,7 +261,7 @@ public:
|
||||||
Traits::empty_vtx_handle(),
|
Traits::empty_vtx_handle(),
|
||||||
Traits::empty_he_handle(),
|
Traits::empty_he_handle(),
|
||||||
Traits::empty_he_handle(),
|
Traits::empty_he_handle(),
|
||||||
Td_map_item(0), Td_map_item(0) , Td_map_item(0) , Td_map_item(0), NULL);
|
Td_map_item(0), Td_map_item(0) , Td_map_item(0) , Td_map_item(0), nullptr);
|
||||||
|
|
||||||
//m_dag_node = 0;
|
//m_dag_node = 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ public:
|
||||||
|
|
||||||
Td_active_vertex()
|
Td_active_vertex()
|
||||||
{
|
{
|
||||||
PTR = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), NULL);
|
PTR = new Data(Traits::empty_vtx_handle(), Traits::empty_he_handle(), nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Constructor given Vertex & Halfedge handles. */
|
/*! Constructor given Vertex & Halfedge handles. */
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ public:
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Constructor given Vertex & Halfedge handles. */
|
/*! Constructor given Vertex & Halfedge handles. */
|
||||||
Td_inactive_edge (boost::shared_ptr<X_monotone_curve_2>& cv, Dag_node* node = NULL)
|
Td_inactive_edge (boost::shared_ptr<X_monotone_curve_2>& cv, Dag_node* node = nullptr)
|
||||||
{
|
{
|
||||||
PTR = new Data(cv,node);
|
PTR = new Data(cv,node);
|
||||||
}
|
}
|
||||||
|
|
@ -230,7 +230,7 @@ public:
|
||||||
inline X_monotone_curve_2& curve() const
|
inline X_monotone_curve_2& curve() const
|
||||||
{
|
{
|
||||||
X_monotone_curve_2* cv_ptr = (ptr()->cv).get();
|
X_monotone_curve_2* cv_ptr = (ptr()->cv).get();
|
||||||
CGAL_assertion(cv_ptr != NULL);
|
CGAL_assertion(cv_ptr != nullptr);
|
||||||
return *cv_ptr;
|
return *cv_ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -190,7 +190,7 @@ public:
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Constructor given Vertex & Halfedge handles. */
|
/*! Constructor given Vertex & Halfedge handles. */
|
||||||
Td_inactive_fictitious_vertex (Vertex_const_handle v_before_rem, Dag_node* node = NULL)
|
Td_inactive_fictitious_vertex (Vertex_const_handle v_before_rem, Dag_node* node = nullptr)
|
||||||
{
|
{
|
||||||
Curve_end v_ce(vtx_to_ce(v_before_rem));
|
Curve_end v_ce(vtx_to_ce(v_before_rem));
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ public:
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*! Constructor given Vertex & Halfedge handles. */
|
/*! Constructor given Vertex & Halfedge handles. */
|
||||||
Td_inactive_vertex (Vertex_const_handle v_before_rem, Dag_node* node = NULL)
|
Td_inactive_vertex (Vertex_const_handle v_before_rem, Dag_node* node = nullptr)
|
||||||
{
|
{
|
||||||
PTR = new Data(v_before_rem->point(), node);
|
PTR = new Data(v_before_rem->point(), node);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ public:
|
||||||
m_sep doesn't intersect any existing edges except possibly on common end
|
m_sep doesn't intersect any existing edges except possibly on common end
|
||||||
points.
|
points.
|
||||||
postconditions:
|
postconditions:
|
||||||
if the rightmost trapezoid was traversed m_cur_item is set to NULL.
|
if the rightmost trapezoid was traversed m_cur_item is set to nullptr.
|
||||||
remark:
|
remark:
|
||||||
if the seperator is vertical, using the precondition assumptions it
|
if the seperator is vertical, using the precondition assumptions it
|
||||||
follows that there is exactly one trapezoid to travel.
|
follows that there is exactly one trapezoid to travel.
|
||||||
|
|
@ -277,9 +277,9 @@ public:
|
||||||
return *this;// end reached, do nothing!
|
return *this;// end reached, do nothing!
|
||||||
|
|
||||||
#ifndef CGAL_TD_DEBUG
|
#ifndef CGAL_TD_DEBUG
|
||||||
CGAL_warning(traits != NULL);
|
CGAL_warning(traits != nullptr);
|
||||||
#else
|
#else
|
||||||
CGAL_assertion(traits != NULL);
|
CGAL_assertion(traits != nullptr);
|
||||||
CGAL_assertion(traits->is_active(m_cur_item));
|
CGAL_assertion(traits->is_active(m_cur_item));
|
||||||
//m_cur_item should be a trapezoid or an edge
|
//m_cur_item should be a trapezoid or an edge
|
||||||
CGAL_assertion(!traits->is_td_vertex(m_cur_item));
|
CGAL_assertion(!traits->is_td_vertex(m_cur_item));
|
||||||
|
|
@ -342,7 +342,7 @@ public:
|
||||||
|
|
||||||
Td_active_edge e (boost::get<Td_active_edge>(m_cur_item));
|
Td_active_edge e (boost::get<Td_active_edge>(m_cur_item));
|
||||||
CGAL_assertion_code(Dag_node* tt = e.dag_node();)
|
CGAL_assertion_code(Dag_node* tt = e.dag_node();)
|
||||||
CGAL_assertion(tt != NULL);
|
CGAL_assertion(tt != nullptr);
|
||||||
CGAL_assertion(tt->is_inner_node());
|
CGAL_assertion(tt->is_inner_node());
|
||||||
|
|
||||||
//go to next() of the current edge.
|
//go to next() of the current edge.
|
||||||
|
|
@ -654,12 +654,12 @@ public:
|
||||||
Dag_node* operator()(Td_nothing& /* t */) const
|
Dag_node* operator()(Td_nothing& /* t */) const
|
||||||
{
|
{
|
||||||
CGAL_assertion(false);
|
CGAL_assertion(false);
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
Dag_node* operator()(Td_inactive_trapezoid& /* t */) const
|
Dag_node* operator()(Td_inactive_trapezoid& /* t */) const
|
||||||
{
|
{
|
||||||
CGAL_assertion(false);
|
CGAL_assertion(false);
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
template < typename T >
|
template < typename T >
|
||||||
|
|
@ -985,7 +985,7 @@ protected:
|
||||||
const X_monotone_curve_2& cv,
|
const X_monotone_curve_2& cv,
|
||||||
Comparison_result cres) const
|
Comparison_result cres) const
|
||||||
{
|
{
|
||||||
CGAL_assertion(traits != NULL);
|
CGAL_assertion(traits != nullptr);
|
||||||
Td_map_item& item = left_cv_end_node.get_data();
|
Td_map_item& item = left_cv_end_node.get_data();
|
||||||
CGAL_precondition(traits->is_td_vertex(item));
|
CGAL_precondition(traits->is_td_vertex(item));
|
||||||
CGAL_precondition (are_equal_end_points(Curve_end(cv,ARR_MIN_END),
|
CGAL_precondition (are_equal_end_points(Curve_end(cv,ARR_MIN_END),
|
||||||
|
|
@ -1359,13 +1359,13 @@ public:
|
||||||
// const Dag_node* child;
|
// const Dag_node* child;
|
||||||
// CGAL_assertion(tr_copy);
|
// CGAL_assertion(tr_copy);
|
||||||
// tr_copy->set_rt(cur->rt() ?
|
// tr_copy->set_rt(cur->rt() ?
|
||||||
// htr.find(cur->rt())->second : NULL);
|
// htr.find(cur->rt())->second : nullptr);
|
||||||
// tr_copy->set_rb(cur->rb() ?
|
// tr_copy->set_rb(cur->rb() ?
|
||||||
// htr.find(cur->rb())->second : NULL);
|
// htr.find(cur->rb())->second : nullptr);
|
||||||
// tr_copy->set_lt(cur->lt() ?
|
// tr_copy->set_lt(cur->lt() ?
|
||||||
// htr.find(cur->lt())->second : NULL);
|
// htr.find(cur->lt())->second : nullptr);
|
||||||
// tr_copy->set_lb(cur->lb() ?
|
// tr_copy->set_lb(cur->lb() ?
|
||||||
// htr.find(cur->lb())->second : NULL);
|
// htr.find(cur->lb())->second : nullptr);
|
||||||
|
|
||||||
// if (cur->dag_node()->is_inner_node())
|
// if (cur->dag_node()->is_inner_node())
|
||||||
// {
|
// {
|
||||||
|
|
@ -1391,7 +1391,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual ~Trapezoidal_decomposition_2()
|
virtual ~Trapezoidal_decomposition_2()
|
||||||
{
|
{
|
||||||
CGAL_warning(m_dag_root != NULL);
|
CGAL_warning(m_dag_root != nullptr);
|
||||||
if (!m_dag_root) return;
|
if (!m_dag_root) return;
|
||||||
|
|
||||||
delete m_dag_root;
|
delete m_dag_root;
|
||||||
|
|
@ -1616,7 +1616,7 @@ public:
|
||||||
|
|
||||||
//the actual locate. curr is the DAG root, the traits,
|
//the actual locate. curr is the DAG root, the traits,
|
||||||
//the end point to locate,
|
//the end point to locate,
|
||||||
//and NULL as cv ptr - indicates point location
|
//and nullptr as cv ptr - indicates point location
|
||||||
lt = search_using_dag (curr, traits, ce, Halfedge_const_handle());
|
lt = search_using_dag (curr, traits, ce, Halfedge_const_handle());
|
||||||
|
|
||||||
#ifdef CGAL_TD_DEBUG
|
#ifdef CGAL_TD_DEBUG
|
||||||
|
|
@ -1646,7 +1646,7 @@ public:
|
||||||
// locate call may change the class
|
// locate call may change the class
|
||||||
Td_map_item& locate( Vertex_const_handle v, Locate_type& lt) const
|
Td_map_item& locate( Vertex_const_handle v, Locate_type& lt) const
|
||||||
{
|
{
|
||||||
CGAL_precondition(traits != NULL);
|
CGAL_precondition(traits != nullptr);
|
||||||
return locate(traits->vtx_to_ce(v), lt);
|
return locate(traits->vtx_to_ce(v), lt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -278,7 +278,7 @@ split_trapezoid_by_halfedge(Dag_node& split_node,
|
||||||
Td_map_item& prev_top_tr,
|
Td_map_item& prev_top_tr,
|
||||||
Halfedge_const_handle he)
|
Halfedge_const_handle he)
|
||||||
{
|
{
|
||||||
CGAL_warning(traits != NULL);
|
CGAL_warning(traits != nullptr);
|
||||||
CGAL_precondition(traits->is_active(split_node.get_data()));
|
CGAL_precondition(traits->is_active(split_node.get_data()));
|
||||||
CGAL_precondition(traits->is_td_trapezoid(split_node.get_data()));
|
CGAL_precondition(traits->is_td_trapezoid(split_node.get_data()));
|
||||||
|
|
||||||
|
|
@ -397,7 +397,7 @@ update_vtx_with_new_edge(Halfedge_const_handle he,
|
||||||
const Locate_type&
|
const Locate_type&
|
||||||
CGAL_precondition_code(lt))
|
CGAL_precondition_code(lt))
|
||||||
{
|
{
|
||||||
CGAL_assertion(traits != NULL);
|
CGAL_assertion(traits != nullptr);
|
||||||
CGAL_precondition(lt == POINT);
|
CGAL_precondition(lt == POINT);
|
||||||
CGAL_precondition(traits->is_active(vtx_item));
|
CGAL_precondition(traits->is_active(vtx_item));
|
||||||
|
|
||||||
|
|
@ -441,7 +441,7 @@ insert_curve_at_vtx_using_dag(Halfedge_const_handle he,
|
||||||
|
|
||||||
Dag_node* node = boost::apply_visitor(dag_node_visitor(), item);
|
Dag_node* node = boost::apply_visitor(dag_node_visitor(), item);
|
||||||
|
|
||||||
CGAL_assertion(node != NULL);
|
CGAL_assertion(node != nullptr);
|
||||||
CGAL_assertion(he != m_empty_he_handle);
|
CGAL_assertion(he != m_empty_he_handle);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -998,7 +998,7 @@ search_using_dag(Dag_node& curr_node,
|
||||||
Comparison_result up /*=EQUAL*/) const
|
Comparison_result up /*=EQUAL*/) const
|
||||||
{
|
{
|
||||||
if (he == m_empty_he_handle)
|
if (he == m_empty_he_handle)
|
||||||
return search_using_dag_with_cv(curr_node,traits,ce,NULL, up);
|
return search_using_dag_with_cv(curr_node,traits,ce,nullptr, up);
|
||||||
else
|
else
|
||||||
return search_using_dag_with_cv(curr_node,traits,ce,&he->curve(), up);
|
return search_using_dag_with_cv(curr_node,traits,ce,&he->curve(), up);
|
||||||
}
|
}
|
||||||
|
|
@ -1377,7 +1377,7 @@ typename Trapezoidal_decomposition_2<Td_traits>::Dag_node
|
||||||
Trapezoidal_decomposition_2<Td_traits>::
|
Trapezoidal_decomposition_2<Td_traits>::
|
||||||
container2dag(Nodes_map& ar, int left, int right, int& num_of_new_nodes) const
|
container2dag(Nodes_map& ar, int left, int right, int& num_of_new_nodes) const
|
||||||
{
|
{
|
||||||
CGAL_warning(traits != NULL);
|
CGAL_warning(traits != nullptr);
|
||||||
|
|
||||||
if (right > left) {
|
if (right > left) {
|
||||||
int d = (int)std::floor((double(right+left))/2);
|
int d = (int)std::floor((double(right+left))/2);
|
||||||
|
|
@ -1414,7 +1414,7 @@ container2dag(Nodes_map& ar, int left, int right, int& num_of_new_nodes) const
|
||||||
//curr_node.right_child()->set_dag_node(&curr_node.right_child());
|
//curr_node.right_child()->set_dag_node(&curr_node.right_child());
|
||||||
//curr_node->set_dag_node(&curr_node);// fake temporary node
|
//curr_node->set_dag_node(&curr_node);// fake temporary node
|
||||||
deactivate_vertex(curr_node); //curr_node->remove(); // mark as deleted
|
deactivate_vertex(curr_node); //curr_node->remove(); // mark as deleted
|
||||||
boost::apply_visitor(set_dag_node_visitor((Dag_node*)NULL),
|
boost::apply_visitor(set_dag_node_visitor((Dag_node*)nullptr),
|
||||||
curr_node.get_data());//curr_node->set_dag_node(0);
|
curr_node.get_data());//curr_node->set_dag_node(0);
|
||||||
|
|
||||||
return curr_node;
|
return curr_node;
|
||||||
|
|
@ -1462,7 +1462,7 @@ Trapezoidal_decomposition_2<Td_traits>::insert(Halfedge_const_handle he)
|
||||||
|
|
||||||
// locate the input Halfedge end points in the Td_map_item Dag
|
// locate the input Halfedge end points in the Td_map_item Dag
|
||||||
|
|
||||||
CGAL_assertion(traits != NULL);
|
CGAL_assertion(traits != nullptr);
|
||||||
|
|
||||||
//get the two vertices of the halfedge
|
//get the two vertices of the halfedge
|
||||||
Vertex_const_handle v1 =
|
Vertex_const_handle v1 =
|
||||||
|
|
@ -1565,7 +1565,7 @@ Trapezoidal_decomposition_2<Td_traits>::insert(Halfedge_const_handle he)
|
||||||
}
|
}
|
||||||
first_time = false;
|
first_time = false;
|
||||||
|
|
||||||
CGAL_assertion(node != NULL);
|
CGAL_assertion(node != nullptr);
|
||||||
split_trapezoid_by_halfedge(*node, old_e, old_bottom_tr, old_top_tr, he);
|
split_trapezoid_by_halfedge(*node, old_e, old_bottom_tr, old_top_tr, he);
|
||||||
|
|
||||||
if (node->is_inner_node()) {
|
if (node->is_inner_node()) {
|
||||||
|
|
@ -1644,7 +1644,7 @@ void Trapezoidal_decomposition_2<Td_traits>::remove(Halfedge_const_handle he)
|
||||||
locate_opt_empty();
|
locate_opt_empty();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CGAL_warning(traits != NULL);
|
CGAL_warning(traits != nullptr);
|
||||||
|
|
||||||
//calculating leftmost and rightmost curve ends of he
|
//calculating leftmost and rightmost curve ends of he
|
||||||
const Curve_end leftmost(he, ARR_MIN_END);
|
const Curve_end leftmost(he, ARR_MIN_END);
|
||||||
|
|
@ -1663,8 +1663,8 @@ void Trapezoidal_decomposition_2<Td_traits>::remove(Halfedge_const_handle he)
|
||||||
|
|
||||||
if (lt1 != POINT || lt2 != POINT) return;
|
if (lt1 != POINT || lt2 != POINT) return;
|
||||||
|
|
||||||
CGAL_warning(boost::apply_visitor(dag_node_visitor(), p1_item) != NULL);
|
CGAL_warning(boost::apply_visitor(dag_node_visitor(), p1_item) != nullptr);
|
||||||
CGAL_warning(boost::apply_visitor(dag_node_visitor(), p2_item) != NULL);
|
CGAL_warning(boost::apply_visitor(dag_node_visitor(), p2_item) != nullptr);
|
||||||
|
|
||||||
//retrieve the Dag_nodes of the two point-degenerate trapezoid
|
//retrieve the Dag_nodes of the two point-degenerate trapezoid
|
||||||
Dag_node& p1_node = *(boost::apply_visitor(dag_node_visitor(), p1_item));
|
Dag_node& p1_node = *(boost::apply_visitor(dag_node_visitor(), p1_item));
|
||||||
|
|
@ -1883,7 +1883,7 @@ void Trapezoidal_decomposition_2<Td_traits>::remove(Halfedge_const_handle he)
|
||||||
removed_cv_ptr(new X_monotone_curve_2(he->curve()));
|
removed_cv_ptr(new X_monotone_curve_2(he->curve()));
|
||||||
Base_map_item_iterator last_edge_fragment_it = mid_it;
|
Base_map_item_iterator last_edge_fragment_it = mid_it;
|
||||||
//Base_trapezoid_iterator last_mid = mid_it;
|
//Base_trapezoid_iterator last_mid = mid_it;
|
||||||
Dag_node* e_node = NULL;
|
Dag_node* e_node = nullptr;
|
||||||
while (!!++mid_it) {
|
while (!!++mid_it) {
|
||||||
e_node = boost::apply_visitor(dag_node_visitor(),*last_edge_fragment_it);
|
e_node = boost::apply_visitor(dag_node_visitor(),*last_edge_fragment_it);
|
||||||
deactivate_edge(removed_cv_ptr,*e_node); //last_mid->remove();
|
deactivate_edge(removed_cv_ptr,*e_node); //last_mid->remove();
|
||||||
|
|
@ -2023,7 +2023,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt,
|
||||||
//
|
//
|
||||||
// if (!traits)
|
// if (!traits)
|
||||||
// {
|
// {
|
||||||
// CGAL_warning(traits != NULL);
|
// CGAL_warning(traits != nullptr);
|
||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
// if (!traits->are_mergeable_2_object()(cv1,cv2))
|
// if (!traits->are_mergeable_2_object()(cv1,cv2))
|
||||||
|
|
@ -2040,7 +2040,7 @@ vertical_ray_shoot(const Point & p,Locate_type & lt,
|
||||||
// std::cerr << "\ncv1 " << cv1;
|
// std::cerr << "\ncv1 " << cv1;
|
||||||
// std::cerr << "\ncv1 " << cv2 << std::endl;
|
// std::cerr << "\ncv1 " << cv2 << std::endl;
|
||||||
// }
|
// }
|
||||||
// CGAL_precondition(traits != NULL);
|
// CGAL_precondition(traits != nullptr);
|
||||||
// CGAL_precondition(traits->are_mergeable_2_object()(cv1,cv2));
|
// CGAL_precondition(traits->are_mergeable_2_object()(cv1,cv2));
|
||||||
//
|
//
|
||||||
//#endif
|
//#endif
|
||||||
|
|
@ -2101,8 +2101,8 @@ vertical_ray_shoot(const Point & p,Locate_type & lt,
|
||||||
//
|
//
|
||||||
// CGAL_precondition(lt1==POINT && lt2==POINT);
|
// CGAL_precondition(lt1==POINT && lt2==POINT);
|
||||||
// CGAL_precondition(t1.is_active() && t2.is_active());
|
// CGAL_precondition(t1.is_active() && t2.is_active());
|
||||||
// CGAL_warning(t1.dag_node() != NULL);
|
// CGAL_warning(t1.dag_node() != nullptr);
|
||||||
// CGAL_warning(t2.dag_node() != NULL);
|
// CGAL_warning(t2.dag_node() != nullptr);
|
||||||
//
|
//
|
||||||
//#endif
|
//#endif
|
||||||
// m_before_split.m_cv_before_split = cv;
|
// m_before_split.m_cv_before_split = cv;
|
||||||
|
|
@ -2221,8 +2221,8 @@ vertical_ray_shoot(const Point & p,Locate_type & lt,
|
||||||
//
|
//
|
||||||
// //define the left halfedge and the right halfedge, according
|
// //define the left halfedge and the right halfedge, according
|
||||||
// // to the splitting point
|
// // to the splitting point
|
||||||
// //Halfedge_const_handle* p_left_he = NULL;
|
// //Halfedge_const_handle* p_left_he = nullptr;
|
||||||
// //Halfedge_const_handle* p_right_he = NULL;
|
// //Halfedge_const_handle* p_right_he = nullptr;
|
||||||
// Halfedge_const_handle left_he = he2;
|
// Halfedge_const_handle left_he = he2;
|
||||||
// Halfedge_const_handle right_he = he1;
|
// Halfedge_const_handle right_he = he1;
|
||||||
//
|
//
|
||||||
|
|
@ -2592,7 +2592,7 @@ merge_edge(Halfedge_const_handle he1,
|
||||||
const X_monotone_curve_2& cv2 = he2->curve();
|
const X_monotone_curve_2& cv2 = he2->curve();
|
||||||
|
|
||||||
if (!traits) {
|
if (!traits) {
|
||||||
CGAL_warning(traits != NULL);
|
CGAL_warning(traits != nullptr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!traits->are_mergeable_2_object() (cv1, cv2)) {
|
if (!traits->are_mergeable_2_object() (cv1, cv2)) {
|
||||||
|
|
@ -2645,10 +2645,10 @@ merge_edge(Halfedge_const_handle he1,
|
||||||
Td_map_item rightp_item = locate(rightmost, lt2);
|
Td_map_item rightp_item = locate(rightmost, lt2);
|
||||||
Td_map_item mrgp_item = locate(ce, lt);
|
Td_map_item mrgp_item = locate(ce, lt);
|
||||||
|
|
||||||
//varifying that all trapezoids are not NULL and are of type POINT
|
//varifying that all trapezoids are not nullptr and are of type POINT
|
||||||
CGAL_warning(boost::apply_visitor(dag_node_visitor(), leftp_item) != NULL);
|
CGAL_warning(boost::apply_visitor(dag_node_visitor(), leftp_item) != nullptr);
|
||||||
CGAL_warning(boost::apply_visitor(dag_node_visitor(), rightp_item)!= NULL);
|
CGAL_warning(boost::apply_visitor(dag_node_visitor(), rightp_item)!= nullptr);
|
||||||
CGAL_warning(boost::apply_visitor(dag_node_visitor(), mrgp_item) != NULL);
|
CGAL_warning(boost::apply_visitor(dag_node_visitor(), mrgp_item) != nullptr);
|
||||||
|
|
||||||
//define the left curve and the right curve, according
|
//define the left curve and the right curve, according
|
||||||
// to the common point (that is merged)
|
// to the common point (that is merged)
|
||||||
|
|
@ -2832,7 +2832,7 @@ longest_query_path_length_rec(bool minus_inf, Dag_node& min_node,
|
||||||
bool plus_inf, Dag_node& max_node,
|
bool plus_inf, Dag_node& max_node,
|
||||||
Dag_node& node)
|
Dag_node& node)
|
||||||
{
|
{
|
||||||
//if NULL
|
//if nullptr
|
||||||
if (node.is_null()) return 0;
|
if (node.is_null()) return 0;
|
||||||
|
|
||||||
//if not valid range or empty return 0
|
//if not valid range or empty return 0
|
||||||
|
|
|
||||||
|
|
@ -849,7 +849,7 @@ public:
|
||||||
for (size_t i = 0; i < int_seg.size(); ++i) {
|
for (size_t i = 0; i < int_seg.size(); ++i) {
|
||||||
const X_monotone_subcurve_2* x_seg =
|
const X_monotone_subcurve_2* x_seg =
|
||||||
CGAL::object_cast<X_monotone_subcurve_2> (&(int_seg[i]));
|
CGAL::object_cast<X_monotone_subcurve_2> (&(int_seg[i]));
|
||||||
if (x_seg != NULL) {
|
if (x_seg != nullptr) {
|
||||||
X_monotone_subcurve_2 seg = *x_seg;
|
X_monotone_subcurve_2 seg = *x_seg;
|
||||||
|
|
||||||
// If for some reason the subcurve intersection
|
// If for some reason the subcurve intersection
|
||||||
|
|
@ -861,7 +861,7 @@ public:
|
||||||
|
|
||||||
const Point_2_pair* p_ptr =
|
const Point_2_pair* p_ptr =
|
||||||
CGAL::object_cast<Point_2_pair>(&(int_seg[i]));
|
CGAL::object_cast<Point_2_pair>(&(int_seg[i]));
|
||||||
if (p_ptr != NULL) {
|
if (p_ptr != nullptr) {
|
||||||
// Any point that is not equal to the max_vertex of the
|
// Any point that is not equal to the max_vertex of the
|
||||||
// subcurve should be inserted into oi.
|
// subcurve should be inserted into oi.
|
||||||
// The max_vertex of the current subcurve (if intersecting)
|
// The max_vertex of the current subcurve (if intersecting)
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ public:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Cache() :
|
Cache() :
|
||||||
_rat_func_map_watermark(128), _rat_pair_map_watermark(128), _ak_ptr(NULL){};
|
_rat_func_map_watermark(128), _rat_pair_map_watermark(128), _ak_ptr(nullptr){};
|
||||||
|
|
||||||
void initialize(Algebraic_kernel_d_1* ak_ptr)
|
void initialize(Algebraic_kernel_d_1* ak_ptr)
|
||||||
{
|
{
|
||||||
|
|
@ -165,7 +165,7 @@ public:
|
||||||
const Rational_function& get_rational_function(const Polynomial_1& numer,
|
const Rational_function& get_rational_function(const Polynomial_1& numer,
|
||||||
const Polynomial_1& denom) const
|
const Polynomial_1& denom) const
|
||||||
{
|
{
|
||||||
CGAL_precondition (_ak_ptr != NULL);
|
CGAL_precondition (_ak_ptr != nullptr);
|
||||||
Rational_function_key key = get_key(numer,denom);
|
Rational_function_key key = get_key(numer,denom);
|
||||||
|
|
||||||
//look if element exists in cache already
|
//look if element exists in cache already
|
||||||
|
|
@ -204,7 +204,7 @@ public:
|
||||||
const Rational_function_pair get_rational_pair(const Rational_function& f,
|
const Rational_function_pair get_rational_pair(const Rational_function& f,
|
||||||
const Rational_function& g) const
|
const Rational_function& g) const
|
||||||
{
|
{
|
||||||
CGAL_precondition (_ak_ptr != NULL);
|
CGAL_precondition (_ak_ptr != nullptr);
|
||||||
CGAL_precondition(!(f==g));
|
CGAL_precondition(!(f==g));
|
||||||
Rational_function_canonicalized_pair_key key = get_key(f,g);
|
Rational_function_canonicalized_pair_key key = get_key(f,g);
|
||||||
bool is_opposite = (f.id() < g.id()) ? false : true ;
|
bool is_opposite = (f.id() < g.id()) ? false : true ;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ public:
|
||||||
typedef typename Base::Solve_1 Solve_1;
|
typedef typename Base::Solve_1 Solve_1;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Rational_function_rep() : _ak_ptr(NULL){}
|
Rational_function_rep() : _ak_ptr(nullptr){}
|
||||||
Rational_function_rep(const Polynomial_1& numer,
|
Rational_function_rep(const Polynomial_1& numer,
|
||||||
const Polynomial_1& denom,
|
const Polynomial_1& denom,
|
||||||
Algebraic_kernel_d_1* ak_ptr):
|
Algebraic_kernel_d_1* ak_ptr):
|
||||||
|
|
@ -117,7 +117,7 @@ public:
|
||||||
private:
|
private:
|
||||||
void initialize()
|
void initialize()
|
||||||
{
|
{
|
||||||
CGAL_precondition(_ak_ptr != NULL);
|
CGAL_precondition(_ak_ptr != nullptr);
|
||||||
CGAL_precondition(CGAL::is_zero(_denom) == false);
|
CGAL_precondition(CGAL::is_zero(_denom) == false);
|
||||||
if (CGAL::is_zero(_numer))
|
if (CGAL::is_zero(_numer))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ public:
|
||||||
Algebraic_kernel_d_1* ak_ptr)
|
Algebraic_kernel_d_1* ak_ptr)
|
||||||
:_f(f),_g(g),_ak_ptr(ak_ptr)
|
:_f(f),_g(g),_ak_ptr(ak_ptr)
|
||||||
{
|
{
|
||||||
CGAL_precondition(_ak_ptr != NULL);
|
CGAL_precondition(_ak_ptr != nullptr);
|
||||||
//canonicalized representation
|
//canonicalized representation
|
||||||
if ( !(f.id() < g.id()) )
|
if ( !(f.id() < g.id()) )
|
||||||
std::swap(_f,_g);
|
std::swap(_f,_g);
|
||||||
|
|
|
||||||
|
|
@ -39,14 +39,14 @@ public:
|
||||||
{
|
{
|
||||||
if(!m_pInstance)
|
if(!m_pInstance)
|
||||||
m_pInstance = new T;
|
m_pInstance = new T;
|
||||||
CGAL_assertion(m_pInstance !=NULL);
|
CGAL_assertion(m_pInstance !=nullptr);
|
||||||
return m_pInstance;
|
return m_pInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void DestroyInstance()
|
static void DestroyInstance()
|
||||||
{
|
{
|
||||||
delete m_pInstance;
|
delete m_pInstance;
|
||||||
m_pInstance = NULL;
|
m_pInstance = nullptr;
|
||||||
};
|
};
|
||||||
private:
|
private:
|
||||||
Singleton(); // ctor hidden
|
Singleton(); // ctor hidden
|
||||||
|
|
@ -55,7 +55,7 @@ private:
|
||||||
static T* m_pInstance;
|
static T* m_pInstance;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T> T* Singleton<T>::m_pInstance=NULL;
|
template <class T> T* Singleton<T>::m_pInstance=nullptr;
|
||||||
|
|
||||||
} // namespace Arr_rational_arc
|
} // namespace Arr_rational_arc
|
||||||
} //namespace CGAL {
|
} //namespace CGAL {
|
||||||
|
|
|
||||||
|
|
@ -766,7 +766,7 @@ public:
|
||||||
// Check if we have a single intersection point.
|
// Check if we have a single intersection point.
|
||||||
const Point_2 *ip = object_cast<Point_2> (&obj);
|
const Point_2 *ip = object_cast<Point_2> (&obj);
|
||||||
|
|
||||||
if (ip != NULL) {
|
if (ip != nullptr) {
|
||||||
// Check if the intersection point ip lies on both segments.
|
// Check if the intersection point ip lies on both segments.
|
||||||
const bool ip_on_cv1 = cv1.is_vertical() ? cv1.is_in_y_range(*ip) :
|
const bool ip_on_cv1 = cv1.is_vertical() ? cv1.is_in_y_range(*ip) :
|
||||||
cv1.is_in_x_range(*ip);
|
cv1.is_in_x_range(*ip);
|
||||||
|
|
|
||||||
|
|
@ -96,9 +96,9 @@ protected:
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_simple_point_location() :
|
Arr_simple_point_location() :
|
||||||
m_arr(NULL),
|
m_arr(nullptr),
|
||||||
m_geom_traits(NULL),
|
m_geom_traits(nullptr),
|
||||||
m_topol_traits(NULL)
|
m_topol_traits(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor given an arrangement. */
|
/*! Constructor given an arrangement. */
|
||||||
|
|
@ -122,9 +122,9 @@ public:
|
||||||
/*! Detach from the current arrangement object. */
|
/*! Detach from the current arrangement object. */
|
||||||
void detach()
|
void detach()
|
||||||
{
|
{
|
||||||
m_arr = NULL;
|
m_arr = nullptr;
|
||||||
m_geom_traits = NULL;
|
m_geom_traits = nullptr;
|
||||||
m_topol_traits = NULL;
|
m_topol_traits = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
|
|
@ -524,7 +524,7 @@ public:
|
||||||
/*! Constructor */
|
/*! Constructor */
|
||||||
Arr_polyhedral_sgm_initializer(PolyhedralSgm& sgm) :
|
Arr_polyhedral_sgm_initializer(PolyhedralSgm& sgm) :
|
||||||
Base(sgm),
|
Base(sgm),
|
||||||
m_visitor(NULL),
|
m_visitor(nullptr),
|
||||||
m_marked_vertex_index(0),
|
m_marked_vertex_index(0),
|
||||||
m_marked_edge_index(0),
|
m_marked_edge_index(0),
|
||||||
m_marked_facet_index(0)
|
m_marked_facet_index(0)
|
||||||
|
|
@ -538,7 +538,7 @@ public:
|
||||||
* \param visitor
|
* \param visitor
|
||||||
* \pre The polyhedron polyhedron does not have coplanar facets.
|
* \pre The polyhedron polyhedron does not have coplanar facets.
|
||||||
*/
|
*/
|
||||||
void operator()(Polyhedron& polyhedron, Visitor* visitor = NULL)
|
void operator()(Polyhedron& polyhedron, Visitor* visitor = nullptr)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
std::copy(polyhedron.points_begin(), polyhedron.points_end(),
|
std::copy(polyhedron.points_begin(), polyhedron.points_end(),
|
||||||
|
|
@ -568,7 +568,7 @@ public:
|
||||||
const CoordIndexIter indices_begin,
|
const CoordIndexIter indices_begin,
|
||||||
const CoordIndexIter indices_end,
|
const CoordIndexIter indices_end,
|
||||||
size_type num_facets,
|
size_type num_facets,
|
||||||
Visitor* visitor = NULL)
|
Visitor* visitor = nullptr)
|
||||||
{
|
{
|
||||||
m_visitor = visitor;
|
m_visitor = visitor;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ public:
|
||||||
typedef typename Base::Plane Plane;
|
typedef typename Base::Plane Plane;
|
||||||
|
|
||||||
/*! Constructor */
|
/*! Constructor */
|
||||||
Arr_polyhedral_sgm_polyhedron_3_face() : m_vertex(NULL), m_marked(false) {}
|
Arr_polyhedral_sgm_polyhedron_3_face() : m_vertex(nullptr), m_marked(false) {}
|
||||||
|
|
||||||
/*! Obtain the mutable plane. Delegate */
|
/*! Obtain the mutable plane. Delegate */
|
||||||
Plane & plane() { return Base::plane(); }
|
Plane & plane() { return Base::plane(); }
|
||||||
|
|
|
||||||
|
|
@ -213,7 +213,7 @@ void Arr_transform_on_sphere(Arrangement & arr,
|
||||||
ind = ARR_MAX_END;
|
ind = ARR_MAX_END;
|
||||||
|
|
||||||
// Check if it was already added.
|
// Check if it was already added.
|
||||||
if (topol_traits->discontinuity_vertex(havc->curve(), ind)== NULL &&
|
if (topol_traits->discontinuity_vertex(havc->curve(), ind)== nullptr &&
|
||||||
topol_traits->south_pole() != &(*havc->target()) &&
|
topol_traits->south_pole() != &(*havc->target()) &&
|
||||||
topol_traits->north_pole() != &(*havc->target()) )
|
topol_traits->north_pole() != &(*havc->target()) )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ private:
|
||||||
//! A container of boundary vertices.
|
//! A container of boundary vertices.
|
||||||
struct Vertex_key_comparer {
|
struct Vertex_key_comparer {
|
||||||
/*! Construct default */
|
/*! Construct default */
|
||||||
Vertex_key_comparer() : m_geom_traits(NULL) {}
|
Vertex_key_comparer() : m_geom_traits(nullptr) {}
|
||||||
|
|
||||||
/*! Construct */
|
/*! Construct */
|
||||||
Vertex_key_comparer(const Gt_adaptor_2* geom_traits) :
|
Vertex_key_comparer(const Gt_adaptor_2* geom_traits) :
|
||||||
|
|
@ -297,7 +297,7 @@ public:
|
||||||
Vertex* north_pole() { return m_north_pole; }
|
Vertex* north_pole() { return m_north_pole; }
|
||||||
|
|
||||||
/*! Obtain a vertex on the line of discontinuity that corresponds to
|
/*! Obtain a vertex on the line of discontinuity that corresponds to
|
||||||
* the given curve-end (or return NULL if no such vertex exists).
|
* the given curve-end (or return nullptr if no such vertex exists).
|
||||||
*/
|
*/
|
||||||
Vertex* discontinuity_vertex(const X_monotone_curve_2 xc, Arr_curve_end ind)
|
Vertex* discontinuity_vertex(const X_monotone_curve_2 xc, Arr_curve_end ind)
|
||||||
{
|
{
|
||||||
|
|
@ -305,7 +305,7 @@ public:
|
||||||
m_geom_traits->construct_min_vertex_2_object()(xc) :
|
m_geom_traits->construct_min_vertex_2_object()(xc) :
|
||||||
m_geom_traits->construct_max_vertex_2_object()(xc);
|
m_geom_traits->construct_max_vertex_2_object()(xc);
|
||||||
typename Vertex_map::iterator it = m_boundary_vertices.find(key);
|
typename Vertex_map::iterator it = m_boundary_vertices.find(key);
|
||||||
return (it != m_boundary_vertices.end()) ? it->second : NULL;
|
return (it != m_boundary_vertices.end()) ? it->second : nullptr;
|
||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
@ -546,7 +546,7 @@ public:
|
||||||
{
|
{
|
||||||
// There are no fictitious halfedges:
|
// There are no fictitious halfedges:
|
||||||
CGAL_error();
|
CGAL_error();
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Determine whether the given face is unbounded.
|
/*! Determine whether the given face is unbounded.
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ void Arr_bounded_planar_topology_traits_2<GeometryTraits_2, Dcel_>::
|
||||||
dcel_updated()
|
dcel_updated()
|
||||||
{
|
{
|
||||||
// Go over the DCEL faces and locate the unbounded face.
|
// Go over the DCEL faces and locate the unbounded face.
|
||||||
unb_face = NULL;
|
unb_face = nullptr;
|
||||||
typename Dcel::Face_iterator fit = this->m_dcel.faces_begin();
|
typename Dcel::Face_iterator fit = this->m_dcel.faces_begin();
|
||||||
for (; fit != this->m_dcel.faces_end(); ++fit) {
|
for (; fit != this->m_dcel.faces_end(); ++fit) {
|
||||||
if (fit->is_unbounded()) {
|
if (fit->is_unbounded()) {
|
||||||
|
|
@ -79,7 +79,7 @@ dcel_updated()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CGAL_assertion(unb_face != NULL);
|
CGAL_assertion(unb_face != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,8 @@ public:
|
||||||
|
|
||||||
/*! Constructor. */
|
/*! Constructor. */
|
||||||
Arr_inc_insertion_zone_visitor () :
|
Arr_inc_insertion_zone_visitor () :
|
||||||
p_arr (NULL),
|
p_arr (nullptr),
|
||||||
geom_traits (NULL),
|
geom_traits (nullptr),
|
||||||
invalid_v (),
|
invalid_v (),
|
||||||
invalid_he ()
|
invalid_he ()
|
||||||
{}
|
{}
|
||||||
|
|
|
||||||
|
|
@ -110,9 +110,9 @@ public:
|
||||||
// Clear the DCEL.
|
// Clear the DCEL.
|
||||||
m_dcel.delete_all();
|
m_dcel.delete_all();
|
||||||
|
|
||||||
if (m_own_geom_traits && (m_geom_traits != NULL)) {
|
if (m_own_geom_traits && (m_geom_traits != nullptr)) {
|
||||||
delete m_geom_traits;
|
delete m_geom_traits;
|
||||||
m_geom_traits = NULL;
|
m_geom_traits = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
@ -247,9 +247,9 @@ Arr_planar_topology_traits_base_2<GeomTraits, Dcel_>::assign(const Self& other)
|
||||||
m_dcel.assign(other.m_dcel);
|
m_dcel.assign(other.m_dcel);
|
||||||
|
|
||||||
// Take care of the traits object.
|
// Take care of the traits object.
|
||||||
if (m_own_geom_traits && (m_geom_traits != NULL)) {
|
if (m_own_geom_traits && (m_geom_traits != nullptr)) {
|
||||||
delete m_geom_traits;
|
delete m_geom_traits;
|
||||||
m_geom_traits = NULL;
|
m_geom_traits = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (other.m_own_geom_traits) m_geom_traits = new Traits_adaptor_2;
|
if (other.m_own_geom_traits) m_geom_traits = new Traits_adaptor_2;
|
||||||
|
|
@ -265,8 +265,8 @@ template <typename GeomTraits, typename Dcel_>
|
||||||
bool Arr_planar_topology_traits_base_2<GeomTraits, Dcel_>::
|
bool Arr_planar_topology_traits_base_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
|
||||||
{
|
{
|
||||||
CGAL_precondition((v == NULL) || ! v->has_null_point());
|
CGAL_precondition((v == nullptr) || ! v->has_null_point());
|
||||||
CGAL_precondition((v == NULL) ||
|
CGAL_precondition((v == nullptr) ||
|
||||||
m_geom_traits->equal_2_object()(p, v->point()));
|
m_geom_traits->equal_2_object()(p, v->point()));
|
||||||
|
|
||||||
// In case the face is unbounded and has no outer ccbs, this is the single
|
// In case the face is unbounded and has no outer ccbs, this is the single
|
||||||
|
|
@ -310,7 +310,7 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// Compare p to the target vertex of the current halfedge.
|
// Compare p to the target vertex of the current halfedge.
|
||||||
// If the vertex v associated with p (if v is given and is not NULL)
|
// If the vertex v associated with p (if v is given and is not nullptr)
|
||||||
// on the boundary of the component, p is obviously not in the interior
|
// on the boundary of the component, p is obviously not in the interior
|
||||||
// the component.
|
// the component.
|
||||||
if (curr->vertex() == v) return false;
|
if (curr->vertex() == v) return false;
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ public:
|
||||||
Arr_spherical_construction_helper(Arrangement_2* arr) :
|
Arr_spherical_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(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Destructor. */
|
/*! Destructor. */
|
||||||
|
|
@ -172,7 +172,7 @@ public:
|
||||||
*/
|
*/
|
||||||
void splice_indices_list(Halfedge_handle he)
|
void splice_indices_list(Halfedge_handle he)
|
||||||
{
|
{
|
||||||
CGAL_assertion(m_he_ind_map_p != NULL);
|
CGAL_assertion(m_he_ind_map_p != nullptr);
|
||||||
Indices_list& list_ref = (*m_he_ind_map_p)[he];
|
Indices_list& list_ref = (*m_he_ind_map_p)[he];
|
||||||
list_ref.splice(list_ref.end(), m_subcurves_at_nf);
|
list_ref.splice(list_ref.end(), m_subcurves_at_nf);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,9 @@ namespace CGAL {
|
||||||
template <typename GeomTraits, typename Dcel>
|
template <typename GeomTraits, typename Dcel>
|
||||||
Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
|
Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
|
||||||
Arr_spherical_topology_traits_2() :
|
Arr_spherical_topology_traits_2() :
|
||||||
m_spherical_face(NULL),
|
m_spherical_face(nullptr),
|
||||||
m_north_pole(NULL),
|
m_north_pole(nullptr),
|
||||||
m_south_pole(NULL),
|
m_south_pole(nullptr),
|
||||||
m_own_geom_traits(true)
|
m_own_geom_traits(true)
|
||||||
{
|
{
|
||||||
m_geom_traits = new Gt_adaptor_2;
|
m_geom_traits = new Gt_adaptor_2;
|
||||||
|
|
@ -49,9 +49,9 @@ Arr_spherical_topology_traits_2() :
|
||||||
template <typename GeomTraits, typename Dcel>
|
template <typename GeomTraits, typename Dcel>
|
||||||
Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
|
Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
|
||||||
Arr_spherical_topology_traits_2(const Geometry_traits_2* traits) :
|
Arr_spherical_topology_traits_2(const Geometry_traits_2* traits) :
|
||||||
m_spherical_face(NULL),
|
m_spherical_face(nullptr),
|
||||||
m_north_pole(NULL),
|
m_north_pole(nullptr),
|
||||||
m_south_pole(NULL),
|
m_south_pole(nullptr),
|
||||||
m_own_geom_traits(false)
|
m_own_geom_traits(false)
|
||||||
{
|
{
|
||||||
m_geom_traits = static_cast<const Gt_adaptor_2*>(traits);
|
m_geom_traits = static_cast<const Gt_adaptor_2*>(traits);
|
||||||
|
|
@ -66,9 +66,9 @@ Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
|
||||||
// Clear the DCEL.
|
// Clear the DCEL.
|
||||||
m_dcel.delete_all();
|
m_dcel.delete_all();
|
||||||
|
|
||||||
if (m_own_geom_traits && (m_geom_traits != NULL)) {
|
if (m_own_geom_traits && (m_geom_traits != nullptr)) {
|
||||||
delete m_geom_traits;
|
delete m_geom_traits;
|
||||||
m_geom_traits = NULL;
|
m_geom_traits = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -82,9 +82,9 @@ assign(const Self& other)
|
||||||
m_dcel.assign(other.m_dcel);
|
m_dcel.assign(other.m_dcel);
|
||||||
|
|
||||||
// Take care of the traits object.
|
// Take care of the traits object.
|
||||||
if (m_own_geom_traits && m_geom_traits != NULL) {
|
if (m_own_geom_traits && m_geom_traits != nullptr) {
|
||||||
delete m_geom_traits;
|
delete m_geom_traits;
|
||||||
m_geom_traits = NULL;
|
m_geom_traits = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (other.m_own_geom_traits) {
|
if (other.m_own_geom_traits) {
|
||||||
|
|
@ -109,8 +109,8 @@ void Arr_spherical_topology_traits_2<GeomTraits_, Dcel_>::dcel_updated()
|
||||||
// Go over the DCEL vertices and locate the south and north pole (if any)
|
// Go over the DCEL vertices and locate the south and north pole (if any)
|
||||||
// and any other vertex on the line of discontinuity.
|
// and any other vertex on the line of discontinuity.
|
||||||
|
|
||||||
m_north_pole = NULL;
|
m_north_pole = nullptr;
|
||||||
m_south_pole = NULL;
|
m_south_pole = nullptr;
|
||||||
m_boundary_vertices.clear();
|
m_boundary_vertices.clear();
|
||||||
|
|
||||||
typename Dcel::Vertex_iterator vit = this->m_dcel.vertices_begin();
|
typename Dcel::Vertex_iterator vit = this->m_dcel.vertices_begin();
|
||||||
|
|
@ -129,17 +129,17 @@ void Arr_spherical_topology_traits_2<GeomTraits_, Dcel_>::dcel_updated()
|
||||||
// Go over the DCEL faces and locate the spherical face, which is the only
|
// Go over the DCEL faces and locate the spherical face, which is the only
|
||||||
// face with no outer CCB.
|
// face with no outer CCB.
|
||||||
|
|
||||||
m_spherical_face = NULL;
|
m_spherical_face = nullptr;
|
||||||
typename Dcel::Face_iterator fit = this->m_dcel.faces_begin();
|
typename Dcel::Face_iterator fit = this->m_dcel.faces_begin();
|
||||||
for (; fit != this->m_dcel.faces_end(); ++fit) {
|
for (; fit != this->m_dcel.faces_end(); ++fit) {
|
||||||
if (fit->number_of_outer_ccbs() == 0) {
|
if (fit->number_of_outer_ccbs() == 0) {
|
||||||
CGAL_assertion(m_spherical_face == NULL);
|
CGAL_assertion(m_spherical_face == nullptr);
|
||||||
|
|
||||||
m_spherical_face = &(*fit);
|
m_spherical_face = &(*fit);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CGAL_assertion(m_spherical_face != NULL);
|
CGAL_assertion(m_spherical_face != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief initializes an empty DCEL structure. */
|
/*! \brief initializes an empty DCEL structure. */
|
||||||
|
|
@ -156,8 +156,8 @@ void Arr_spherical_topology_traits_2<GeomTraits, Dcel>::init_dcel()
|
||||||
m_spherical_face->set_unbounded(false);
|
m_spherical_face->set_unbounded(false);
|
||||||
m_spherical_face->set_fictitious(false);
|
m_spherical_face->set_fictitious(false);
|
||||||
|
|
||||||
m_north_pole = NULL;
|
m_north_pole = nullptr;
|
||||||
m_south_pole = NULL;
|
m_south_pole = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief determines whether a point lies in the interior of a given face. */
|
/*! \brief determines whether a point lies in the interior of a given face. */
|
||||||
|
|
@ -166,8 +166,8 @@ bool Arr_spherical_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
|
||||||
{
|
{
|
||||||
// std::cout << "is_in_face()" << std::endl;
|
// std::cout << "is_in_face()" << std::endl;
|
||||||
CGAL_precondition((v == NULL) || !v->has_null_point());
|
CGAL_precondition((v == nullptr) || !v->has_null_point());
|
||||||
CGAL_precondition((v == NULL) ||
|
CGAL_precondition((v == nullptr) ||
|
||||||
m_geom_traits->equal_2_object()(p, v->point()));
|
m_geom_traits->equal_2_object()(p, v->point()));
|
||||||
|
|
||||||
/* There is always one face that contains everything else. It has no
|
/* There is always one face that contains everything else. It has no
|
||||||
|
|
@ -183,12 +183,12 @@ is_in_face(const Face* f, const Point_2& p, const Vertex* v) const
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
#endif
|
#endif
|
||||||
if (f->number_of_outer_ccbs() == 0) return true;
|
if (f->number_of_outer_ccbs() == 0) return true;
|
||||||
if (((v != NULL) && (v->parameter_space_in_y() == ARR_TOP_BOUNDARY)) ||
|
if (((v != nullptr) && (v->parameter_space_in_y() == ARR_TOP_BOUNDARY)) ||
|
||||||
(m_geom_traits->parameter_space_in_y_2_object()(p) == ARR_TOP_BOUNDARY))
|
(m_geom_traits->parameter_space_in_y_2_object()(p) == ARR_TOP_BOUNDARY))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
/*! \todo a temporary test
|
/*! \todo a temporary test
|
||||||
* if (((v != NULL) && (v->parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)) ||
|
* if (((v != nullptr) && (v->parameter_space_in_y() == ARR_BOTTOM_BOUNDARY)) ||
|
||||||
* (p.is_min_boundary()))
|
* (p.is_min_boundary()))
|
||||||
* return false;
|
* return false;
|
||||||
*/
|
*/
|
||||||
|
|
@ -536,12 +536,12 @@ place_boundary_vertex(Face* /* f */,
|
||||||
{
|
{
|
||||||
// std::cout << "place_boundary_vertex()" << std::endl;
|
// std::cout << "place_boundary_vertex()" << std::endl;
|
||||||
if (ps_y == ARR_BOTTOM_BOUNDARY) {
|
if (ps_y == ARR_BOTTOM_BOUNDARY) {
|
||||||
if (m_south_pole == NULL) return Object();
|
if (m_south_pole == nullptr) return Object();
|
||||||
return CGAL::make_object(m_south_pole);
|
return CGAL::make_object(m_south_pole);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ps_y == ARR_TOP_BOUNDARY) {
|
if (ps_y == ARR_TOP_BOUNDARY) {
|
||||||
if (m_north_pole == NULL) return Object();
|
if (m_north_pole == nullptr) return Object();
|
||||||
return CGAL::make_object(m_north_pole);
|
return CGAL::make_object(m_north_pole);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -608,18 +608,18 @@ locate_curve_end(const X_monotone_curve_2& xc, Arr_curve_end ind,
|
||||||
// In case the curve end coincides with the north pole, return the vertex
|
// In case the curve end coincides with the north pole, return the vertex
|
||||||
// representing the north pole, if one exists. Otherwise, return the face
|
// representing the north pole, if one exists. Otherwise, return the face
|
||||||
// containing this pole (the spherical face).
|
// containing this pole (the spherical face).
|
||||||
if (m_north_pole != NULL) return CGAL::make_object(m_north_pole);
|
if (m_north_pole != nullptr) return CGAL::make_object(m_north_pole);
|
||||||
return CGAL::make_object(m_spherical_face);
|
return CGAL::make_object(m_spherical_face);
|
||||||
}
|
}
|
||||||
|
|
||||||
typename Vertex_map::iterator it;
|
typename Vertex_map::iterator it;
|
||||||
Vertex* v = NULL;
|
Vertex* v = nullptr;
|
||||||
|
|
||||||
if (ps_y == ARR_BOTTOM_BOUNDARY) {
|
if (ps_y == ARR_BOTTOM_BOUNDARY) {
|
||||||
// In case the curve end coincides with the south pole, return the vertex
|
// In case the curve end coincides with the south pole, return the vertex
|
||||||
// representing the south pole, if one exists. Otherwise, search for the
|
// representing the south pole, if one exists. Otherwise, search for the
|
||||||
// face containing this pole.
|
// face containing this pole.
|
||||||
if (m_south_pole != NULL) return CGAL::make_object(m_south_pole);
|
if (m_south_pole != nullptr) return CGAL::make_object(m_south_pole);
|
||||||
it = m_boundary_vertices.begin();
|
it = m_boundary_vertices.begin();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -655,7 +655,7 @@ locate_curve_end(const X_monotone_curve_2& xc, Arr_curve_end ind,
|
||||||
template <typename GeomTraits, typename Dcel>
|
template <typename GeomTraits, typename Dcel>
|
||||||
bool Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
|
bool Arr_spherical_topology_traits_2<GeomTraits, Dcel>::
|
||||||
is_redundant(const Vertex* v) const
|
is_redundant(const Vertex* v) const
|
||||||
{ return (v->halfedge() == NULL); }
|
{ return (v->halfedge() == nullptr); }
|
||||||
|
|
||||||
/* \brief erases a given redundant vertex */
|
/* \brief erases a given redundant vertex */
|
||||||
template <typename GeomTraits, typename Dcel>
|
template <typename GeomTraits, typename Dcel>
|
||||||
|
|
@ -665,17 +665,17 @@ erase_redundant_vertex(Vertex* v)
|
||||||
{
|
{
|
||||||
const Arr_parameter_space ps_y = v->parameter_space_in_y();
|
const Arr_parameter_space ps_y = v->parameter_space_in_y();
|
||||||
if (ps_y == ARR_BOTTOM_BOUNDARY) {
|
if (ps_y == ARR_BOTTOM_BOUNDARY) {
|
||||||
m_south_pole = NULL;
|
m_south_pole = nullptr;
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
if (ps_y == ARR_TOP_BOUNDARY) {
|
if (ps_y == ARR_TOP_BOUNDARY) {
|
||||||
m_north_pole = NULL;
|
m_north_pole = nullptr;
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
CGAL_assertion_code(Arr_parameter_space ps_x = v->parameter_space_in_x());
|
CGAL_assertion_code(Arr_parameter_space ps_x = v->parameter_space_in_x());
|
||||||
CGAL_assertion(ps_x != ARR_INTERIOR);
|
CGAL_assertion(ps_x != ARR_INTERIOR);
|
||||||
m_boundary_vertices.erase(v->point());
|
m_boundary_vertices.erase(v->point());
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief obtains the curve associated with a boundary vertex */
|
/*! \brief obtains the curve associated with a boundary vertex */
|
||||||
|
|
@ -703,12 +703,12 @@ _locate_around_vertex_on_discontinuity(Vertex* v,
|
||||||
Arr_curve_end ind) const
|
Arr_curve_end ind) const
|
||||||
{
|
{
|
||||||
// If the vertex is isolated, there is no predecssor halfedge.
|
// If the vertex is isolated, there is no predecssor halfedge.
|
||||||
if (v->is_isolated()) return NULL;
|
if (v->is_isolated()) return nullptr;
|
||||||
|
|
||||||
// Get the first incident halfedge around v and the next halfedge.
|
// Get the first incident halfedge around v and the next halfedge.
|
||||||
Halfedge* first = v->halfedge();
|
Halfedge* first = v->halfedge();
|
||||||
Halfedge* curr = first;
|
Halfedge* curr = first;
|
||||||
CGAL_assertion(curr != NULL);
|
CGAL_assertion(curr != nullptr);
|
||||||
Halfedge* next = curr->next()->opposite();
|
Halfedge* next = curr->next()->opposite();
|
||||||
|
|
||||||
// If is only one halfedge incident to v, return this halfedge as xc's
|
// If is only one halfedge incident to v, return this halfedge as xc's
|
||||||
|
|
@ -756,12 +756,12 @@ _locate_around_pole(Vertex* v,
|
||||||
|
|
||||||
// std::cout << "locate_around_pole() " << ind << std::endl;
|
// std::cout << "locate_around_pole() " << ind << std::endl;
|
||||||
// If the vertex is isolated, return a null halfedge:
|
// If the vertex is isolated, return a null halfedge:
|
||||||
if (v->is_isolated()) return NULL;
|
if (v->is_isolated()) return nullptr;
|
||||||
|
|
||||||
// Get the first incident halfedge around v and the next halfedge:
|
// Get the first incident halfedge around v and the next halfedge:
|
||||||
Halfedge* first = v->halfedge();
|
Halfedge* first = v->halfedge();
|
||||||
Halfedge* curr = first;
|
Halfedge* curr = first;
|
||||||
CGAL_assertion(curr != NULL);
|
CGAL_assertion(curr != nullptr);
|
||||||
Halfedge* next = curr->next()->opposite();
|
Halfedge* next = curr->next()->opposite();
|
||||||
|
|
||||||
// If there is only one halfedge, it is the predecessor, return it:
|
// If there is only one halfedge, it is the predecessor, return it:
|
||||||
|
|
@ -809,7 +809,7 @@ _locate_around_pole(Vertex* v,
|
||||||
|
|
||||||
// We sould never reach here:
|
// We sould never reach here:
|
||||||
CGAL_error();
|
CGAL_error();
|
||||||
return NULL;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! \brief Return the face that lies below the given vertex, which lies
|
/*! \brief Return the face that lies below the given vertex, which lies
|
||||||
|
|
@ -826,7 +826,7 @@ _face_below_vertex_on_discontinuity(Vertex* v) const
|
||||||
// Get the first incident halfedge around v and the next halfedge.
|
// Get the first incident halfedge around v and the next halfedge.
|
||||||
Halfedge* first = v->halfedge();
|
Halfedge* first = v->halfedge();
|
||||||
Halfedge* curr = first;
|
Halfedge* curr = first;
|
||||||
CGAL_assertion(curr != NULL);
|
CGAL_assertion(curr != nullptr);
|
||||||
Halfedge* next = curr->next()->opposite();
|
Halfedge* next = curr->next()->opposite();
|
||||||
|
|
||||||
// If there is only one halfedge incident to v, return its incident face.
|
// If there is only one halfedge incident to v, return its incident face.
|
||||||
|
|
@ -842,8 +842,8 @@ _face_below_vertex_on_discontinuity(Vertex* v) const
|
||||||
typename Gt_adaptor_2::Compare_y_at_x_left_2 cmp_y_at_x_op_left =
|
typename Gt_adaptor_2::Compare_y_at_x_left_2 cmp_y_at_x_op_left =
|
||||||
m_geom_traits->compare_y_at_x_left_2_object();
|
m_geom_traits->compare_y_at_x_left_2_object();
|
||||||
|
|
||||||
Halfedge* lowest_left = NULL;
|
Halfedge* lowest_left = nullptr;
|
||||||
Halfedge* top_right = NULL;
|
Halfedge* top_right = nullptr;
|
||||||
|
|
||||||
do {
|
do {
|
||||||
// Check whether the current halfedge is defined to the left or to the
|
// Check whether the current halfedge is defined to the left or to the
|
||||||
|
|
@ -851,7 +851,7 @@ _face_below_vertex_on_discontinuity(Vertex* v) const
|
||||||
if (curr->direction() == ARR_LEFT_TO_RIGHT) {
|
if (curr->direction() == ARR_LEFT_TO_RIGHT) {
|
||||||
// The curve associated with the current halfedge is defined to the left
|
// The curve associated with the current halfedge is defined to the left
|
||||||
// of v.
|
// of v.
|
||||||
if (lowest_left == NULL ||
|
if (lowest_left == nullptr ||
|
||||||
cmp_y_at_x_op_left(curr->curve(), lowest_left->curve(), v->point())
|
cmp_y_at_x_op_left(curr->curve(), lowest_left->curve(), v->point())
|
||||||
== SMALLER)
|
== SMALLER)
|
||||||
{
|
{
|
||||||
|
|
@ -861,7 +861,7 @@ _face_below_vertex_on_discontinuity(Vertex* v) const
|
||||||
else {
|
else {
|
||||||
// The curve associated with the current halfedge is defined to the right
|
// The curve associated with the current halfedge is defined to the right
|
||||||
// of v.
|
// of v.
|
||||||
if (top_right == NULL ||
|
if (top_right == nullptr ||
|
||||||
cmp_y_at_x_op_right(curr->curve(), top_right->curve(), v->point()) ==
|
cmp_y_at_x_op_right(curr->curve(), top_right->curve(), v->point()) ==
|
||||||
LARGER)
|
LARGER)
|
||||||
{
|
{
|
||||||
|
|
@ -878,7 +878,7 @@ _face_below_vertex_on_discontinuity(Vertex* v) const
|
||||||
// right. Note that as the halfedge we located has v as its target, we now
|
// right. Note that as the halfedge we located has v as its target, we now
|
||||||
// have to return its twin.
|
// have to return its twin.
|
||||||
first =
|
first =
|
||||||
(lowest_left != NULL) ? lowest_left->opposite() : top_right->opposite();
|
(lowest_left != nullptr) ? lowest_left->opposite() : top_right->opposite();
|
||||||
// std::cout << "first: " << first->opposite()->vertex()->point() << " => "
|
// std::cout << "first: " << first->opposite()->vertex()->point() << " => "
|
||||||
// << first->vertex()->point() << std::endl;
|
// << first->vertex()->point() << std::endl;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -114,14 +114,14 @@ public:
|
||||||
void Arr_spherical_vert_decomp_helper<Tr, Arr, Evnt, Sbcv>::before_sweep()
|
void Arr_spherical_vert_decomp_helper<Tr, Arr, Evnt, Sbcv>::before_sweep()
|
||||||
{
|
{
|
||||||
// Get the north pole and the face that intially contains it.
|
// Get the north pole and the face that intially contains it.
|
||||||
m_valid_north_pole = (m_top_traits->north_pole() != NULL);
|
m_valid_north_pole = (m_top_traits->north_pole() != nullptr);
|
||||||
if (m_valid_north_pole)
|
if (m_valid_north_pole)
|
||||||
m_north_pole = Vertex_const_handle (m_top_traits->north_pole());
|
m_north_pole = Vertex_const_handle (m_top_traits->north_pole());
|
||||||
|
|
||||||
m_north_face = Face_const_handle (m_top_traits->spherical_face());
|
m_north_face = Face_const_handle (m_top_traits->spherical_face());
|
||||||
|
|
||||||
// Get the south pole and the face that intially contains it.
|
// Get the south pole and the face that intially contains it.
|
||||||
m_valid_south_pole = (m_top_traits->south_pole() != NULL);
|
m_valid_south_pole = (m_top_traits->south_pole() != nullptr);
|
||||||
if (m_valid_south_pole)
|
if (m_valid_south_pole)
|
||||||
m_south_pole = Vertex_const_handle (m_top_traits->south_pole());
|
m_south_pole = Vertex_const_handle (m_top_traits->south_pole());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -116,9 +116,9 @@ public:
|
||||||
Arr_unb_planar_construction_helper(Arrangement_2* arr) :
|
Arr_unb_planar_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_prev_minus_inf_x_event(NULL),
|
m_prev_minus_inf_x_event(nullptr),
|
||||||
m_prev_plus_inf_y_event(NULL),
|
m_prev_plus_inf_y_event(nullptr),
|
||||||
m_he_ind_map_p(NULL)
|
m_he_ind_map_p(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Destructor. */
|
/*! Destructor. */
|
||||||
|
|
@ -155,7 +155,7 @@ public:
|
||||||
// The last event at y = +oo may be deallocated if it has no incident
|
// The last event at y = +oo may be deallocated if it has no incident
|
||||||
// right subcurves, so we should not keep a pointer to it.
|
// right subcurves, so we should not keep a pointer to it.
|
||||||
if (event == m_prev_plus_inf_y_event)
|
if (event == m_prev_plus_inf_y_event)
|
||||||
m_prev_plus_inf_y_event = NULL;
|
m_prev_plus_inf_y_event = nullptr;
|
||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
@ -278,7 +278,7 @@ before_handle_event(Event* event)
|
||||||
|
|
||||||
// Update the incident halfedge of the previous vertex at x = -oo
|
// Update the incident halfedge of the previous vertex at x = -oo
|
||||||
// (m_lh used to be incident to it, but now we have split it).
|
// (m_lh used to be incident to it, but now we have split it).
|
||||||
if (m_prev_minus_inf_x_event != NULL)
|
if (m_prev_minus_inf_x_event != nullptr)
|
||||||
m_prev_minus_inf_x_event->set_halfedge_handle(m_lh->next());
|
m_prev_minus_inf_x_event->set_halfedge_handle(m_lh->next());
|
||||||
m_prev_minus_inf_x_event = event;
|
m_prev_minus_inf_x_event = event;
|
||||||
return;
|
return;
|
||||||
|
|
@ -311,13 +311,13 @@ before_handle_event(Event* event)
|
||||||
|
|
||||||
// Update the incident halfedge of the previous vertex at y = +oo
|
// Update the incident halfedge of the previous vertex at y = +oo
|
||||||
// (m_th used to be incident to it, but now we have split it).
|
// (m_th used to be incident to it, but now we have split it).
|
||||||
if (m_prev_plus_inf_y_event != NULL)
|
if (m_prev_plus_inf_y_event != nullptr)
|
||||||
m_prev_plus_inf_y_event->set_halfedge_handle(m_th->next());
|
m_prev_plus_inf_y_event->set_halfedge_handle(m_th->next());
|
||||||
m_prev_plus_inf_y_event = event;
|
m_prev_plus_inf_y_event = event;
|
||||||
|
|
||||||
// Associate all curve indices of subcurves that "see" m_th from
|
// Associate all curve indices of subcurves that "see" m_th from
|
||||||
// below with the left portion of the split halfedge (m_th->next()).
|
// below with the left portion of the split halfedge (m_th->next()).
|
||||||
if (m_he_ind_map_p != NULL)
|
if (m_he_ind_map_p != nullptr)
|
||||||
{
|
{
|
||||||
Indices_list& list_ref = (*m_he_ind_map_p)[m_th->next()];
|
Indices_list& list_ref = (*m_he_ind_map_p)[m_th->next()];
|
||||||
list_ref.clear();
|
list_ref.clear();
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ before_handle_event(Event* event)
|
||||||
if (ps_x == ARR_LEFT_BOUNDARY) {
|
if (ps_x == ARR_LEFT_BOUNDARY) {
|
||||||
// The event lies on the left fictitious halfedge.
|
// The event lies on the left fictitious halfedge.
|
||||||
this->m_lh = this->m_lh->twin()->next()->twin();
|
this->m_lh = this->m_lh->twin()->next()->twin();
|
||||||
this->m_prev_minus_inf_x_event = NULL;
|
this->m_prev_minus_inf_x_event = nullptr;
|
||||||
}
|
}
|
||||||
else if (ps_x == ARR_RIGHT_BOUNDARY) {
|
else if (ps_x == ARR_RIGHT_BOUNDARY) {
|
||||||
// The event lies on the right fictitious halfedge.
|
// The event lies on the right fictitious halfedge.
|
||||||
|
|
@ -204,7 +204,7 @@ before_handle_event(Event* event)
|
||||||
// The event lies on the top fictitious halfedge.
|
// The event lies on the top fictitious halfedge.
|
||||||
CGAL_assertion (ps_y == ARR_TOP_BOUNDARY);
|
CGAL_assertion (ps_y == ARR_TOP_BOUNDARY);
|
||||||
this->m_th = this->m_th->twin()->next()->twin();
|
this->m_th = this->m_th->twin()->next()->twin();
|
||||||
this->m_prev_plus_inf_y_event = NULL;
|
this->m_prev_plus_inf_y_event = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -40,12 +40,12 @@ template <typename GeomTraits, typename Dcel_>
|
||||||
Arr_unb_planar_topology_traits_2<GeomTraits, Dcel_>::
|
Arr_unb_planar_topology_traits_2<GeomTraits, Dcel_>::
|
||||||
Arr_unb_planar_topology_traits_2():
|
Arr_unb_planar_topology_traits_2():
|
||||||
Base(),
|
Base(),
|
||||||
v_bl(NULL),
|
v_bl(nullptr),
|
||||||
v_tl(NULL),
|
v_tl(nullptr),
|
||||||
v_br(NULL),
|
v_br(nullptr),
|
||||||
v_tr(NULL),
|
v_tr(nullptr),
|
||||||
n_inf_verts(0),
|
n_inf_verts(0),
|
||||||
fict_face(NULL)
|
fict_face(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
@ -55,12 +55,12 @@ template <typename GeomTraits, typename Dcel_>
|
||||||
Arr_unb_planar_topology_traits_2<GeomTraits, Dcel_>::
|
Arr_unb_planar_topology_traits_2<GeomTraits, Dcel_>::
|
||||||
Arr_unb_planar_topology_traits_2 (const Geometry_traits_2 * geom_traits) :
|
Arr_unb_planar_topology_traits_2 (const Geometry_traits_2 * geom_traits) :
|
||||||
Base (geom_traits),
|
Base (geom_traits),
|
||||||
v_bl (NULL),
|
v_bl (nullptr),
|
||||||
v_tl (NULL),
|
v_tl (nullptr),
|
||||||
v_br (NULL),
|
v_br (nullptr),
|
||||||
v_tr (NULL),
|
v_tr (nullptr),
|
||||||
n_inf_verts (0),
|
n_inf_verts (0),
|
||||||
fict_face (NULL)
|
fict_face (nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
@ -89,7 +89,7 @@ void Arr_unb_planar_topology_traits_2<GeomTraits, Dcel_>::dcel_updated ()
|
||||||
typename Dcel::Vertex_iterator vit;
|
typename Dcel::Vertex_iterator vit;
|
||||||
Halfedge *first_he, *next_he;
|
Halfedge *first_he, *next_he;
|
||||||
|
|
||||||
v_bl = v_tl = v_br = v_tr = NULL;
|
v_bl = v_tl = v_br = v_tr = nullptr;
|
||||||
n_inf_verts = 0;
|
n_inf_verts = 0;
|
||||||
for (vit = this->m_dcel.vertices_begin();
|
for (vit = this->m_dcel.vertices_begin();
|
||||||
vit != this->m_dcel.vertices_end(); ++vit)
|
vit != this->m_dcel.vertices_end(); ++vit)
|
||||||
|
|
@ -123,23 +123,23 @@ void Arr_unb_planar_topology_traits_2<GeomTraits, Dcel_>::dcel_updated ()
|
||||||
CGAL_error();
|
CGAL_error();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CGAL_assertion(v_bl != NULL && v_tl != NULL && v_br != NULL && v_tr != NULL);
|
CGAL_assertion(v_bl != nullptr && v_tl != nullptr && v_br != nullptr && v_tr != nullptr);
|
||||||
|
|
||||||
// Go over the DCEL faces and locate the fictitious face.
|
// Go over the DCEL faces and locate the fictitious face.
|
||||||
typename Dcel::Face_iterator fit;
|
typename Dcel::Face_iterator fit;
|
||||||
|
|
||||||
fict_face = NULL;
|
fict_face = nullptr;
|
||||||
for (fit = this->m_dcel.faces_begin();
|
for (fit = this->m_dcel.faces_begin();
|
||||||
fit != this->m_dcel.faces_end(); ++fit)
|
fit != this->m_dcel.faces_end(); ++fit)
|
||||||
{
|
{
|
||||||
if (fit->is_fictitious())
|
if (fit->is_fictitious())
|
||||||
{
|
{
|
||||||
CGAL_assertion (fict_face == NULL);
|
CGAL_assertion (fict_face == nullptr);
|
||||||
|
|
||||||
fict_face = &(*fit);
|
fict_face = &(*fit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CGAL_assertion (fict_face != NULL);
|
CGAL_assertion (fict_face != nullptr);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -200,10 +200,10 @@ void Arr_unb_planar_topology_traits_2<GeomTraits, Dcel_>::init_dcel ()
|
||||||
Inner_ccb *ic = this->m_dcel.new_inner_ccb();
|
Inner_ccb *ic = this->m_dcel.new_inner_ccb();
|
||||||
Face *in_f = this->m_dcel.new_face();
|
Face *in_f = this->m_dcel.new_face();
|
||||||
|
|
||||||
he1->set_curve (NULL);
|
he1->set_curve (nullptr);
|
||||||
he2->set_curve (NULL);
|
he2->set_curve (nullptr);
|
||||||
he3->set_curve (NULL);
|
he3->set_curve (nullptr);
|
||||||
he4->set_curve (NULL);
|
he4->set_curve (nullptr);
|
||||||
|
|
||||||
he1->set_next (he2); he1_t->set_next (he4_t);
|
he1->set_next (he2); he1_t->set_next (he4_t);
|
||||||
he2->set_next (he3); he4_t->set_next (he3_t);
|
he2->set_next (he3); he4_t->set_next (he3_t);
|
||||||
|
|
@ -272,7 +272,7 @@ are_equal(const Vertex *v,
|
||||||
Arr_curve_end v_ind;
|
Arr_curve_end v_ind;
|
||||||
const X_monotone_curve_2 *v_cv = _curve (v, v_ind);
|
const X_monotone_curve_2 *v_cv = _curve (v, v_ind);
|
||||||
|
|
||||||
if (v_cv == NULL)
|
if (v_cv == nullptr)
|
||||||
return (v->parameter_space_in_x() == ps_x &&
|
return (v->parameter_space_in_x() == ps_x &&
|
||||||
v->parameter_space_in_y() == ps_y);
|
v->parameter_space_in_y() == ps_y);
|
||||||
|
|
||||||
|
|
@ -287,7 +287,7 @@ are_equal(const Vertex *v,
|
||||||
Arr_curve_end v_ind;
|
Arr_curve_end v_ind;
|
||||||
const X_monotone_curve_2 *v_cv = _curve (v, v_ind);
|
const X_monotone_curve_2 *v_cv = _curve (v, v_ind);
|
||||||
|
|
||||||
if (v_cv == NULL)
|
if (v_cv == nullptr)
|
||||||
return (v->parameter_space_in_x() == ARR_INTERIOR &&
|
return (v->parameter_space_in_x() == ARR_INTERIOR &&
|
||||||
v->parameter_space_in_y() == ps_y);
|
v->parameter_space_in_y() == ps_y);
|
||||||
|
|
||||||
|
|
@ -555,23 +555,23 @@ erase_redundant_vertex (Vertex *v)
|
||||||
|
|
||||||
// Keep pointers to the components that contain two halfedges he3 and he2,
|
// Keep pointers to the components that contain two halfedges he3 and he2,
|
||||||
// pointing at the end vertices of the merged halfedge.
|
// pointing at the end vertices of the merged halfedge.
|
||||||
Inner_ccb *ic1 = (he3->is_on_inner_ccb()) ? he3->inner_ccb() : NULL;
|
Inner_ccb *ic1 = (he3->is_on_inner_ccb()) ? he3->inner_ccb() : nullptr;
|
||||||
Outer_ccb *oc1 = (ic1 == NULL) ? he3->outer_ccb() : NULL;
|
Outer_ccb *oc1 = (ic1 == nullptr) ? he3->outer_ccb() : nullptr;
|
||||||
Inner_ccb *ic2 = (he4->is_on_inner_ccb()) ? he4->inner_ccb() : NULL;
|
Inner_ccb *ic2 = (he4->is_on_inner_ccb()) ? he4->inner_ccb() : nullptr;
|
||||||
Outer_ccb *oc2 = (ic2 == NULL) ? he4->outer_ccb() : NULL;
|
Outer_ccb *oc2 = (ic2 == nullptr) ? he4->outer_ccb() : nullptr;
|
||||||
|
|
||||||
// As he1 and he2 will evetually represent the merged edge, while he3 and he4
|
// As he1 and he2 will evetually represent the merged edge, while he3 and he4
|
||||||
// will be deleted, check if the deleted halfedges are represantatives of a
|
// will be deleted, check if the deleted halfedges are represantatives of a
|
||||||
// face boundary or a hole inside these faces. If so, replace he3 by he1 and
|
// face boundary or a hole inside these faces. If so, replace he3 by he1 and
|
||||||
// he4 by he2.
|
// he4 by he2.
|
||||||
if (ic1 != NULL && ic1->halfedge() == he3)
|
if (ic1 != nullptr && ic1->halfedge() == he3)
|
||||||
ic1->set_halfedge (he1);
|
ic1->set_halfedge (he1);
|
||||||
else if (oc1 != NULL && oc1->halfedge() == he3)
|
else if (oc1 != nullptr && oc1->halfedge() == he3)
|
||||||
oc1->set_halfedge (he1);
|
oc1->set_halfedge (he1);
|
||||||
|
|
||||||
if (ic2 != NULL && ic2->halfedge() == he4)
|
if (ic2 != nullptr && ic2->halfedge() == he4)
|
||||||
ic2->set_halfedge (he2);
|
ic2->set_halfedge (he2);
|
||||||
else if (oc2 != NULL && oc2->halfedge() == he4)
|
else if (oc2 != nullptr && oc2->halfedge() == he4)
|
||||||
oc2->set_halfedge (he2);
|
oc2->set_halfedge (he2);
|
||||||
|
|
||||||
// If he3 is the incident halfedge to its target, replace it by he1.
|
// If he3 is the incident halfedge to its target, replace it by he1.
|
||||||
|
|
@ -625,7 +625,7 @@ compare_x (const Point_2& p, const Vertex* v) const
|
||||||
Arr_curve_end v_ind = ARR_MIN_END;
|
Arr_curve_end v_ind = ARR_MIN_END;
|
||||||
const X_monotone_curve_2* v_cv = _curve (v, v_ind);
|
const X_monotone_curve_2* v_cv = _curve (v, v_ind);
|
||||||
|
|
||||||
CGAL_assertion(v_cv != NULL);
|
CGAL_assertion(v_cv != nullptr);
|
||||||
return
|
return
|
||||||
(this->m_geom_traits->compare_x_point_curve_end_2_object()(p, *v_cv,
|
(this->m_geom_traits->compare_x_point_curve_end_2_object()(p, *v_cv,
|
||||||
v_ind));
|
v_ind));
|
||||||
|
|
@ -659,7 +659,7 @@ compare_xy (const Point_2& p, const Vertex* v) const
|
||||||
Arr_curve_end v_ind = ARR_MIN_END;
|
Arr_curve_end v_ind = ARR_MIN_END;
|
||||||
const X_monotone_curve_2* v_cv = _curve (v, v_ind);
|
const X_monotone_curve_2* v_cv = _curve (v, v_ind);
|
||||||
|
|
||||||
CGAL_assertion (v_cv != NULL);
|
CGAL_assertion (v_cv != nullptr);
|
||||||
|
|
||||||
Comparison_result res =
|
Comparison_result res =
|
||||||
this->m_geom_traits->compare_x_point_curve_end_2_object() (p, *v_cv,
|
this->m_geom_traits->compare_x_point_curve_end_2_object() (p, *v_cv,
|
||||||
|
|
@ -724,7 +724,7 @@ _curve (const Vertex* v, Arr_curve_end& ind) const
|
||||||
he = he->next()->opposite();
|
he = he->next()->opposite();
|
||||||
|
|
||||||
// No incident curve were found:
|
// No incident curve were found:
|
||||||
if (he == v->halfedge()) return (NULL);
|
if (he == v->halfedge()) return (nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The halfedge he is directed toward v, so if it is directed from left to
|
// The halfedge he is directed toward v, so if it is directed from left to
|
||||||
|
|
@ -844,7 +844,7 @@ _is_on_fictitious_edge(const X_monotone_curve_2& cv, Arr_curve_end ind,
|
||||||
// arrangement, but it hasn't been associated with a valid halfedge
|
// arrangement, but it hasn't been associated with a valid halfedge
|
||||||
// yet, as the insertion process is still ongoing.
|
// yet, as the insertion process is still ongoing.
|
||||||
// The comparison result in this case is trivial.
|
// The comparison result in this case is trivial.
|
||||||
if (v_cv1 != NULL) {
|
if (v_cv1 != nullptr) {
|
||||||
res1 =
|
res1 =
|
||||||
this->m_geom_traits->compare_x_curve_ends_2_object()(cv, ind,
|
this->m_geom_traits->compare_x_curve_ends_2_object()(cv, ind,
|
||||||
*v_cv1, v_ind);
|
*v_cv1, v_ind);
|
||||||
|
|
@ -878,7 +878,7 @@ _is_on_fictitious_edge(const X_monotone_curve_2& cv, Arr_curve_end ind,
|
||||||
// arrangement, but it hasn't been associated with a valid halfedge
|
// arrangement, but it hasn't been associated with a valid halfedge
|
||||||
// yet, as the insertion process is still ongoing.
|
// yet, as the insertion process is still ongoing.
|
||||||
// The comparison result in this case is trivial.
|
// The comparison result in this case is trivial.
|
||||||
if (v_cv2 != NULL) {
|
if (v_cv2 != nullptr) {
|
||||||
res2 =
|
res2 =
|
||||||
this->m_geom_traits->compare_x_curve_ends_2_object()(cv, ind,
|
this->m_geom_traits->compare_x_curve_ends_2_object()(cv, ind,
|
||||||
*v_cv2, v_ind);
|
*v_cv2, v_ind);
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ public:
|
||||||
Arr_trapezoid_ric_point_location (bool with_guarantees = true,
|
Arr_trapezoid_ric_point_location (bool with_guarantees = true,
|
||||||
double depth_thrs = CGAL_TD_DEFAULT_DEPTH_THRESHOLD,
|
double depth_thrs = CGAL_TD_DEFAULT_DEPTH_THRESHOLD,
|
||||||
double size_thrs = CGAL_TD_DEFAULT_SIZE_THRESHOLD)
|
double size_thrs = CGAL_TD_DEFAULT_SIZE_THRESHOLD)
|
||||||
: m_traits (NULL), m_with_guarantees(with_guarantees)
|
: m_traits (nullptr), m_with_guarantees(with_guarantees)
|
||||||
{
|
{
|
||||||
td.set_with_guarantees(with_guarantees);
|
td.set_with_guarantees(with_guarantees);
|
||||||
td.depth_threshold(depth_thrs);
|
td.depth_threshold(depth_thrs);
|
||||||
|
|
|
||||||
|
|
@ -129,7 +129,7 @@ protected:
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_triangulation_point_location() :
|
Arr_triangulation_point_location() :
|
||||||
m_traits(NULL),
|
m_traits(nullptr),
|
||||||
m_ignore_notifications(false),
|
m_ignore_notifications(false),
|
||||||
m_ignore_remove_edge(false)
|
m_ignore_remove_edge(false)
|
||||||
{}
|
{}
|
||||||
|
|
|
||||||
|
|
@ -342,7 +342,7 @@ public:
|
||||||
Arr_parameter_space /* ps_y */) const
|
Arr_parameter_space /* ps_y */) const
|
||||||
{
|
{
|
||||||
CGAL_error();
|
CGAL_error();
|
||||||
return (NULL);
|
return (nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Locate a DCEL feature that contains the given unbounded curve end.
|
/*! Locate a DCEL feature that contains the given unbounded curve end.
|
||||||
|
|
@ -492,7 +492,7 @@ protected:
|
||||||
* \param ind Output: ARR_MIN_END if the vertex is induced by the minimal end;
|
* \param ind Output: ARR_MIN_END if the vertex is induced by the minimal end;
|
||||||
* ARR_MAX_END if it is induced by the curve's maximal end.
|
* ARR_MAX_END if it is induced by the curve's maximal end.
|
||||||
* \pre v is a valid (not fictitious) boundary.
|
* \pre v is a valid (not fictitious) boundary.
|
||||||
* \return The curve that induces v, or NULL if v has no incident curves yet.
|
* \return The curve that induces v, or nullptr if v has no incident curves yet.
|
||||||
*/
|
*/
|
||||||
const X_monotone_curve_2* _curve(const Vertex* v, Arr_curve_end& ind) const;
|
const X_monotone_curve_2* _curve(const Vertex* v, Arr_curve_end& ind) const;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -87,9 +87,9 @@ protected:
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_walk_along_line_point_location() :
|
Arr_walk_along_line_point_location() :
|
||||||
p_arr(NULL),
|
p_arr(nullptr),
|
||||||
geom_traits(NULL),
|
geom_traits(nullptr),
|
||||||
top_traits(NULL)
|
top_traits(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor given an arrangement. */
|
/*! Constructor given an arrangement. */
|
||||||
|
|
@ -113,9 +113,9 @@ public:
|
||||||
/*! Detach from the current arrangement object. */
|
/*! Detach from the current arrangement object. */
|
||||||
void detach()
|
void detach()
|
||||||
{
|
{
|
||||||
p_arr = NULL;
|
p_arr = nullptr;
|
||||||
geom_traits = NULL;
|
geom_traits = nullptr;
|
||||||
top_traits = NULL;
|
top_traits = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ void insert(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
|
||||||
// Act according to the type of the current object.
|
// Act according to the type of the current object.
|
||||||
x_curve = object_cast<typename Gt2::X_monotone_curve_2>(&(*obj_iter));
|
x_curve = object_cast<typename Gt2::X_monotone_curve_2>(&(*obj_iter));
|
||||||
|
|
||||||
if (x_curve != NULL) {
|
if (x_curve != nullptr) {
|
||||||
// Inserting an x-monotone curve:
|
// Inserting an x-monotone curve:
|
||||||
// Initialize the zone-computation object with the given curve.
|
// Initialize the zone-computation object with the given curve.
|
||||||
arr_zone.init(*x_curve, pl);
|
arr_zone.init(*x_curve, pl);
|
||||||
|
|
@ -128,7 +128,7 @@ void insert(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
iso_p = object_cast<typename Gt2::Point_2>(&(*obj_iter));
|
iso_p = object_cast<typename Gt2::Point_2>(&(*obj_iter));
|
||||||
CGAL_assertion(iso_p != NULL);
|
CGAL_assertion(iso_p != nullptr);
|
||||||
|
|
||||||
// Inserting a point into the arrangement:
|
// Inserting a point into the arrangement:
|
||||||
insert_point(arr, *iso_p, pl);
|
insert_point(arr, *iso_p, pl);
|
||||||
|
|
@ -680,7 +680,7 @@ insert_non_intersecting_curve
|
||||||
const Arr_parameter_space by1 =
|
const Arr_parameter_space by1 =
|
||||||
geom_traits->parameter_space_in_y_2_object()(c, ARR_MIN_END);
|
geom_traits->parameter_space_in_y_2_object()(c, ARR_MIN_END);
|
||||||
CGAL::Object obj1;
|
CGAL::Object obj1;
|
||||||
const Vertex_const_handle* vh1 = NULL;
|
const Vertex_const_handle* vh1 = nullptr;
|
||||||
|
|
||||||
if ((bx1 == ARR_INTERIOR) && (by1 == ARR_INTERIOR)) {
|
if ((bx1 == ARR_INTERIOR) && (by1 == ARR_INTERIOR)) {
|
||||||
// We have a normal left endpoint with no boundary conditions:
|
// We have a normal left endpoint with no boundary conditions:
|
||||||
|
|
@ -690,7 +690,7 @@ insert_non_intersecting_curve
|
||||||
// The endpoint must not lie on an existing edge, but may coincide with
|
// The endpoint must not lie on an existing edge, but may coincide with
|
||||||
// and existing vertex vh1.
|
// and existing vertex vh1.
|
||||||
CGAL_precondition_msg
|
CGAL_precondition_msg
|
||||||
(object_cast<Halfedge_const_handle>(&obj1) == NULL,
|
(object_cast<Halfedge_const_handle>(&obj1) == nullptr,
|
||||||
"The curve must not intersect an existing edge.");
|
"The curve must not intersect an existing edge.");
|
||||||
|
|
||||||
vh1 = object_cast<Vertex_const_handle>(&obj1);
|
vh1 = object_cast<Vertex_const_handle>(&obj1);
|
||||||
|
|
@ -701,7 +701,7 @@ insert_non_intersecting_curve
|
||||||
obj1 = arr_access.locate_curve_end(c, ARR_MIN_END, bx1, by1);
|
obj1 = arr_access.locate_curve_end(c, ARR_MIN_END, bx1, by1);
|
||||||
|
|
||||||
CGAL_precondition_msg
|
CGAL_precondition_msg
|
||||||
(object_cast<Halfedge_const_handle>(&obj1) == NULL,
|
(object_cast<Halfedge_const_handle>(&obj1) == nullptr,
|
||||||
"The curve must not overlap an existing edge.");
|
"The curve must not overlap an existing edge.");
|
||||||
|
|
||||||
vh1 = object_cast<Vertex_const_handle>(&obj1);
|
vh1 = object_cast<Vertex_const_handle>(&obj1);
|
||||||
|
|
@ -714,7 +714,7 @@ insert_non_intersecting_curve
|
||||||
const Arr_parameter_space by2 =
|
const Arr_parameter_space by2 =
|
||||||
geom_traits->parameter_space_in_y_2_object()(c, ARR_MAX_END);
|
geom_traits->parameter_space_in_y_2_object()(c, ARR_MAX_END);
|
||||||
CGAL::Object obj2;
|
CGAL::Object obj2;
|
||||||
const Vertex_const_handle* vh2 = NULL;
|
const Vertex_const_handle* vh2 = nullptr;
|
||||||
|
|
||||||
if ((bx2 == ARR_INTERIOR) && (by2 == ARR_INTERIOR)) {
|
if ((bx2 == ARR_INTERIOR) && (by2 == ARR_INTERIOR)) {
|
||||||
// We have a normal right endpoint with no boundary conditions:
|
// We have a normal right endpoint with no boundary conditions:
|
||||||
|
|
@ -724,7 +724,7 @@ insert_non_intersecting_curve
|
||||||
// The endpoint must not lie on an existing edge, but may coincide with
|
// The endpoint must not lie on an existing edge, but may coincide with
|
||||||
// and existing vertex vh2.
|
// and existing vertex vh2.
|
||||||
CGAL_precondition_msg
|
CGAL_precondition_msg
|
||||||
(object_cast<Halfedge_const_handle>(&obj2) == NULL,
|
(object_cast<Halfedge_const_handle>(&obj2) == nullptr,
|
||||||
"The curve must not intersect an existing edge.");
|
"The curve must not intersect an existing edge.");
|
||||||
|
|
||||||
vh2 = object_cast<Vertex_const_handle>(&obj2);
|
vh2 = object_cast<Vertex_const_handle>(&obj2);
|
||||||
|
|
@ -739,7 +739,7 @@ insert_non_intersecting_curve
|
||||||
obj2 = arr_access.locate_curve_end(c, ARR_MAX_END, bx2, by2);
|
obj2 = arr_access.locate_curve_end(c, ARR_MAX_END, bx2, by2);
|
||||||
|
|
||||||
CGAL_precondition_msg
|
CGAL_precondition_msg
|
||||||
(object_cast<Halfedge_const_handle>(&obj2) == NULL,
|
(object_cast<Halfedge_const_handle>(&obj2) == nullptr,
|
||||||
"The curve must not overlap an existing edge.");
|
"The curve must not overlap an existing edge.");
|
||||||
|
|
||||||
vh2 = object_cast<Vertex_const_handle>(&obj2);
|
vh2 = object_cast<Vertex_const_handle>(&obj2);
|
||||||
|
|
@ -754,8 +754,8 @@ insert_non_intersecting_curve
|
||||||
// accordingly.
|
// accordingly.
|
||||||
typename Arr::Halfedge_handle new_he;
|
typename Arr::Halfedge_handle new_he;
|
||||||
|
|
||||||
if (vh1 != NULL) {
|
if (vh1 != nullptr) {
|
||||||
if (vh2 != NULL) {
|
if (vh2 != nullptr) {
|
||||||
// Both endpoints are associated with a existing vertices.
|
// Both endpoints are associated with a existing vertices.
|
||||||
// In this case insert_at_vertices() already returns a halfedge
|
// In this case insert_at_vertices() already returns a halfedge
|
||||||
// directed from left to right.
|
// directed from left to right.
|
||||||
|
|
@ -772,7 +772,7 @@ insert_non_intersecting_curve
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (vh2 != NULL) {
|
if (vh2 != nullptr) {
|
||||||
// Only the right endpoint is associated with an existing vertex.
|
// Only the right endpoint is associated with an existing vertex.
|
||||||
// In this case insert_from_left_vertex() returns a halfedge directed
|
// In this case insert_from_left_vertex() returns a halfedge directed
|
||||||
// to the new vertex it creates, so it is directed from right to left
|
// to the new vertex it creates, so it is directed from right to left
|
||||||
|
|
@ -797,10 +797,10 @@ insert_non_intersecting_curve
|
||||||
// << (*fh2)->number_of_outer_ccbs() << std::endl;
|
// << (*fh2)->number_of_outer_ccbs() << std::endl;
|
||||||
|
|
||||||
CGAL_assertion_msg
|
CGAL_assertion_msg
|
||||||
((fh1 != NULL) && (fh2 != NULL) && ((*fh1) == (*fh2)),
|
((fh1 != nullptr) && (fh2 != nullptr) && ((*fh1) == (*fh2)),
|
||||||
"The curve intersects the interior of existing edges.");
|
"The curve intersects the interior of existing edges.");
|
||||||
|
|
||||||
if ((fh1 != NULL) && (fh2 != NULL) && (*fh1 == *fh2)) {
|
if ((fh1 != nullptr) && (fh2 != nullptr) && (*fh1 == *fh2)) {
|
||||||
new_he = arr.insert_in_face_interior(c, arr.non_const_handle (*fh1));
|
new_he = arr.insert_in_face_interior(c, arr.non_const_handle (*fh1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1164,13 +1164,13 @@ insert_point(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
|
||||||
|
|
||||||
arr_access.notify_before_global_change();
|
arr_access.notify_before_global_change();
|
||||||
|
|
||||||
if ((fh = object_cast<typename Arr::Face_const_handle>(&obj)) != NULL) {
|
if ((fh = object_cast<typename Arr::Face_const_handle>(&obj)) != nullptr) {
|
||||||
// p lies inside a face: Insert it as an isolated vertex it the interior of
|
// p lies inside a face: Insert it as an isolated vertex it the interior of
|
||||||
// this face.
|
// this face.
|
||||||
vh_for_p = arr.insert_in_face_interior(p, arr.non_const_handle (*fh));
|
vh_for_p = arr.insert_in_face_interior(p, arr.non_const_handle (*fh));
|
||||||
}
|
}
|
||||||
else if ((hh = object_cast<typename Arr::Halfedge_const_handle>(&obj)) !=
|
else if ((hh = object_cast<typename Arr::Halfedge_const_handle>(&obj)) !=
|
||||||
NULL)
|
nullptr)
|
||||||
{
|
{
|
||||||
// p lies in the interior of an edge: Split this edge to create a new
|
// p lies in the interior of an edge: Split this edge to create a new
|
||||||
// vertex associated with p.
|
// vertex associated with p.
|
||||||
|
|
@ -1189,7 +1189,7 @@ insert_point(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
|
||||||
// In this case p lies on an existing vertex, so we just update this
|
// In this case p lies on an existing vertex, so we just update this
|
||||||
// vertex.
|
// vertex.
|
||||||
vh = object_cast<typename Arr::Vertex_const_handle>(&obj);
|
vh = object_cast<typename Arr::Vertex_const_handle>(&obj);
|
||||||
CGAL_assertion (vh != NULL);
|
CGAL_assertion (vh != nullptr);
|
||||||
|
|
||||||
vh_for_p = arr.modify_vertex (arr.non_const_handle (*vh), p);
|
vh_for_p = arr.modify_vertex (arr.non_const_handle (*vh), p);
|
||||||
}
|
}
|
||||||
|
|
@ -1634,20 +1634,20 @@ do_intersect(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
|
||||||
for (obj_iter = x_objects.begin(); obj_iter != x_objects.end(); ++obj_iter) {
|
for (obj_iter = x_objects.begin(); obj_iter != x_objects.end(); ++obj_iter) {
|
||||||
// Act according to the type of the current object.
|
// Act according to the type of the current object.
|
||||||
x_curve = object_cast<typename Gt2::X_monotone_curve_2>(&(*obj_iter));
|
x_curve = object_cast<typename Gt2::X_monotone_curve_2>(&(*obj_iter));
|
||||||
if (x_curve != NULL) {
|
if (x_curve != nullptr) {
|
||||||
// Check if the x-monotone subcurve intersects the arrangement.
|
// Check if the x-monotone subcurve intersects the arrangement.
|
||||||
if (do_intersect(arr, *x_curve, pl) == true)
|
if (do_intersect(arr, *x_curve, pl) == true)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
iso_p = object_cast<typename Gt2::Point_2>(&(*obj_iter));
|
iso_p = object_cast<typename Gt2::Point_2>(&(*obj_iter));
|
||||||
CGAL_assertion(iso_p != NULL);
|
CGAL_assertion(iso_p != nullptr);
|
||||||
|
|
||||||
// Check whether the isolated point lies inside a face (otherwise,
|
// Check whether the isolated point lies inside a face (otherwise,
|
||||||
// it conincides with a vertex or an edge).
|
// it conincides with a vertex or an edge).
|
||||||
CGAL::Object obj = pl.locate (*iso_p);
|
CGAL::Object obj = pl.locate (*iso_p);
|
||||||
|
|
||||||
return (object_cast<typename Arr::Face_const_handle>(&obj) != NULL);
|
return (object_cast<typename Arr::Face_const_handle>(&obj) != nullptr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ Arrangement_on_surface_2<GeomTraits, TopTraits>::Arrangement_on_surface_2() :
|
||||||
template <typename GeomTraits, typename TopTraits>
|
template <typename GeomTraits, typename TopTraits>
|
||||||
Arrangement_on_surface_2<GeomTraits, TopTraits>::
|
Arrangement_on_surface_2<GeomTraits, TopTraits>::
|
||||||
Arrangement_on_surface_2(const Self& arr) :
|
Arrangement_on_surface_2(const Self& arr) :
|
||||||
m_geom_traits(NULL),
|
m_geom_traits(nullptr),
|
||||||
m_own_traits(false)
|
m_own_traits(false)
|
||||||
{
|
{
|
||||||
assign(arr);
|
assign(arr);
|
||||||
|
|
@ -206,9 +206,9 @@ void Arrangement_on_surface_2<GeomTraits, TopTraits>::assign(const Self& arr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Take care of the traits object.
|
// Take care of the traits object.
|
||||||
if (m_own_traits && (m_geom_traits != NULL)) {
|
if (m_own_traits && (m_geom_traits != nullptr)) {
|
||||||
delete m_geom_traits;
|
delete m_geom_traits;
|
||||||
m_geom_traits = NULL;
|
m_geom_traits = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_geom_traits = (arr.m_own_traits) ? new Traits_adaptor_2 : arr.m_geom_traits;
|
m_geom_traits = (arr.m_own_traits) ? new Traits_adaptor_2 : arr.m_geom_traits;
|
||||||
|
|
@ -237,9 +237,9 @@ Arrangement_on_surface_2<GeomTraits, TopTraits>::~Arrangement_on_surface_2()
|
||||||
_delete_curve(eit->curve());
|
_delete_curve(eit->curve());
|
||||||
|
|
||||||
// Free the traits object, if necessary.
|
// Free the traits object, if necessary.
|
||||||
if (m_own_traits && (m_geom_traits != NULL)) {
|
if (m_own_traits && (m_geom_traits != nullptr)) {
|
||||||
delete m_geom_traits;
|
delete m_geom_traits;
|
||||||
m_geom_traits = NULL;
|
m_geom_traits = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detach all observers still attached to the arrangement.
|
// Detach all observers still attached to the arrangement.
|
||||||
|
|
@ -333,7 +333,7 @@ insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f)
|
||||||
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
|
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
|
||||||
const Arr_parameter_space ps_y1 =
|
const Arr_parameter_space ps_y1 =
|
||||||
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
|
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
|
||||||
DHalfedge* fict_prev1 = NULL;
|
DHalfedge* fict_prev1 = nullptr;
|
||||||
|
|
||||||
DVertex* v1 = ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR)) ?
|
DVertex* v1 = ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR)) ?
|
||||||
// The curve has a valid left endpoint: Create a new vertex associated
|
// The curve has a valid left endpoint: Create a new vertex associated
|
||||||
|
|
@ -349,7 +349,7 @@ insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f)
|
||||||
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
|
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
|
||||||
const Arr_parameter_space ps_y2 =
|
const Arr_parameter_space ps_y2 =
|
||||||
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
|
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
|
||||||
DHalfedge* fict_prev2 = NULL;
|
DHalfedge* fict_prev2 = nullptr;
|
||||||
|
|
||||||
DVertex* v2 = ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) ?
|
DVertex* v2 = ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) ?
|
||||||
// The curve has a valid right endpoint: Create a new vertex associated
|
// The curve has a valid right endpoint: Create a new vertex associated
|
||||||
|
|
@ -363,15 +363,15 @@ insert_in_face_interior(const X_monotone_curve_2& cv, Face_handle f)
|
||||||
// lexicographically smaller than v2).
|
// lexicographically smaller than v2).
|
||||||
DHalfedge* new_he;
|
DHalfedge* new_he;
|
||||||
|
|
||||||
if ((fict_prev1 == NULL) && (fict_prev2 == NULL))
|
if ((fict_prev1 == nullptr) && (fict_prev2 == nullptr))
|
||||||
// Both vertices represent valid points.
|
// Both vertices represent valid points.
|
||||||
new_he = _insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2);
|
new_he = _insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2);
|
||||||
else if ((fict_prev1 == NULL) && (fict_prev2 != NULL)) {
|
else if ((fict_prev1 == nullptr) && (fict_prev2 != nullptr)) {
|
||||||
// v1 represents a valid point and v2 is inserted using its predecessor.
|
// v1 represents a valid point and v2 is inserted using its predecessor.
|
||||||
new_he = _insert_from_vertex(fict_prev2, cv, ARR_RIGHT_TO_LEFT, v1);
|
new_he = _insert_from_vertex(fict_prev2, cv, ARR_RIGHT_TO_LEFT, v1);
|
||||||
new_he = new_he->opposite();
|
new_he = new_he->opposite();
|
||||||
}
|
}
|
||||||
else if ((fict_prev1 != NULL) && (fict_prev2 == NULL))
|
else if ((fict_prev1 != nullptr) && (fict_prev2 == nullptr))
|
||||||
// v1 is inserted using its predecessor and v2 represents a valid point.
|
// v1 is inserted using its predecessor and v2 represents a valid point.
|
||||||
new_he = _insert_from_vertex(fict_prev1, cv, ARR_LEFT_TO_RIGHT, v2);
|
new_he = _insert_from_vertex(fict_prev1, cv, ARR_LEFT_TO_RIGHT, v2);
|
||||||
else {
|
else {
|
||||||
|
|
@ -455,8 +455,8 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
|
||||||
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
|
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
|
||||||
const Arr_parameter_space ps_y2 =
|
const Arr_parameter_space ps_y2 =
|
||||||
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
|
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
|
||||||
DVertex* v2 = NULL;
|
DVertex* v2 = nullptr;
|
||||||
DHalfedge* fict_prev2 = NULL;
|
DHalfedge* fict_prev2 = nullptr;
|
||||||
|
|
||||||
if ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR))
|
if ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR))
|
||||||
// The curve has a valid right endpoint: Create a new vertex associated
|
// The curve has a valid right endpoint: Create a new vertex associated
|
||||||
|
|
@ -469,8 +469,8 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
|
||||||
// The given vertex is an isolated one: We should in fact insert the curve
|
// The given vertex is an isolated one: We should in fact insert the curve
|
||||||
// in the interior of the face containing this vertex.
|
// in the interior of the face containing this vertex.
|
||||||
DVertex* v1 = _vertex(v);
|
DVertex* v1 = _vertex(v);
|
||||||
DIso_vertex* iv = NULL;
|
DIso_vertex* iv = nullptr;
|
||||||
DFace* p_f = NULL;
|
DFace* p_f = nullptr;
|
||||||
|
|
||||||
if (v->is_isolated()) {
|
if (v->is_isolated()) {
|
||||||
// Obtain the face from the isolated vertex.
|
// Obtain the face from the isolated vertex.
|
||||||
|
|
@ -485,13 +485,13 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
|
||||||
|
|
||||||
// If the vertex that corresponds to cv's right end has boundary
|
// If the vertex that corresponds to cv's right end has boundary
|
||||||
// conditions, create it now.
|
// conditions, create it now.
|
||||||
if (v2 == NULL)
|
if (v2 == nullptr)
|
||||||
// Locate the DCEL features that will be used for inserting the curve's
|
// Locate the DCEL features that will be used for inserting the curve's
|
||||||
// right end.
|
// right end.
|
||||||
v2 = _place_and_set_curve_end(p_f, cv, ARR_MAX_END, ps_x2, ps_y2,
|
v2 = _place_and_set_curve_end(p_f, cv, ARR_MAX_END, ps_x2, ps_y2,
|
||||||
&fict_prev2);
|
&fict_prev2);
|
||||||
|
|
||||||
if (iv != NULL) {
|
if (iv != nullptr) {
|
||||||
// Remove the isolated vertex v1, as it will not be isolated any more.
|
// Remove the isolated vertex v1, as it will not be isolated any more.
|
||||||
p_f->erase_isolated_vertex(iv);
|
p_f->erase_isolated_vertex(iv);
|
||||||
_dcel().delete_isolated_vertex(iv);
|
_dcel().delete_isolated_vertex(iv);
|
||||||
|
|
@ -500,7 +500,7 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
|
||||||
// Create the edge connecting the two vertices (note that we know that
|
// Create the edge connecting the two vertices (note that we know that
|
||||||
// v1 is smaller than v2).
|
// v1 is smaller than v2).
|
||||||
DHalfedge* new_he;
|
DHalfedge* new_he;
|
||||||
if (fict_prev2 == NULL)
|
if (fict_prev2 == nullptr)
|
||||||
new_he = _insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2);
|
new_he = _insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2);
|
||||||
else {
|
else {
|
||||||
new_he = _insert_from_vertex(fict_prev2, cv, ARR_RIGHT_TO_LEFT, v1);
|
new_he = _insert_from_vertex(fict_prev2, cv, ARR_RIGHT_TO_LEFT, v1);
|
||||||
|
|
@ -516,7 +516,7 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
|
||||||
// which the new curve should be inserted.
|
// which the new curve should be inserted.
|
||||||
DHalfedge* prev1 = _locate_around_vertex(_vertex(v), cv, ARR_MIN_END);
|
DHalfedge* prev1 = _locate_around_vertex(_vertex(v), cv, ARR_MIN_END);
|
||||||
CGAL_assertion_msg
|
CGAL_assertion_msg
|
||||||
(prev1 != NULL,
|
(prev1 != nullptr,
|
||||||
"The inserted curve cannot be located in the arrangement.");
|
"The inserted curve cannot be located in the arrangement.");
|
||||||
|
|
||||||
DFace* f1 = prev1->is_on_inner_ccb() ? prev1->inner_ccb()->face() :
|
DFace* f1 = prev1->is_on_inner_ccb() ? prev1->inner_ccb()->face() :
|
||||||
|
|
@ -524,7 +524,7 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
|
||||||
|
|
||||||
// If the vertex that corresponds to cv's right end has boundary conditions,
|
// If the vertex that corresponds to cv's right end has boundary conditions,
|
||||||
// create it now.
|
// create it now.
|
||||||
if (v2 == NULL)
|
if (v2 == nullptr)
|
||||||
// Locate the DCEL features that will be used for inserting the curve's
|
// Locate the DCEL features that will be used for inserting the curve's
|
||||||
// right end.
|
// right end.
|
||||||
v2 =
|
v2 =
|
||||||
|
|
@ -534,7 +534,7 @@ insert_from_left_vertex(const X_monotone_curve_2& cv,
|
||||||
// than v2).
|
// than v2).
|
||||||
DHalfedge* new_he;
|
DHalfedge* new_he;
|
||||||
|
|
||||||
if (fict_prev2 == NULL)
|
if (fict_prev2 == nullptr)
|
||||||
// Insert the halfedge given the predecessor halfedge of v1.
|
// Insert the halfedge given the predecessor halfedge of v1.
|
||||||
new_he = _insert_from_vertex(prev1, cv, ARR_LEFT_TO_RIGHT, v2);
|
new_he = _insert_from_vertex(prev1, cv, ARR_LEFT_TO_RIGHT, v2);
|
||||||
else {
|
else {
|
||||||
|
|
@ -617,7 +617,7 @@ insert_from_left_vertex(const X_monotone_curve_2& cv, Halfedge_handle prev)
|
||||||
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
|
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MAX_END);
|
||||||
const Arr_parameter_space ps_y2 =
|
const Arr_parameter_space ps_y2 =
|
||||||
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
|
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MAX_END);
|
||||||
DHalfedge* fict_prev2 = NULL;
|
DHalfedge* fict_prev2 = nullptr;
|
||||||
|
|
||||||
DVertex* v2 = ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) ?
|
DVertex* v2 = ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) ?
|
||||||
// The curve has a valid right endpoint: Create a new vertex associated
|
// The curve has a valid right endpoint: Create a new vertex associated
|
||||||
|
|
@ -631,7 +631,7 @@ insert_from_left_vertex(const X_monotone_curve_2& cv, Halfedge_handle prev)
|
||||||
// than v2).
|
// than v2).
|
||||||
DHalfedge* new_he;
|
DHalfedge* new_he;
|
||||||
|
|
||||||
if (fict_prev2 == NULL)
|
if (fict_prev2 == nullptr)
|
||||||
// Insert the halfedge given the predecessor halfedge of the left vertex.
|
// Insert the halfedge given the predecessor halfedge of the left vertex.
|
||||||
new_he = _insert_from_vertex(prev1, cv, ARR_LEFT_TO_RIGHT, v2);
|
new_he = _insert_from_vertex(prev1, cv, ARR_LEFT_TO_RIGHT, v2);
|
||||||
else {
|
else {
|
||||||
|
|
@ -693,8 +693,8 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
|
||||||
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
|
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
|
||||||
const Arr_parameter_space ps_y1 =
|
const Arr_parameter_space ps_y1 =
|
||||||
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
|
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
|
||||||
DVertex* v1 = NULL;
|
DVertex* v1 = nullptr;
|
||||||
DHalfedge* fict_prev1 = NULL;
|
DHalfedge* fict_prev1 = nullptr;
|
||||||
|
|
||||||
if ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR))
|
if ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR))
|
||||||
// The curve has a valid left endpoint: Create a new vertex associated
|
// The curve has a valid left endpoint: Create a new vertex associated
|
||||||
|
|
@ -707,8 +707,8 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
|
||||||
// The given vertex is an isolated one: We should in fact insert the curve
|
// The given vertex is an isolated one: We should in fact insert the curve
|
||||||
// in the interior of the face containing this vertex.
|
// in the interior of the face containing this vertex.
|
||||||
DVertex* v2 = _vertex(v);
|
DVertex* v2 = _vertex(v);
|
||||||
DIso_vertex* iv = NULL;
|
DIso_vertex* iv = nullptr;
|
||||||
DFace* p_f = NULL;
|
DFace* p_f = nullptr;
|
||||||
|
|
||||||
if (v->is_isolated()) {
|
if (v->is_isolated()) {
|
||||||
// Obtain the face from the isolated vertex.
|
// Obtain the face from the isolated vertex.
|
||||||
|
|
@ -723,13 +723,13 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
|
||||||
|
|
||||||
// If the vertex that corresponds to cv's left end has boundary
|
// If the vertex that corresponds to cv's left end has boundary
|
||||||
// conditions, create it now.
|
// conditions, create it now.
|
||||||
if (v1 == NULL)
|
if (v1 == nullptr)
|
||||||
// Locate the DCEL features that will be used for inserting the curve's
|
// Locate the DCEL features that will be used for inserting the curve's
|
||||||
// left end.
|
// left end.
|
||||||
v1 = _place_and_set_curve_end(p_f, cv, ARR_MIN_END, ps_x1, ps_y1,
|
v1 = _place_and_set_curve_end(p_f, cv, ARR_MIN_END, ps_x1, ps_y1,
|
||||||
&fict_prev1);
|
&fict_prev1);
|
||||||
|
|
||||||
if (iv != NULL) {
|
if (iv != nullptr) {
|
||||||
// Remove the isolated vertex v2, as it will not be isolated any more.
|
// Remove the isolated vertex v2, as it will not be isolated any more.
|
||||||
p_f->erase_isolated_vertex(iv);
|
p_f->erase_isolated_vertex(iv);
|
||||||
_dcel().delete_isolated_vertex(iv);
|
_dcel().delete_isolated_vertex(iv);
|
||||||
|
|
@ -737,7 +737,7 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
|
||||||
|
|
||||||
// Create the edge connecting the two vertices (note that we know that
|
// Create the edge connecting the two vertices (note that we know that
|
||||||
// v1 is smaller than v2).
|
// v1 is smaller than v2).
|
||||||
DHalfedge* new_he = (fict_prev1 == NULL) ?
|
DHalfedge* new_he = (fict_prev1 == nullptr) ?
|
||||||
_insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2) :
|
_insert_in_face_interior(p_f, cv, ARR_LEFT_TO_RIGHT, v1, v2) :
|
||||||
_insert_from_vertex(fict_prev1, cv, ARR_LEFT_TO_RIGHT, v2);
|
_insert_from_vertex(fict_prev1, cv, ARR_LEFT_TO_RIGHT, v2);
|
||||||
|
|
||||||
|
|
@ -750,14 +750,14 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
|
||||||
// which the new curve should be inserted.
|
// which the new curve should be inserted.
|
||||||
DHalfedge* prev2 = _locate_around_vertex(_vertex(v), cv, ARR_MAX_END);
|
DHalfedge* prev2 = _locate_around_vertex(_vertex(v), cv, ARR_MAX_END);
|
||||||
CGAL_assertion_msg
|
CGAL_assertion_msg
|
||||||
(prev2 != NULL, "The inserted curve cannot be located in the arrangement.");
|
(prev2 != nullptr, "The inserted curve cannot be located in the arrangement.");
|
||||||
|
|
||||||
DFace* f2 = prev2->is_on_inner_ccb() ? prev2->inner_ccb()->face() :
|
DFace* f2 = prev2->is_on_inner_ccb() ? prev2->inner_ccb()->face() :
|
||||||
prev2->outer_ccb()->face();
|
prev2->outer_ccb()->face();
|
||||||
|
|
||||||
// If the vertex that corresponds to cv's left end has boundary conditions,
|
// If the vertex that corresponds to cv's left end has boundary conditions,
|
||||||
// create it now.
|
// create it now.
|
||||||
if (v1 == NULL)
|
if (v1 == nullptr)
|
||||||
// Locate the DCEL features that will be used for inserting the curve's
|
// Locate the DCEL features that will be used for inserting the curve's
|
||||||
// left end.
|
// left end.
|
||||||
v1 =
|
v1 =
|
||||||
|
|
@ -767,7 +767,7 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
|
||||||
// than v1).
|
// than v1).
|
||||||
DHalfedge* new_he;
|
DHalfedge* new_he;
|
||||||
|
|
||||||
if (fict_prev1 == NULL)
|
if (fict_prev1 == nullptr)
|
||||||
// Insert the halfedge given the predecessor halfedge of v2.
|
// Insert the halfedge given the predecessor halfedge of v2.
|
||||||
new_he = _insert_from_vertex(prev2, cv, ARR_RIGHT_TO_LEFT, v1);
|
new_he = _insert_from_vertex(prev2, cv, ARR_RIGHT_TO_LEFT, v1);
|
||||||
else {
|
else {
|
||||||
|
|
@ -852,7 +852,7 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
|
||||||
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
|
m_geom_traits->parameter_space_in_x_2_object()(cv, ARR_MIN_END);
|
||||||
const Arr_parameter_space ps_y1 =
|
const Arr_parameter_space ps_y1 =
|
||||||
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
|
m_geom_traits->parameter_space_in_y_2_object()(cv, ARR_MIN_END);
|
||||||
DHalfedge* fict_prev1 = NULL;
|
DHalfedge* fict_prev1 = nullptr;
|
||||||
|
|
||||||
DVertex* v1 = ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR)) ?
|
DVertex* v1 = ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR)) ?
|
||||||
// The curve has a valid left endpoint: Create a new vertex associated
|
// The curve has a valid left endpoint: Create a new vertex associated
|
||||||
|
|
@ -866,7 +866,7 @@ insert_from_right_vertex(const X_monotone_curve_2& cv,
|
||||||
// than v1).
|
// than v1).
|
||||||
DHalfedge* new_he;
|
DHalfedge* new_he;
|
||||||
|
|
||||||
if (fict_prev1 == NULL)
|
if (fict_prev1 == nullptr)
|
||||||
// Insert the halfedge given the predecessor halfedge of the right vertex.
|
// Insert the halfedge given the predecessor halfedge of the right vertex.
|
||||||
new_he = _insert_from_vertex(prev2, cv, ARR_RIGHT_TO_LEFT, v1);
|
new_he = _insert_from_vertex(prev2, cv, ARR_RIGHT_TO_LEFT, v1);
|
||||||
else {
|
else {
|
||||||
|
|
@ -1023,8 +1023,8 @@ insert_at_vertices(const X_monotone_curve_2& cv,
|
||||||
if (v1->degree() == 0) {
|
if (v1->degree() == 0) {
|
||||||
// Get the face containing the isolated vertex v1.
|
// Get the face containing the isolated vertex v1.
|
||||||
DVertex* p_v1 = _vertex(v1);
|
DVertex* p_v1 = _vertex(v1);
|
||||||
DIso_vertex* iv1 = NULL;
|
DIso_vertex* iv1 = nullptr;
|
||||||
DFace* f1 = NULL;
|
DFace* f1 = nullptr;
|
||||||
|
|
||||||
if (p_v1->is_isolated()) {
|
if (p_v1->is_isolated()) {
|
||||||
// Obtain the containing face from the isolated vertex record.
|
// Obtain the containing face from the isolated vertex record.
|
||||||
|
|
@ -1041,8 +1041,8 @@ insert_at_vertices(const X_monotone_curve_2& cv,
|
||||||
// Both end-vertices are isolated. Make sure they are contained inside
|
// Both end-vertices are isolated. Make sure they are contained inside
|
||||||
// the same face.
|
// the same face.
|
||||||
DVertex* p_v2 = _vertex(v2);
|
DVertex* p_v2 = _vertex(v2);
|
||||||
DIso_vertex* iv2 = NULL;
|
DIso_vertex* iv2 = nullptr;
|
||||||
DFace* f2 = NULL;
|
DFace* f2 = nullptr;
|
||||||
|
|
||||||
if (p_v2->is_isolated()) {
|
if (p_v2->is_isolated()) {
|
||||||
// Obtain the containing face from the isolated vertex record.
|
// Obtain the containing face from the isolated vertex record.
|
||||||
|
|
@ -1050,14 +1050,14 @@ insert_at_vertices(const X_monotone_curve_2& cv,
|
||||||
f2 = iv2->face();
|
f2 = iv2->face();
|
||||||
|
|
||||||
CGAL_assertion_msg
|
CGAL_assertion_msg
|
||||||
((f1 == NULL) || (f1 == f2),
|
((f1 == nullptr) || (f1 == f2),
|
||||||
"The two isolated vertices must be located inside the same face.");
|
"The two isolated vertices must be located inside the same face.");
|
||||||
|
|
||||||
// Remove the isolated vertex v2, as it will not be isolated any more.
|
// Remove the isolated vertex v2, as it will not be isolated any more.
|
||||||
f2->erase_isolated_vertex(iv2);
|
f2->erase_isolated_vertex(iv2);
|
||||||
_dcel().delete_isolated_vertex(iv2);
|
_dcel().delete_isolated_vertex(iv2);
|
||||||
}
|
}
|
||||||
else if (f1 == NULL)
|
else if (f1 == nullptr)
|
||||||
// In this case the containing face must be given by the user.
|
// In this case the containing face must be given by the user.
|
||||||
CGAL_precondition(f != Face_handle());
|
CGAL_precondition(f != Face_handle());
|
||||||
|
|
||||||
|
|
@ -1073,7 +1073,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
|
||||||
// which the new curve should be inserted.
|
// which the new curve should be inserted.
|
||||||
DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
|
DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
|
||||||
CGAL_assertion_msg
|
CGAL_assertion_msg
|
||||||
(prev2 != NULL,
|
(prev2 != nullptr,
|
||||||
"The inserted curve cannot be located in the arrangement.");
|
"The inserted curve cannot be located in the arrangement.");
|
||||||
|
|
||||||
CGAL_assertion_code
|
CGAL_assertion_code
|
||||||
|
|
@ -1081,7 +1081,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
|
||||||
prev2->outer_ccb()->face());
|
prev2->outer_ccb()->face());
|
||||||
|
|
||||||
CGAL_assertion_msg
|
CGAL_assertion_msg
|
||||||
((f1 == NULL) || (f1 == f2),
|
((f1 == nullptr) || (f1 == f2),
|
||||||
"The inserted curve should not intersect the existing arrangement.");
|
"The inserted curve should not intersect the existing arrangement.");
|
||||||
|
|
||||||
// Perform the insertion. Note that the returned halfedge is directed
|
// Perform the insertion. Note that the returned halfedge is directed
|
||||||
|
|
@ -1095,8 +1095,8 @@ insert_at_vertices(const X_monotone_curve_2& cv,
|
||||||
else if (v2->degree() == 0) {
|
else if (v2->degree() == 0) {
|
||||||
// Get the face containing the isolated vertex v2.
|
// Get the face containing the isolated vertex v2.
|
||||||
DVertex* p_v2 = _vertex(v2);
|
DVertex* p_v2 = _vertex(v2);
|
||||||
DIso_vertex* iv2 = NULL;
|
DIso_vertex* iv2 = nullptr;
|
||||||
DFace* f2 = NULL;
|
DFace* f2 = nullptr;
|
||||||
|
|
||||||
if (v2->is_isolated()) {
|
if (v2->is_isolated()) {
|
||||||
// Obtain the containing face from the isolated vertex record.
|
// Obtain the containing face from the isolated vertex record.
|
||||||
|
|
@ -1112,7 +1112,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
|
||||||
// which the new curve should be inserted.
|
// which the new curve should be inserted.
|
||||||
DHalfedge* prev1 = _locate_around_vertex(_vertex(v1), cv, ind1);
|
DHalfedge* prev1 = _locate_around_vertex(_vertex(v1), cv, ind1);
|
||||||
CGAL_assertion_msg
|
CGAL_assertion_msg
|
||||||
(prev1 != NULL,
|
(prev1 != nullptr,
|
||||||
"The inserted curve cannot be located in the arrangement.");
|
"The inserted curve cannot be located in the arrangement.");
|
||||||
|
|
||||||
CGAL_assertion_code
|
CGAL_assertion_code
|
||||||
|
|
@ -1120,7 +1120,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
|
||||||
prev1->outer_ccb()->face());
|
prev1->outer_ccb()->face());
|
||||||
|
|
||||||
CGAL_assertion_msg
|
CGAL_assertion_msg
|
||||||
((f2 == NULL) || (f2 == f1),
|
((f2 == nullptr) || (f2 == f1),
|
||||||
"The inserted curve should not intersect the existing arrangement.");
|
"The inserted curve should not intersect the existing arrangement.");
|
||||||
|
|
||||||
// Perform the insertion.
|
// Perform the insertion.
|
||||||
|
|
@ -1137,7 +1137,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
|
||||||
DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
|
DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
|
||||||
|
|
||||||
CGAL_assertion_msg
|
CGAL_assertion_msg
|
||||||
(((prev1 != NULL) && (prev2 != NULL)),
|
(((prev1 != nullptr) && (prev2 != nullptr)),
|
||||||
"The inserted curve cannot be located in the arrangement.");
|
"The inserted curve cannot be located in the arrangement.");
|
||||||
|
|
||||||
// Perform the insertion.
|
// Perform the insertion.
|
||||||
|
|
@ -1259,8 +1259,8 @@ insert_at_vertices(const X_monotone_curve_2& cv,
|
||||||
if (v2->degree() == 0) {
|
if (v2->degree() == 0) {
|
||||||
// Get the face containing the isolated vertex v2.
|
// Get the face containing the isolated vertex v2.
|
||||||
DVertex* p_v2 = _vertex(v2);
|
DVertex* p_v2 = _vertex(v2);
|
||||||
DIso_vertex* iv2 = NULL;
|
DIso_vertex* iv2 = nullptr;
|
||||||
DFace* f2 = NULL;
|
DFace* f2 = nullptr;
|
||||||
|
|
||||||
if (v2->is_isolated()) {
|
if (v2->is_isolated()) {
|
||||||
iv2 = p_v2->isolated_vertex();
|
iv2 = p_v2->isolated_vertex();
|
||||||
|
|
@ -1287,7 +1287,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
|
||||||
// which the new curve should be inserted.
|
// which the new curve should be inserted.
|
||||||
DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
|
DHalfedge* prev2 = _locate_around_vertex(_vertex(v2), cv, ind2);
|
||||||
CGAL_assertion_msg
|
CGAL_assertion_msg
|
||||||
(prev2 != NULL, "The inserted curve cannot be located in the arrangement.");
|
(prev2 != nullptr, "The inserted curve cannot be located in the arrangement.");
|
||||||
|
|
||||||
// Perform the insertion.
|
// Perform the insertion.
|
||||||
return (insert_at_vertices(cv, prev1, Halfedge_handle(prev2)));
|
return (insert_at_vertices(cv, prev1, Halfedge_handle(prev2)));
|
||||||
|
|
@ -1652,10 +1652,10 @@ merge_edge(Halfedge_handle e1, Halfedge_handle e2,
|
||||||
//
|
//
|
||||||
DHalfedge* _e1 = _halfedge(e1);
|
DHalfedge* _e1 = _halfedge(e1);
|
||||||
DHalfedge* _e2 = _halfedge(e2);
|
DHalfedge* _e2 = _halfedge(e2);
|
||||||
DHalfedge* he1 = NULL;
|
DHalfedge* he1 = nullptr;
|
||||||
DHalfedge* he2 = NULL;
|
DHalfedge* he2 = nullptr;
|
||||||
DHalfedge* he3 = NULL;
|
DHalfedge* he3 = nullptr;
|
||||||
DHalfedge* he4 = NULL;
|
DHalfedge* he4 = nullptr;
|
||||||
|
|
||||||
if (_e1->vertex() == _e2->opposite()->vertex()) {
|
if (_e1->vertex() == _e2->opposite()->vertex()) {
|
||||||
he1 = _e1;
|
he1 = _e1;
|
||||||
|
|
@ -1709,11 +1709,11 @@ merge_edge(Halfedge_handle e1, Halfedge_handle e2,
|
||||||
|
|
||||||
// Keep pointers to the components that contain two halfedges he3 and he2,
|
// Keep pointers to the components that contain two halfedges he3 and he2,
|
||||||
// pointing at the end vertices of the merged halfedge.
|
// pointing at the end vertices of the merged halfedge.
|
||||||
DInner_ccb* ic1 = (he3->is_on_inner_ccb()) ? he3->inner_ccb() : NULL;
|
DInner_ccb* ic1 = (he3->is_on_inner_ccb()) ? he3->inner_ccb() : nullptr;
|
||||||
DOuter_ccb* oc1 = (ic1 == NULL) ? he3->outer_ccb() : NULL;
|
DOuter_ccb* oc1 = (ic1 == nullptr) ? he3->outer_ccb() : nullptr;
|
||||||
|
|
||||||
DInner_ccb* ic2 = (he4->is_on_inner_ccb()) ? he4->inner_ccb() : NULL;
|
DInner_ccb* ic2 = (he4->is_on_inner_ccb()) ? he4->inner_ccb() : nullptr;
|
||||||
DOuter_ccb* oc2 = (ic2 == NULL) ? he4->outer_ccb() : NULL;
|
DOuter_ccb* oc2 = (ic2 == nullptr) ? he4->outer_ccb() : nullptr;
|
||||||
|
|
||||||
// Notify the observers that we are about to merge an edge.
|
// Notify the observers that we are about to merge an edge.
|
||||||
_notify_before_merge_edge(e1, e2, cv);
|
_notify_before_merge_edge(e1, e2, cv);
|
||||||
|
|
@ -1723,14 +1723,14 @@ merge_edge(Halfedge_handle e1, Halfedge_handle e2,
|
||||||
// the CCBs they belong to. If so, replace he3 by he1 and he4 by he2. Note
|
// the CCBs they belong to. If so, replace he3 by he1 and he4 by he2. Note
|
||||||
// that as we just change the component representatives, we do not have to
|
// that as we just change the component representatives, we do not have to
|
||||||
// notify the observers on the change.
|
// notify the observers on the change.
|
||||||
if (oc1 != NULL && oc1->halfedge() == he3)
|
if (oc1 != nullptr && oc1->halfedge() == he3)
|
||||||
oc1->set_halfedge(he1);
|
oc1->set_halfedge(he1);
|
||||||
else if (ic1 != NULL && ic1->halfedge() == he3)
|
else if (ic1 != nullptr && ic1->halfedge() == he3)
|
||||||
ic1->set_halfedge(he1);
|
ic1->set_halfedge(he1);
|
||||||
|
|
||||||
if (oc2 != NULL && oc2->halfedge() == he4)
|
if (oc2 != nullptr && oc2->halfedge() == he4)
|
||||||
oc2->set_halfedge(he2);
|
oc2->set_halfedge(he2);
|
||||||
else if (ic2 != NULL && ic2->halfedge() == he4)
|
else if (ic2 != nullptr && ic2->halfedge() == he4)
|
||||||
ic2->set_halfedge(he2);
|
ic2->set_halfedge(he2);
|
||||||
|
|
||||||
// If he3 is the incident halfedge to its target, replace it by he1.
|
// If he3 is the incident halfedge to its target, replace it by he1.
|
||||||
|
|
@ -1832,7 +1832,7 @@ _locate_around_vertex(DVertex* v,
|
||||||
DHalfedge* first = v->halfedge();
|
DHalfedge* first = v->halfedge();
|
||||||
DHalfedge* curr = first;
|
DHalfedge* curr = first;
|
||||||
|
|
||||||
if (curr == NULL) return NULL;
|
if (curr == nullptr) return nullptr;
|
||||||
|
|
||||||
DHalfedge* next = curr->next()->opposite();
|
DHalfedge* next = curr->next()->opposite();
|
||||||
|
|
||||||
|
|
@ -1854,7 +1854,7 @@ _locate_around_vertex(DVertex* v,
|
||||||
{
|
{
|
||||||
// If cv equals one of the curves associated with the halfedges, it is
|
// If cv equals one of the curves associated with the halfedges, it is
|
||||||
// an illegal input curve, as it already exists in the arrangement.
|
// an illegal input curve, as it already exists in the arrangement.
|
||||||
if (eq_curr || eq_next) return NULL;
|
if (eq_curr || eq_next) return nullptr;
|
||||||
|
|
||||||
// Move to the next pair of incident halfedges.
|
// Move to the next pair of incident halfedges.
|
||||||
curr = next;
|
curr = next;
|
||||||
|
|
@ -1862,7 +1862,7 @@ _locate_around_vertex(DVertex* v,
|
||||||
|
|
||||||
// If we completed a full traversal around v without locating the
|
// If we completed a full traversal around v without locating the
|
||||||
// place for cv, it follows that cv overlaps and existing curve.
|
// place for cv, it follows that cv overlaps and existing curve.
|
||||||
if (curr == first) return NULL;
|
if (curr == first) return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the halfedge we have located.
|
// Return the halfedge we have located.
|
||||||
|
|
@ -2173,7 +2173,7 @@ _create_boundary_vertex(const X_monotone_curve_2& cv, Arr_curve_end ind,
|
||||||
if (is_open(ps_x, ps_y))
|
if (is_open(ps_x, ps_y))
|
||||||
// The curve-end lies on open boundary so the vertex is not associated
|
// The curve-end lies on open boundary so the vertex is not associated
|
||||||
// with a valid point.
|
// with a valid point.
|
||||||
v->set_point(NULL);
|
v->set_point(nullptr);
|
||||||
else {
|
else {
|
||||||
// Create a boundary vertex associated with a valid point.
|
// Create a boundary vertex associated with a valid point.
|
||||||
Point_2* p_p = (ind == ARR_MIN_END) ?
|
Point_2* p_p = (ind == ARR_MIN_END) ?
|
||||||
|
|
@ -2244,7 +2244,7 @@ _place_and_set_curve_end(DFace* f,
|
||||||
m_topol_traits.notify_on_boundary_vertex_creation(v, cv, ind, ps_x, ps_y);
|
m_topol_traits.notify_on_boundary_vertex_creation(v, cv, ind, ps_x, ps_y);
|
||||||
|
|
||||||
// There are no edges incident to v, therefore no predecessor halfedge.
|
// There are no edges incident to v, therefore no predecessor halfedge.
|
||||||
*p_pred = NULL;
|
*p_pred = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the vertex that represents the curve end.
|
// Return the vertex that represents the curve end.
|
||||||
|
|
@ -2353,8 +2353,8 @@ _insert_from_vertex(DHalfedge* he_to, const X_monotone_curve_2& cv,
|
||||||
|
|
||||||
// Get the incident face of the previous halfedge. Note that this will also
|
// Get the incident face of the previous halfedge. Note that this will also
|
||||||
// be the incident face of the two new halfedges we are about to create.
|
// be the incident face of the two new halfedges we are about to create.
|
||||||
DInner_ccb* ic = (he_to->is_on_inner_ccb()) ? he_to->inner_ccb() : NULL;
|
DInner_ccb* ic = (he_to->is_on_inner_ccb()) ? he_to->inner_ccb() : nullptr;
|
||||||
DOuter_ccb* oc = (ic == NULL) ? he_to->outer_ccb() : NULL;
|
DOuter_ccb* oc = (ic == nullptr) ? he_to->outer_ccb() : nullptr;
|
||||||
|
|
||||||
// The first vertex is the one that the he_to halfedge points to.
|
// The first vertex is the one that the he_to halfedge points to.
|
||||||
// The second vertex is given by v.
|
// The second vertex is given by v.
|
||||||
|
|
@ -2376,7 +2376,7 @@ _insert_from_vertex(DHalfedge* he_to, const X_monotone_curve_2& cv,
|
||||||
he2->set_vertex(v2);
|
he2->set_vertex(v2);
|
||||||
|
|
||||||
// Set the component for the new halfedge pair.
|
// Set the component for the new halfedge pair.
|
||||||
if (oc != NULL) {
|
if (oc != nullptr) {
|
||||||
// On an outer component:
|
// On an outer component:
|
||||||
he1->set_outer_ccb(oc);
|
he1->set_outer_ccb(oc);
|
||||||
he2->set_outer_ccb(oc);
|
he2->set_outer_ccb(oc);
|
||||||
|
|
@ -2459,8 +2459,8 @@ _insert_at_vertices(DHalfedge* he_to,
|
||||||
he_away->outer_ccb()->face()) << std::endl;
|
he_away->outer_ccb()->face()) << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
CGAL_precondition(he_to != NULL);
|
CGAL_precondition(he_to != nullptr);
|
||||||
CGAL_precondition(he_away != NULL);
|
CGAL_precondition(he_away != nullptr);
|
||||||
|
|
||||||
// TODO EBEB 2012-10-21 rewrite the code in terms of he_to and he_away instead of prev1 and prev2
|
// TODO EBEB 2012-10-21 rewrite the code in terms of he_to and he_away instead of prev1 and prev2
|
||||||
// the remainder of the function we deal with this situation adds he1 and
|
// the remainder of the function we deal with this situation adds he1 and
|
||||||
|
|
@ -2471,8 +2471,8 @@ _insert_at_vertices(DHalfedge* he_to,
|
||||||
DHalfedge* prev1 = he_to;
|
DHalfedge* prev1 = he_to;
|
||||||
DHalfedge* prev2 = he_away->prev();
|
DHalfedge* prev2 = he_away->prev();
|
||||||
|
|
||||||
CGAL_precondition(prev1 != NULL);
|
CGAL_precondition(prev1 != nullptr);
|
||||||
CGAL_precondition(prev2 != NULL);
|
CGAL_precondition(prev2 != nullptr);
|
||||||
CGAL_precondition(prev1 != prev2);
|
CGAL_precondition(prev1 != prev2);
|
||||||
|
|
||||||
// in general we do not swap ...
|
// in general we do not swap ...
|
||||||
|
|
@ -2491,10 +2491,10 @@ _insert_at_vertices(DHalfedge* he_to,
|
||||||
|
|
||||||
// Comment EBEB 2012-08-05 hole1/hole2 appear later as ic1/ic2, but we keep
|
// Comment EBEB 2012-08-05 hole1/hole2 appear later as ic1/ic2, but we keep
|
||||||
// them here, as the usage is rather local to decide swapping
|
// them here, as the usage is rather local to decide swapping
|
||||||
DInner_ccb* hole1 = (prev1->is_on_inner_ccb()) ? prev1->inner_ccb() : NULL;
|
DInner_ccb* hole1 = (prev1->is_on_inner_ccb()) ? prev1->inner_ccb() : nullptr;
|
||||||
DInner_ccb* hole2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : NULL;
|
DInner_ccb* hole2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : nullptr;
|
||||||
|
|
||||||
if ((hole1 == hole2) && (hole1 != NULL)) {
|
if ((hole1 == hole2) && (hole1 != nullptr)) {
|
||||||
// .. only in this special case, we have to check whether swapping should
|
// .. only in this special case, we have to check whether swapping should
|
||||||
// take place
|
// take place
|
||||||
|
|
||||||
|
|
@ -2605,13 +2605,13 @@ _insert_at_vertices(DHalfedge* he_to,
|
||||||
|
|
||||||
// Get the components containing the two previous halfedges and the incident
|
// Get the components containing the two previous halfedges and the incident
|
||||||
// face (which should be the same for the two components).
|
// face (which should be the same for the two components).
|
||||||
DInner_ccb* ic1 = (prev1->is_on_inner_ccb()) ? prev1->inner_ccb() : NULL;
|
DInner_ccb* ic1 = (prev1->is_on_inner_ccb()) ? prev1->inner_ccb() : nullptr;
|
||||||
DOuter_ccb* oc1 = (ic1 == NULL) ? prev1->outer_ccb() : NULL;
|
DOuter_ccb* oc1 = (ic1 == nullptr) ? prev1->outer_ccb() : nullptr;
|
||||||
DFace* f = (ic1 != NULL) ? ic1->face() : oc1->face();
|
DFace* f = (ic1 != nullptr) ? ic1->face() : oc1->face();
|
||||||
DInner_ccb* ic2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : NULL;
|
DInner_ccb* ic2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : nullptr;
|
||||||
DOuter_ccb* oc2 = (ic2 == NULL) ? prev2->outer_ccb() : NULL;
|
DOuter_ccb* oc2 = (ic2 == nullptr) ? prev2->outer_ccb() : nullptr;
|
||||||
|
|
||||||
CGAL_precondition_code(DFace* f2 = (ic2 != NULL) ? ic2->face() : oc2->face());
|
CGAL_precondition_code(DFace* f2 = (ic2 != nullptr) ? ic2->face() : oc2->face());
|
||||||
|
|
||||||
#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
|
#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
|
||||||
std::cout << "ic1: " << ic1 << std::endl;
|
std::cout << "ic1: " << ic1 << std::endl;
|
||||||
|
|
@ -2672,7 +2672,7 @@ _insert_at_vertices(DHalfedge* he_to,
|
||||||
bool split_new_face = true;
|
bool split_new_face = true;
|
||||||
bool is_split_face_contained = false;
|
bool is_split_face_contained = false;
|
||||||
|
|
||||||
if ((ic1 != NULL) && (ic1 == ic2)) {
|
if ((ic1 != nullptr) && (ic1 == ic2)) {
|
||||||
|
|
||||||
// EBEB 2012-08-06:
|
// EBEB 2012-08-06:
|
||||||
// This is new code. It relies on the (computed) signs and replaces to
|
// This is new code. It relies on the (computed) signs and replaces to
|
||||||
|
|
@ -2722,7 +2722,7 @@ _insert_at_vertices(DHalfedge* he_to,
|
||||||
|
|
||||||
// Check the various cases of insertion (in the design document: the
|
// Check the various cases of insertion (in the design document: the
|
||||||
// various sub-cases of case 3 in the insertion procedure).
|
// various sub-cases of case 3 in the insertion procedure).
|
||||||
if (((ic1 != NULL) || (ic2 != NULL)) && (ic1 != ic2)) {
|
if (((ic1 != nullptr) || (ic2 != nullptr)) && (ic1 != ic2)) {
|
||||||
// In case we have to connect two disconnected components, no new face
|
// In case we have to connect two disconnected components, no new face
|
||||||
// is created.
|
// is created.
|
||||||
new_face = false;
|
new_face = false;
|
||||||
|
|
@ -2732,7 +2732,7 @@ _insert_at_vertices(DHalfedge* he_to,
|
||||||
// of the face.
|
// of the face.
|
||||||
Face_handle fh(f);
|
Face_handle fh(f);
|
||||||
|
|
||||||
if ((ic1 != NULL) && (ic2 != NULL)) {
|
if ((ic1 != nullptr) && (ic2 != nullptr)) {
|
||||||
// In this case (3.1) we have to connect to inner CCBs (holes) inside f.
|
// In this case (3.1) we have to connect to inner CCBs (holes) inside f.
|
||||||
// Notify the observers that we are about to merge two holes in the face.
|
// Notify the observers that we are about to merge two holes in the face.
|
||||||
_notify_before_merge_inner_ccb(fh,
|
_notify_before_merge_inner_ccb(fh,
|
||||||
|
|
@ -2769,7 +2769,7 @@ _insert_at_vertices(DHalfedge* he_to,
|
||||||
DHalfedge* ccb_first;
|
DHalfedge* ccb_first;
|
||||||
DHalfedge* ccb_last;
|
DHalfedge* ccb_last;
|
||||||
|
|
||||||
if (ic1 != NULL) {
|
if (ic1 != nullptr) {
|
||||||
// We remove the inner CCB ic1 and merge in with the outer CCB oc2.
|
// We remove the inner CCB ic1 and merge in with the outer CCB oc2.
|
||||||
del_ic = ic1;
|
del_ic = ic1;
|
||||||
oc = oc2;
|
oc = oc2;
|
||||||
|
|
@ -2809,7 +2809,7 @@ _insert_at_vertices(DHalfedge* he_to,
|
||||||
}
|
}
|
||||||
else if (! split_new_face) {
|
else if (! split_new_face) {
|
||||||
// RWRW: NEW!
|
// RWRW: NEW!
|
||||||
CGAL_assertion((ic1 == ic2) && (ic1 != NULL));
|
CGAL_assertion((ic1 == ic2) && (ic1 != nullptr));
|
||||||
|
|
||||||
// Handle the special case where we close an inner CCB, such that
|
// Handle the special case where we close an inner CCB, such that
|
||||||
// we form two outer CCBs of the same face.
|
// we form two outer CCBs of the same face.
|
||||||
|
|
@ -2920,7 +2920,7 @@ _insert_at_vertices(DHalfedge* he_to,
|
||||||
// or on the same outer CCB (distinguish case 3.3 and case 3.4).
|
// or on the same outer CCB (distinguish case 3.3 and case 3.4).
|
||||||
bool is_hole;
|
bool is_hole;
|
||||||
|
|
||||||
if (ic1 != NULL) {
|
if (ic1 != nullptr) {
|
||||||
// In this case (3.3) we have two distinguish two sub-cases.
|
// In this case (3.3) we have two distinguish two sub-cases.
|
||||||
if (is_split_face_contained) {
|
if (is_split_face_contained) {
|
||||||
// Comment: This is true for all non-identification topologies
|
// Comment: This is true for all non-identification topologies
|
||||||
|
|
@ -3079,7 +3079,7 @@ _insert_at_vertices(DHalfedge* he_to,
|
||||||
_notify_after_split_face(fh, Face_handle(new_f), is_hole);
|
_notify_after_split_face(fh, Face_handle(new_f), is_hole);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
CGAL_assertion((oc1 != NULL) && (oc2 != NULL) && (oc1 != oc2));
|
CGAL_assertion((oc1 != nullptr) && (oc2 != nullptr) && (oc1 != oc2));
|
||||||
|
|
||||||
// In case prev1 and prev2 belong to different outer CCBs of the same
|
// In case prev1 and prev2 belong to different outer CCBs of the same
|
||||||
// face f (case 3.5), we have to merge this ccbs into one. Note that we
|
// face f (case 3.5), we have to merge this ccbs into one. Note that we
|
||||||
|
|
@ -3122,12 +3122,12 @@ _insert_at_vertices(DHalfedge* he_to,
|
||||||
#if 0
|
#if 0
|
||||||
{
|
{
|
||||||
DHalfedge* he1 = he2->opposite();
|
DHalfedge* he1 = he2->opposite();
|
||||||
DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
|
DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : nullptr;
|
||||||
DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
|
DOuter_ccb* oc1 = (ic1 == nullptr) ? he1->outer_ccb() : nullptr;
|
||||||
DFace* f1 = (ic1 != NULL) ? ic1->face() : oc1->face();
|
DFace* f1 = (ic1 != nullptr) ? ic1->face() : oc1->face();
|
||||||
DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
|
DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : nullptr;
|
||||||
DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
|
DOuter_ccb* oc2 = (ic2 == nullptr) ? he2->outer_ccb() : nullptr;
|
||||||
DFace* f2 = (ic2 != NULL) ? ic2->face() : oc2->face();
|
DFace* f2 = (ic2 != nullptr) ? ic2->face() : oc2->face();
|
||||||
CGAL_postcondition((ic1 != ic2) || (f1 == f2));
|
CGAL_postcondition((ic1 != ic2) || (f1 == f2));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -3337,10 +3337,10 @@ _split_edge(DHalfedge* e, DVertex* v,
|
||||||
// Get the split halfedge and its twin, its source and target.
|
// Get the split halfedge and its twin, its source and target.
|
||||||
DHalfedge* he1 = e;
|
DHalfedge* he1 = e;
|
||||||
DHalfedge* he2 = he1->opposite();
|
DHalfedge* he2 = he1->opposite();
|
||||||
DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
|
DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : nullptr;
|
||||||
DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
|
DOuter_ccb* oc1 = (ic1 == nullptr) ? he1->outer_ccb() : nullptr;
|
||||||
DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
|
DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : nullptr;
|
||||||
DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
|
DOuter_ccb* oc2 = (ic2 == nullptr) ? he2->outer_ccb() : nullptr;
|
||||||
|
|
||||||
// Notify the observers that we are about to split an edge.
|
// Notify the observers that we are about to split an edge.
|
||||||
_notify_before_split_edge(Halfedge_handle(e), Vertex_handle(v), cv1, cv2);
|
_notify_before_split_edge(Halfedge_handle(e), Vertex_handle(v), cv1, cv2);
|
||||||
|
|
@ -3370,7 +3370,7 @@ _split_edge(DHalfedge* e, DVertex* v,
|
||||||
// he1 and he2 form an "antenna", so he4 becomes he3's successor.
|
// he1 and he2 form an "antenna", so he4 becomes he3's successor.
|
||||||
he3->set_next(he4);
|
he3->set_next(he4);
|
||||||
|
|
||||||
if (oc1 != NULL)
|
if (oc1 != nullptr)
|
||||||
he3->set_outer_ccb(oc1);
|
he3->set_outer_ccb(oc1);
|
||||||
else
|
else
|
||||||
he3->set_inner_ccb(ic1);
|
he3->set_inner_ccb(ic1);
|
||||||
|
|
@ -3379,7 +3379,7 @@ _split_edge(DHalfedge* e, DVertex* v,
|
||||||
he4->set_vertex(v);
|
he4->set_vertex(v);
|
||||||
he4->set_next(he2);
|
he4->set_next(he2);
|
||||||
|
|
||||||
if (oc2 != NULL)
|
if (oc2 != nullptr)
|
||||||
he4->set_outer_ccb(oc2);
|
he4->set_outer_ccb(oc2);
|
||||||
else
|
else
|
||||||
he4->set_inner_ccb(ic2);
|
he4->set_inner_ccb(ic2);
|
||||||
|
|
@ -3472,8 +3472,8 @@ _compute_indices(Arr_parameter_space ps_x_curr, Arr_parameter_space ps_y_curr,
|
||||||
// Precondition The OutputIterator must be a back inserter.
|
// Precondition The OutputIterator must be a back inserter.
|
||||||
// Precondition The traveresed ccb is an inner ccb; thus, it cannot be
|
// Precondition The traveresed ccb is an inner ccb; thus, it cannot be
|
||||||
// on an open boundary.
|
// on an open boundary.
|
||||||
// Postcondition If NULL is a local minimum, it is inserted first.
|
// Postcondition If nullptr is a local minimum, it is inserted first.
|
||||||
// No other local minima can be NULL.
|
// No other local minima can be nullptr.
|
||||||
template <typename GeomTraits, typename TopTraits>
|
template <typename GeomTraits, typename TopTraits>
|
||||||
template <typename OutputIterator>
|
template <typename OutputIterator>
|
||||||
std::pair<Sign, Sign>
|
std::pair<Sign, Sign>
|
||||||
|
|
@ -3553,7 +3553,7 @@ _compute_signs_and_local_minima(const DHalfedge* he_to,
|
||||||
|
|
||||||
if ((cv_dir == ARR_RIGHT_TO_LEFT) &&
|
if ((cv_dir == ARR_RIGHT_TO_LEFT) &&
|
||||||
(he_away->direction() == ARR_LEFT_TO_RIGHT)) {
|
(he_away->direction() == ARR_LEFT_TO_RIGHT)) {
|
||||||
const DHalfedge* null_he = NULL;
|
const DHalfedge* null_he = nullptr;
|
||||||
*local_mins_it++ = std::make_pair(null_he, x_index);
|
*local_mins_it++ = std::make_pair(null_he, x_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3712,7 +3712,7 @@ _compute_signs_and_min(const DHalfedge* he_anchor,
|
||||||
int& index_min) const
|
int& index_min) const
|
||||||
{
|
{
|
||||||
// Initialize
|
// Initialize
|
||||||
const DHalfedge* he_min = NULL;
|
const DHalfedge* he_min = nullptr;
|
||||||
ps_x_min = ARR_INTERIOR;
|
ps_x_min = ARR_INTERIOR;
|
||||||
ps_y_min = ARR_INTERIOR;
|
ps_y_min = ARR_INTERIOR;
|
||||||
index_min = 0;
|
index_min = 0;
|
||||||
|
|
@ -3795,7 +3795,7 @@ _compute_signs_and_min(const DHalfedge* he_anchor,
|
||||||
// Test the halfedge incident to the leftmost vertex.
|
// Test the halfedge incident to the leftmost vertex.
|
||||||
// Note that we may visit the same vertex several times.
|
// Note that we may visit the same vertex several times.
|
||||||
|
|
||||||
if ((he_min == NULL) ||
|
if ((he_min == nullptr) ||
|
||||||
(index_curr < index_min) ||
|
(index_curr < index_min) ||
|
||||||
((index_curr == index_min) &&
|
((index_curr == index_min) &&
|
||||||
((he_curr->vertex() != he_min->vertex()) &&
|
((he_curr->vertex() != he_min->vertex()) &&
|
||||||
|
|
@ -4023,9 +4023,9 @@ _defines_outer_ccb_of_new_face(const DHalfedge* he_to,
|
||||||
int index_min = lm_it->second;
|
int index_min = lm_it->second;
|
||||||
const DHalfedge* he_min = lm_it->first;
|
const DHalfedge* he_min = lm_it->first;
|
||||||
const DVertex* v_min =
|
const DVertex* v_min =
|
||||||
(he_min == NULL) ? he_away->opposite()->vertex() : he_min->vertex();
|
(he_min == nullptr) ? he_away->opposite()->vertex() : he_min->vertex();
|
||||||
const X_monotone_curve_2* cv_min =
|
const X_monotone_curve_2* cv_min =
|
||||||
(he_min == NULL) ? &cv : &(he_min->curve());
|
(he_min == nullptr) ? &cv : &(he_min->curve());
|
||||||
Arr_parameter_space ps_x_min = parameter_space_in_x(*cv_min, ARR_MIN_END);
|
Arr_parameter_space ps_x_min = parameter_space_in_x(*cv_min, ARR_MIN_END);
|
||||||
Arr_parameter_space ps_y_min = parameter_space_in_y(*cv_min, ARR_MIN_END);
|
Arr_parameter_space ps_y_min = parameter_space_in_y(*cv_min, ARR_MIN_END);
|
||||||
|
|
||||||
|
|
@ -4077,7 +4077,7 @@ _defines_outer_ccb_of_new_face(const DHalfedge* he_to,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CGAL_assertion(v_min != NULL);
|
CGAL_assertion(v_min != nullptr);
|
||||||
CGAL_assertion(!v_min->has_null_point());
|
CGAL_assertion(!v_min->has_null_point());
|
||||||
|
|
||||||
#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
|
#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
|
||||||
|
|
@ -4086,7 +4086,7 @@ _defines_outer_ccb_of_new_face(const DHalfedge* he_to,
|
||||||
if (he_min)
|
if (he_min)
|
||||||
std::cout << he_min->opposite()->vertex()->point()
|
std::cout << he_min->opposite()->vertex()->point()
|
||||||
<< " => " << he_min->vertex()->point();
|
<< " => " << he_min->vertex()->point();
|
||||||
else std::cout << "NULL";
|
else std::cout << "nullptr";
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -4096,7 +4096,7 @@ _defines_outer_ccb_of_new_face(const DHalfedge* he_to,
|
||||||
// to the right of the leftmost vertex. We compare them to the right of this
|
// to the right of the leftmost vertex. We compare them to the right of this
|
||||||
// point to determine whether he_to (the curve) and he_away are incident to
|
// point to determine whether he_to (the curve) and he_away are incident to
|
||||||
// the hole to be created or not.
|
// the hole to be created or not.
|
||||||
const X_monotone_curve_2& cv_next = (he_min == NULL) ?
|
const X_monotone_curve_2& cv_next = (he_min == nullptr) ?
|
||||||
he_away->curve() : ((he_min == he_to) ? cv : he_min->next()->curve());
|
he_away->curve() : ((he_min == he_to) ? cv : he_min->next()->curve());
|
||||||
return _is_above(*cv_min, cv_next, v_min->point(), ps_y_min,
|
return _is_above(*cv_min, cv_next, v_min->point(), ps_y_min,
|
||||||
Top_or_bottom_sides_category());
|
Top_or_bottom_sides_category());
|
||||||
|
|
@ -4202,12 +4202,12 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
|
||||||
// belong to and their incident faces.
|
// belong to and their incident faces.
|
||||||
DHalfedge* he1 = e;
|
DHalfedge* he1 = e;
|
||||||
DHalfedge* he2 = e->opposite();
|
DHalfedge* he2 = e->opposite();
|
||||||
DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : NULL;
|
DInner_ccb* ic1 = (he1->is_on_inner_ccb()) ? he1->inner_ccb() : nullptr;
|
||||||
DOuter_ccb* oc1 = (ic1 == NULL) ? he1->outer_ccb() : NULL;
|
DOuter_ccb* oc1 = (ic1 == nullptr) ? he1->outer_ccb() : nullptr;
|
||||||
DFace* f1 = (oc1 != NULL) ? oc1->face() : ic1->face();
|
DFace* f1 = (oc1 != nullptr) ? oc1->face() : ic1->face();
|
||||||
DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : NULL;
|
DInner_ccb* ic2 = (he2->is_on_inner_ccb()) ? he2->inner_ccb() : nullptr;
|
||||||
DOuter_ccb* oc2 = (ic2 == NULL) ? he2->outer_ccb() : NULL;
|
DOuter_ccb* oc2 = (ic2 == nullptr) ? he2->outer_ccb() : nullptr;
|
||||||
DFace* f2 = (oc2 != NULL) ? oc2->face() : ic2->face();
|
DFace* f2 = (oc2 != nullptr) ? oc2->face() : ic2->face();
|
||||||
|
|
||||||
#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
|
#if CGAL_ARRANGEMENT_ON_SURFACE_INSERT_VERBOSE
|
||||||
#if 0
|
#if 0
|
||||||
|
|
@ -4419,8 +4419,8 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Now the real removal starts.
|
// Now the real removal starts.
|
||||||
DHalfedge* prev1 = NULL;
|
DHalfedge* prev1 = nullptr;
|
||||||
DHalfedge* prev2 = NULL;
|
DHalfedge* prev2 = nullptr;
|
||||||
|
|
||||||
// Notify the observers that we are about to remove an edge.
|
// Notify the observers that we are about to remove an edge.
|
||||||
Halfedge_handle hh(e);
|
Halfedge_handle hh(e);
|
||||||
|
|
@ -4432,7 +4432,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
|
||||||
if (f1 == f2) {
|
if (f1 == f2) {
|
||||||
// Check whether the two halfedges are successors along the face boundary.
|
// Check whether the two halfedges are successors along the face boundary.
|
||||||
if ((he1->next() == he2) && (he2->next() == he1)) {
|
if ((he1->next() == he2) && (he2->next() == he1)) {
|
||||||
CGAL_assertion((ic1 != NULL) && (ic1 == ic2));
|
CGAL_assertion((ic1 != nullptr) && (ic1 == ic2));
|
||||||
|
|
||||||
// The two halfedges form a "singleton" hole inside the incident face
|
// The two halfedges form a "singleton" hole inside the incident face
|
||||||
// (case 1 of the removal procedure, as detailed in the design document),
|
// (case 1 of the removal procedure, as detailed in the design document),
|
||||||
|
|
@ -4463,7 +4463,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
|
||||||
if ((v1->parameter_space_in_x() != ARR_INTERIOR) ||
|
if ((v1->parameter_space_in_x() != ARR_INTERIOR) ||
|
||||||
(v1->parameter_space_in_y() != ARR_INTERIOR))
|
(v1->parameter_space_in_y() != ARR_INTERIOR))
|
||||||
{
|
{
|
||||||
v1->set_halfedge(NULL); // disconnect the end vertex
|
v1->set_halfedge(nullptr); // disconnect the end vertex
|
||||||
_remove_vertex_if_redundant(v1, f1);
|
_remove_vertex_if_redundant(v1, f1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -4485,7 +4485,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
|
||||||
if ((v2->parameter_space_in_x() != ARR_INTERIOR) ||
|
if ((v2->parameter_space_in_x() != ARR_INTERIOR) ||
|
||||||
(v2->parameter_space_in_y() != ARR_INTERIOR))
|
(v2->parameter_space_in_y() != ARR_INTERIOR))
|
||||||
{
|
{
|
||||||
v2->set_halfedge(NULL); // disconnect the end vertex
|
v2->set_halfedge(nullptr); // disconnect the end vertex
|
||||||
_remove_vertex_if_redundant(v2, f1);
|
_remove_vertex_if_redundant(v2, f1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -4533,10 +4533,10 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
|
||||||
// In case the halfedges to be deleted are represantatives of their
|
// In case the halfedges to be deleted are represantatives of their
|
||||||
// CCB (note that noth should belong to the same CCB, be it an outer
|
// CCB (note that noth should belong to the same CCB, be it an outer
|
||||||
// CCB or an inner one), make prev1 the components representative.
|
// CCB or an inner one), make prev1 the components representative.
|
||||||
if ((oc1 != NULL) &&
|
if ((oc1 != nullptr) &&
|
||||||
((oc1->halfedge() == he1) || (oc1->halfedge() == he2)))
|
((oc1->halfedge() == he1) || (oc1->halfedge() == he2)))
|
||||||
oc1->set_halfedge(prev1);
|
oc1->set_halfedge(prev1);
|
||||||
else if ((ic1 != NULL) &&
|
else if ((ic1 != nullptr) &&
|
||||||
((ic1->halfedge() == he1) || (ic1->halfedge() == he2)))
|
((ic1->halfedge() == he1) || (ic1->halfedge() == he2)))
|
||||||
ic1->set_halfedge(prev1);
|
ic1->set_halfedge(prev1);
|
||||||
|
|
||||||
|
|
@ -4565,7 +4565,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
|
||||||
if ((v1->parameter_space_in_x() != ARR_INTERIOR) ||
|
if ((v1->parameter_space_in_x() != ARR_INTERIOR) ||
|
||||||
(v1->parameter_space_in_y() != ARR_INTERIOR))
|
(v1->parameter_space_in_y() != ARR_INTERIOR))
|
||||||
{
|
{
|
||||||
v1->set_halfedge(NULL); // disconnect the end vertex
|
v1->set_halfedge(nullptr); // disconnect the end vertex
|
||||||
_remove_vertex_if_redundant(v1, f1);
|
_remove_vertex_if_redundant(v1, f1);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -4598,7 +4598,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
|
||||||
prev1 = he1->prev();
|
prev1 = he1->prev();
|
||||||
prev2 = he2->prev();
|
prev2 = he2->prev();
|
||||||
|
|
||||||
if ((ic1 != NULL) && (ic1 == ic2)) {
|
if ((ic1 != nullptr) && (ic1 == ic2)) {
|
||||||
|
|
||||||
// If both halfedges lie on the same inner component (hole) inside the
|
// If both halfedges lie on the same inner component (hole) inside the
|
||||||
// face (case 3.1), we have to split this component into two holes.
|
// face (case 3.1), we have to split this component into two holes.
|
||||||
|
|
@ -4639,7 +4639,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
|
||||||
}
|
}
|
||||||
else if (oc1 != oc2) {
|
else if (oc1 != oc2) {
|
||||||
// RWRW: NEW!
|
// RWRW: NEW!
|
||||||
CGAL_assertion((oc1 != NULL) && (oc2 != NULL));
|
CGAL_assertion((oc1 != nullptr) && (oc2 != nullptr));
|
||||||
|
|
||||||
// In case both halfegdes he1 and he2 are incident to the same face
|
// In case both halfegdes he1 and he2 are incident to the same face
|
||||||
// but lie on different outer CCBs of this face, removing this pair of
|
// but lie on different outer CCBs of this face, removing this pair of
|
||||||
|
|
@ -4665,7 +4665,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
|
||||||
add_inner_ccb = true;
|
add_inner_ccb = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
CGAL_assertion((oc1 != NULL) && (oc1 == oc2));
|
CGAL_assertion((oc1 != nullptr) && (oc1 == oc2));
|
||||||
|
|
||||||
// If both halfedges are incident to the same outer CCB of their
|
// If both halfedges are incident to the same outer CCB of their
|
||||||
// face (case 3.2), we have to distinguish two sub-cases:
|
// face (case 3.2), we have to distinguish two sub-cases:
|
||||||
|
|
@ -4851,9 +4851,9 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
|
||||||
prev1 = he1->prev();
|
prev1 = he1->prev();
|
||||||
prev2 = he2->prev();
|
prev2 = he2->prev();
|
||||||
|
|
||||||
CGAL_assertion((ic1 == NULL) || (ic2 == NULL));
|
CGAL_assertion((ic1 == nullptr) || (ic2 == nullptr));
|
||||||
|
|
||||||
if ((ic1 == NULL) && (ic2 == NULL)) {
|
if ((ic1 == nullptr) && (ic2 == nullptr)) {
|
||||||
bool add_inner_ccb = false;
|
bool add_inner_ccb = false;
|
||||||
|
|
||||||
// Comment EFEF 2013-05-31: if we ever find the need to use signs1 and
|
// Comment EFEF 2013-05-31: if we ever find the need to use signs1 and
|
||||||
|
|
@ -5017,15 +5017,15 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
|
||||||
// inside it (case 3.3). We first make sure that f1 contains the hole f2, so
|
// inside it (case 3.3). We first make sure that f1 contains the hole f2, so
|
||||||
// we can merge f2 with it (we swap roles between the halfedges if
|
// we can merge f2 with it (we swap roles between the halfedges if
|
||||||
// necessary).
|
// necessary).
|
||||||
if (ic2 != NULL) {
|
if (ic2 != nullptr) {
|
||||||
he1 = he2;
|
he1 = he2;
|
||||||
he2 = he1->opposite();
|
he2 = he1->opposite();
|
||||||
|
|
||||||
ic1 = ic2;
|
ic1 = ic2;
|
||||||
ic2 = NULL;
|
ic2 = nullptr;
|
||||||
|
|
||||||
oc2 = oc1;
|
oc2 = oc1;
|
||||||
oc1 = NULL;
|
oc1 = nullptr;
|
||||||
|
|
||||||
DFace* tf = f1;
|
DFace* tf = f1;
|
||||||
f1 = f2;
|
f1 = f2;
|
||||||
|
|
@ -5139,7 +5139,7 @@ _remove_vertex_if_redundant(DVertex* v, DFace* f)
|
||||||
|
|
||||||
// In case the vertex has no incident halfedges, remove it if it is
|
// In case the vertex has no incident halfedges, remove it if it is
|
||||||
// redundant. Otherwise, make it an isolated vertex.
|
// redundant. Otherwise, make it an isolated vertex.
|
||||||
if (v->halfedge() == NULL) {
|
if (v->halfedge() == nullptr) {
|
||||||
if (m_topol_traits.is_redundant(v)) {
|
if (m_topol_traits.is_redundant(v)) {
|
||||||
// Remove the vertex and notify the observers on doing so.
|
// Remove the vertex and notify the observers on doing so.
|
||||||
_notify_before_remove_vertex(Vertex_handle(v));
|
_notify_before_remove_vertex(Vertex_handle(v));
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ void Arrangement_zone_2<Arrangement, ZoneVisitor>::compute_zone()
|
||||||
const Halfedge_const_handle* hh;
|
const Halfedge_const_handle* hh;
|
||||||
const Face_const_handle* fh;
|
const Face_const_handle* fh;
|
||||||
|
|
||||||
if ((vh = object_cast<Vertex_const_handle>(&m_obj)) != NULL) {
|
if ((vh = object_cast<Vertex_const_handle>(&m_obj)) != nullptr) {
|
||||||
CGAL_assertion(m_has_left_pt);
|
CGAL_assertion(m_has_left_pt);
|
||||||
|
|
||||||
// The left endpoint coincides with an existing vertex:
|
// The left endpoint coincides with an existing vertex:
|
||||||
|
|
@ -128,7 +128,7 @@ void Arrangement_zone_2<Arrangement, ZoneVisitor>::compute_zone()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
else if ((hh = object_cast<Halfedge_const_handle>(&m_obj)) != NULL) {
|
else if ((hh = object_cast<Halfedge_const_handle>(&m_obj)) != nullptr) {
|
||||||
if (m_has_left_pt) {
|
if (m_has_left_pt) {
|
||||||
// Obtain the right halfedge from the halfedge-pair containing m_left_pt
|
// Obtain the right halfedge from the halfedge-pair containing m_left_pt
|
||||||
// in their interior.
|
// in their interior.
|
||||||
|
|
@ -171,7 +171,7 @@ void Arrangement_zone_2<Arrangement, ZoneVisitor>::compute_zone()
|
||||||
// The left endpoint lies inside a face.
|
// The left endpoint lies inside a face.
|
||||||
fh = object_cast<Face_const_handle>(&m_obj);
|
fh = object_cast<Face_const_handle>(&m_obj);
|
||||||
|
|
||||||
CGAL_assertion_msg(fh != NULL,
|
CGAL_assertion_msg(fh != nullptr,
|
||||||
"Invalid object returned by the point-location query.");
|
"Invalid object returned by the point-location query.");
|
||||||
|
|
||||||
// Compute the zone of the curve at the interior of the face.
|
// Compute the zone of the curve at the interior of the face.
|
||||||
|
|
@ -843,7 +843,7 @@ _compute_next_intersection(Halfedge_handle he,
|
||||||
// valid, as they lie to its right.
|
// valid, as they lie to its right.
|
||||||
valid_intersection = true;
|
valid_intersection = true;
|
||||||
}
|
}
|
||||||
else if (ip != NULL) {
|
else if (ip != nullptr) {
|
||||||
if (m_has_right_pt && m_right_on_boundary &&
|
if (m_has_right_pt && m_right_on_boundary &&
|
||||||
m_geom_traits->equal_2_object()(ip->first, m_right_pt))
|
m_geom_traits->equal_2_object()(ip->first, m_right_pt))
|
||||||
{
|
{
|
||||||
|
|
@ -861,7 +861,7 @@ _compute_next_intersection(Halfedge_handle he,
|
||||||
else {
|
else {
|
||||||
// We have an overlapping subcurve.
|
// We have an overlapping subcurve.
|
||||||
icv = object_cast<X_monotone_curve_2>(&(inter_list.front()));
|
icv = object_cast<X_monotone_curve_2>(&(inter_list.front()));
|
||||||
CGAL_assertion(icv != NULL);
|
CGAL_assertion(icv != nullptr);
|
||||||
|
|
||||||
if (m_geom_traits->is_closed_2_object()(*icv, ARR_MIN_END)) {
|
if (m_geom_traits->is_closed_2_object()(*icv, ARR_MIN_END)) {
|
||||||
// The curve has a valid left point - make sure it lies to the
|
// The curve has a valid left point - make sure it lies to the
|
||||||
|
|
@ -905,7 +905,7 @@ _compute_next_intersection(Halfedge_handle he,
|
||||||
// Compare that current object with m_left_pt (if exists).
|
// Compare that current object with m_left_pt (if exists).
|
||||||
ip = object_cast<Intersect_point_2>(&(inter_list.front()));
|
ip = object_cast<Intersect_point_2>(&(inter_list.front()));
|
||||||
|
|
||||||
if (ip != NULL) {
|
if (ip != nullptr) {
|
||||||
// We have a simple intersection point - if we don't have to skip it,
|
// We have a simple intersection point - if we don't have to skip it,
|
||||||
// make sure it lies to the right of m_left_pt (if m_left_pt is on the
|
// make sure it lies to the right of m_left_pt (if m_left_pt is on the
|
||||||
// left boundary, all points lie to it right).
|
// left boundary, all points lie to it right).
|
||||||
|
|
@ -930,7 +930,7 @@ _compute_next_intersection(Halfedge_handle he,
|
||||||
else {
|
else {
|
||||||
// We have an overlapping subcurve.
|
// We have an overlapping subcurve.
|
||||||
icv = object_cast<X_monotone_curve_2>(&(inter_list.front()));
|
icv = object_cast<X_monotone_curve_2>(&(inter_list.front()));
|
||||||
CGAL_assertion(icv != NULL);
|
CGAL_assertion(icv != nullptr);
|
||||||
|
|
||||||
if (m_geom_traits->is_closed_2_object()(*icv, ARR_MIN_END)) {
|
if (m_geom_traits->is_closed_2_object()(*icv, ARR_MIN_END)) {
|
||||||
// The curve has a valid left point - make sure it lies to the
|
// The curve has a valid left point - make sure it lies to the
|
||||||
|
|
@ -1122,7 +1122,7 @@ _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary,
|
||||||
// We have found an intersection (either a simple point or an
|
// We have found an intersection (either a simple point or an
|
||||||
// overlapping x-monotone curve).
|
// overlapping x-monotone curve).
|
||||||
const Intersect_point_2* int_p = object_cast<Intersect_point_2>(&iobj);
|
const Intersect_point_2* int_p = object_cast<Intersect_point_2>(&iobj);
|
||||||
if (int_p != NULL) {
|
if (int_p != nullptr) {
|
||||||
Point_2 ip = int_p->first;
|
Point_2 ip = int_p->first;
|
||||||
|
|
||||||
// Found a simple intersection point. Check if it is the leftmost
|
// Found a simple intersection point. Check if it is the leftmost
|
||||||
|
|
@ -1144,7 +1144,7 @@ _leftmost_intersection(Ccb_halfedge_circulator he_curr, bool on_boundary,
|
||||||
// We have located an overlapping curve. Assign ip as its left
|
// We have located an overlapping curve. Assign ip as its left
|
||||||
// endpoint.
|
// endpoint.
|
||||||
const X_monotone_curve_2* icv = object_cast<X_monotone_curve_2>(&iobj);
|
const X_monotone_curve_2* icv = object_cast<X_monotone_curve_2>(&iobj);
|
||||||
CGAL_assertion(icv != NULL);
|
CGAL_assertion(icv != nullptr);
|
||||||
Point_2 ip = min_vertex(*icv);
|
Point_2 ip = min_vertex(*icv);
|
||||||
|
|
||||||
// Check if this endpoint it is the leftmost intersection point so far.
|
// Check if this endpoint it is the leftmost intersection point so far.
|
||||||
|
|
@ -1301,7 +1301,7 @@ _zone_in_face(Face_handle face, bool on_boundary)
|
||||||
m_cv = m_sub_cv2;
|
m_cv = m_sub_cv2;
|
||||||
}
|
}
|
||||||
|
|
||||||
const X_monotone_curve_2*p_orig_curve = NULL;
|
const X_monotone_curve_2*p_orig_curve = nullptr;
|
||||||
|
|
||||||
if (! m_found_iso_vert) {
|
if (! m_found_iso_vert) {
|
||||||
// Check whether m_intersect_p coincides with one of the end-vertices of the
|
// Check whether m_intersect_p coincides with one of the end-vertices of the
|
||||||
|
|
@ -1364,8 +1364,8 @@ _zone_in_face(Face_handle face, bool on_boundary)
|
||||||
// subcurves that result from splitting m_intersect_he->curve() at the
|
// subcurves that result from splitting m_intersect_he->curve() at the
|
||||||
// intersection point we have just detected, one extends to the left
|
// intersection point we have just detected, one extends to the left
|
||||||
// and one to the right of this split point.
|
// and one to the right of this split point.
|
||||||
const X_monotone_curve_2* p_left_subcurve = NULL;
|
const X_monotone_curve_2* p_left_subcurve = nullptr;
|
||||||
const X_monotone_curve_2* p_right_subcurve = NULL;
|
const X_monotone_curve_2* p_right_subcurve = nullptr;
|
||||||
|
|
||||||
if (inserted_he->next()->direction() == ARR_LEFT_TO_RIGHT) {
|
if (inserted_he->next()->direction() == ARR_LEFT_TO_RIGHT) {
|
||||||
// The next halfedge extends to the right of the split point:
|
// The next halfedge extends to the right of the split point:
|
||||||
|
|
|
||||||
|
|
@ -247,7 +247,7 @@ public:
|
||||||
typedef Face_neighbor_iterator Incident_edge_iterator;
|
typedef Face_neighbor_iterator Incident_edge_iterator;
|
||||||
|
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Dual_arrangement_on_surface() : p_arr(NULL) {}
|
Dual_arrangement_on_surface() : p_arr(nullptr) {}
|
||||||
|
|
||||||
/*! Constructor from an arrangement. */
|
/*! Constructor from an arrangement. */
|
||||||
Dual_arrangement_on_surface(const Arrangement& arr) :
|
Dual_arrangement_on_surface(const Arrangement& arr) :
|
||||||
|
|
|
||||||
|
|
@ -165,7 +165,7 @@ protected:
|
||||||
const Topology_traits* m_topol_traits;
|
const Topology_traits* m_topol_traits;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
_Is_concrete_vertex() : m_topol_traits(NULL) {}
|
_Is_concrete_vertex() : m_topol_traits(nullptr) {}
|
||||||
|
|
||||||
_Is_concrete_vertex(const Topology_traits* topol_traits) :
|
_Is_concrete_vertex(const Topology_traits* topol_traits) :
|
||||||
m_topol_traits(topol_traits)
|
m_topol_traits(topol_traits)
|
||||||
|
|
@ -173,7 +173,7 @@ protected:
|
||||||
|
|
||||||
bool operator()(const DVertex& v) const
|
bool operator()(const DVertex& v) const
|
||||||
{
|
{
|
||||||
if (m_topol_traits == NULL)
|
if (m_topol_traits == nullptr)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return (m_topol_traits->is_concrete_vertex(&v));
|
return (m_topol_traits->is_concrete_vertex(&v));
|
||||||
|
|
@ -188,7 +188,7 @@ protected:
|
||||||
const Topology_traits* m_topol_traits;
|
const Topology_traits* m_topol_traits;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
_Is_valid_vertex() : m_topol_traits(NULL) {}
|
_Is_valid_vertex() : m_topol_traits(nullptr) {}
|
||||||
|
|
||||||
_Is_valid_vertex(const Topology_traits* topol_traits) :
|
_Is_valid_vertex(const Topology_traits* topol_traits) :
|
||||||
m_topol_traits(topol_traits)
|
m_topol_traits(topol_traits)
|
||||||
|
|
@ -196,7 +196,7 @@ protected:
|
||||||
|
|
||||||
bool operator()(const DVertex& v) const
|
bool operator()(const DVertex& v) const
|
||||||
{
|
{
|
||||||
if (m_topol_traits == NULL)
|
if (m_topol_traits == nullptr)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return (m_topol_traits->is_valid_vertex(&v));
|
return (m_topol_traits->is_valid_vertex(&v));
|
||||||
|
|
@ -211,7 +211,7 @@ protected:
|
||||||
const Topology_traits* m_topol_traits;
|
const Topology_traits* m_topol_traits;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
_Is_valid_halfedge() : m_topol_traits(NULL) {}
|
_Is_valid_halfedge() : m_topol_traits(nullptr) {}
|
||||||
|
|
||||||
_Is_valid_halfedge(const Topology_traits* topol_traits) :
|
_Is_valid_halfedge(const Topology_traits* topol_traits) :
|
||||||
m_topol_traits(topol_traits)
|
m_topol_traits(topol_traits)
|
||||||
|
|
@ -219,7 +219,7 @@ protected:
|
||||||
|
|
||||||
bool operator()(const DHalfedge& he) const
|
bool operator()(const DHalfedge& he) const
|
||||||
{
|
{
|
||||||
if (m_topol_traits == NULL)
|
if (m_topol_traits == nullptr)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return (m_topol_traits->is_valid_halfedge(&he));
|
return (m_topol_traits->is_valid_halfedge(&he));
|
||||||
|
|
@ -234,7 +234,7 @@ protected:
|
||||||
const Topology_traits* m_topol_traits;
|
const Topology_traits* m_topol_traits;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
_Is_valid_face() : m_topol_traits(NULL) {}
|
_Is_valid_face() : m_topol_traits(nullptr) {}
|
||||||
|
|
||||||
_Is_valid_face(const Topology_traits* topol_traits) :
|
_Is_valid_face(const Topology_traits* topol_traits) :
|
||||||
m_topol_traits(topol_traits)
|
m_topol_traits(topol_traits)
|
||||||
|
|
@ -242,7 +242,7 @@ protected:
|
||||||
|
|
||||||
bool operator()(const DFace& f) const
|
bool operator()(const DFace& f) const
|
||||||
{
|
{
|
||||||
if (m_topol_traits == NULL)
|
if (m_topol_traits == nullptr)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
return (m_topol_traits->is_valid_face(&f));
|
return (m_topol_traits->is_valid_face(&f));
|
||||||
|
|
@ -257,7 +257,7 @@ protected:
|
||||||
const Topology_traits* m_topol_traits;
|
const Topology_traits* m_topol_traits;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
_Is_unbounded_face() : m_topol_traits(NULL) {}
|
_Is_unbounded_face() : m_topol_traits(nullptr) {}
|
||||||
|
|
||||||
_Is_unbounded_face(const Topology_traits* topol_traits) :
|
_Is_unbounded_face(const Topology_traits* topol_traits) :
|
||||||
m_topol_traits(topol_traits)
|
m_topol_traits(topol_traits)
|
||||||
|
|
@ -587,7 +587,7 @@ public:
|
||||||
const DHalfedge* he_curr = he_first;
|
const DHalfedge* he_curr = he_first;
|
||||||
Size n = 0;
|
Size n = 0;
|
||||||
|
|
||||||
if (he_curr != NULL) {
|
if (he_curr != nullptr) {
|
||||||
do {
|
do {
|
||||||
++n;
|
++n;
|
||||||
he_curr = he_curr->next()->opposite();
|
he_curr = he_curr->next()->opposite();
|
||||||
|
|
@ -1777,7 +1777,7 @@ protected:
|
||||||
* \return A pointer to a halfedge whose target is v, where cv should be
|
* \return A pointer to a halfedge whose target is v, where cv should be
|
||||||
* inserted between this halfedge and the next halfedge around this
|
* inserted between this halfedge and the next halfedge around this
|
||||||
* vertex (in a clockwise order).
|
* vertex (in a clockwise order).
|
||||||
* A NULL return value indicates a precondition violation.
|
* A nullptr return value indicates a precondition violation.
|
||||||
*/
|
*/
|
||||||
DHalfedge* _locate_around_vertex(DVertex* v, const X_monotone_curve_2& cv,
|
DHalfedge* _locate_around_vertex(DVertex* v, const X_monotone_curve_2& cv,
|
||||||
Arr_curve_end ind) const;
|
Arr_curve_end ind) const;
|
||||||
|
|
@ -2031,7 +2031,7 @@ protected:
|
||||||
* \param bx The boundary condition at the x-coordinate.
|
* \param bx The boundary condition at the x-coordinate.
|
||||||
* \param by The boundary condition at the y-coordinate.
|
* \param by The boundary condition at the y-coordinate.
|
||||||
* \param p_pred Output: The predecessor halfedge around this vertex
|
* \param p_pred Output: The predecessor halfedge around this vertex
|
||||||
* (may be NULL, if no such halfedge exists).
|
* (may be nullptr, if no such halfedge exists).
|
||||||
* \return The vertex that corresponds to the curve end.
|
* \return The vertex that corresponds to the curve end.
|
||||||
*/
|
*/
|
||||||
DVertex* _place_and_set_curve_end(DFace* f,
|
DVertex* _place_and_set_curve_end(DFace* f,
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,7 @@ public:
|
||||||
m_invalid_he()
|
m_invalid_he()
|
||||||
{
|
{
|
||||||
m_geom_traits = static_cast<const Traits_adaptor_2*>(arr.geometry_traits());
|
m_geom_traits = static_cast<const Traits_adaptor_2*>(arr.geometry_traits());
|
||||||
CGAL_assertion(visitor != NULL);
|
CGAL_assertion(visitor != nullptr);
|
||||||
|
|
||||||
// Initialize the visitor.
|
// Initialize the visitor.
|
||||||
visitor->init(&arr);
|
visitor->init(&arr);
|
||||||
|
|
|
||||||
|
|
@ -960,9 +960,9 @@ public:
|
||||||
|
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_at_limit_2,
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_at_limit_2,
|
||||||
compare_x_at_limit_2)
|
compare_x_at_limit_2)
|
||||||
// compare with NULL, in order to avoid a performance warning with VC++
|
// compare with nullptr, in order to avoid a performance warning with VC++
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
return compare_x_at_limit_2(
|
return compare_x_at_limit_2(
|
||||||
p, *dynamic_cast< const Kernel_arc_2* >(this), ce
|
p, *dynamic_cast< const Kernel_arc_2* >(this), ce
|
||||||
);
|
);
|
||||||
|
|
@ -990,7 +990,7 @@ public:
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_at_limit_2,
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_at_limit_2,
|
||||||
compare_x_at_limit_2)
|
compare_x_at_limit_2)
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
return compare_x_at_limit_2(
|
return compare_x_at_limit_2(
|
||||||
*dynamic_cast< const Kernel_arc_2* >(this), ce1, cv2, ce2
|
*dynamic_cast< const Kernel_arc_2* >(this), ce1, cv2, ce2
|
||||||
);
|
);
|
||||||
|
|
@ -1017,7 +1017,7 @@ public:
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_limit_2,
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_limit_2,
|
||||||
compare_x_near_limit_2)
|
compare_x_near_limit_2)
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
return compare_x_near_limit_2(
|
return compare_x_near_limit_2(
|
||||||
p, *dynamic_cast< const Kernel_arc_2* >(this), ce
|
p, *dynamic_cast< const Kernel_arc_2* >(this), ce
|
||||||
);
|
);
|
||||||
|
|
@ -1043,7 +1043,7 @@ public:
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_limit_2,
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_x_near_limit_2,
|
||||||
compare_x_near_limit_2)
|
compare_x_near_limit_2)
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
return compare_x_near_limit_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2, ce);
|
return compare_x_near_limit_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2, ce);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1068,7 +1068,7 @@ public:
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_near_boundary_2,
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_near_boundary_2,
|
||||||
compare_y_near_boundary_2)
|
compare_y_near_boundary_2)
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
return compare_y_near_boundary_2(
|
return compare_y_near_boundary_2(
|
||||||
*dynamic_cast< const Kernel_arc_2* >(this), cv2, ce
|
*dynamic_cast< const Kernel_arc_2* >(this), cv2, ce
|
||||||
);
|
);
|
||||||
|
|
@ -1090,7 +1090,7 @@ public:
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_2,
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_2,
|
||||||
compare_y_at_x_2)
|
compare_y_at_x_2)
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
return compare_y_at_x_2(p, *dynamic_cast< const Kernel_arc_2* >(this));
|
return compare_y_at_x_2(p, *dynamic_cast< const Kernel_arc_2* >(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1116,7 +1116,7 @@ public:
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_left_2,
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_left_2,
|
||||||
compare_y_at_x_left_2)
|
compare_y_at_x_left_2)
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
return compare_y_at_x_left_2(
|
return compare_y_at_x_left_2(
|
||||||
*dynamic_cast< const Kernel_arc_2* >(this), cv2, p
|
*dynamic_cast< const Kernel_arc_2* >(this), cv2, p
|
||||||
);
|
);
|
||||||
|
|
@ -1144,7 +1144,7 @@ public:
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_right_2,
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Compare_y_at_x_right_2,
|
||||||
compare_y_at_x_right_2)
|
compare_y_at_x_right_2)
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
return compare_y_at_x_right_2(
|
return compare_y_at_x_right_2(
|
||||||
*dynamic_cast< const Kernel_arc_2* >(this), cv2, p
|
*dynamic_cast< const Kernel_arc_2* >(this), cv2, p
|
||||||
);
|
);
|
||||||
|
|
@ -1161,18 +1161,18 @@ public:
|
||||||
* \return \c true, if p.x() is in x-range of arc, \c false otherwise
|
* \return \c true, if p.x() is in x-range of arc, \c false otherwise
|
||||||
*/
|
*/
|
||||||
bool is_in_x_range(const Coordinate_1& x,
|
bool is_in_x_range(const Coordinate_1& x,
|
||||||
bool *eq_min = NULL, bool *eq_max = NULL) const {
|
bool *eq_min = nullptr, bool *eq_max = nullptr) const {
|
||||||
|
|
||||||
if (eq_min != NULL && eq_max != NULL) {
|
if (eq_min != nullptr && eq_max != nullptr) {
|
||||||
*eq_min = *eq_max = false;
|
*eq_min = *eq_max = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_vertical()) {
|
if (is_vertical()) {
|
||||||
if (x == this->x()) {
|
if (x == this->x()) {
|
||||||
if (eq_min != NULL) {
|
if (eq_min != nullptr) {
|
||||||
*eq_min = true;
|
*eq_min = true;
|
||||||
}
|
}
|
||||||
if (eq_max != NULL) {
|
if (eq_max != nullptr) {
|
||||||
*eq_max = true;
|
*eq_max = true;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -1191,7 +1191,7 @@ public:
|
||||||
if (min_has_x) {
|
if (min_has_x) {
|
||||||
resmin = Curved_kernel_via_analysis_2::instance().
|
resmin = Curved_kernel_via_analysis_2::instance().
|
||||||
kernel().compare_1_object()(x, _minpoint().x());
|
kernel().compare_1_object()(x, _minpoint().x());
|
||||||
if (eq_min != NULL) { // TODO asymptotic end in x-range?
|
if (eq_min != nullptr) { // TODO asymptotic end in x-range?
|
||||||
*eq_min = (resmin == CGAL::EQUAL);
|
*eq_min = (resmin == CGAL::EQUAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1206,7 +1206,7 @@ public:
|
||||||
if (max_has_x) {
|
if (max_has_x) {
|
||||||
resmax = Curved_kernel_via_analysis_2::instance().
|
resmax = Curved_kernel_via_analysis_2::instance().
|
||||||
kernel().compare_1_object()(x, _maxpoint().x());
|
kernel().compare_1_object()(x, _maxpoint().x());
|
||||||
if (eq_max != NULL) { // TODO asymptotic end in x-range?
|
if (eq_max != nullptr) { // TODO asymptotic end in x-range?
|
||||||
*eq_max = (resmax == CGAL::EQUAL);
|
*eq_max = (resmax == CGAL::EQUAL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1246,7 +1246,7 @@ public:
|
||||||
equal_2)
|
equal_2)
|
||||||
|
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
return equal_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2);
|
return equal_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1262,7 +1262,7 @@ public:
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Do_overlap_2,
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Do_overlap_2,
|
||||||
do_overlap_2)
|
do_overlap_2)
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
return do_overlap_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2);
|
return do_overlap_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1345,7 +1345,7 @@ public:
|
||||||
intersect_2)
|
intersect_2)
|
||||||
|
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
return intersect_2(
|
return intersect_2(
|
||||||
*dynamic_cast< const Kernel_arc_2* >(this), cv2, oi
|
*dynamic_cast< const Kernel_arc_2* >(this), cv2, oi
|
||||||
);
|
);
|
||||||
|
|
@ -1449,7 +1449,7 @@ public:
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Trim_2, trim_2)
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Trim_2, trim_2)
|
||||||
|
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
return trim_2(*dynamic_cast< const Kernel_arc_2* >(this), p, q);
|
return trim_2(*dynamic_cast< const Kernel_arc_2* >(this), p, q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1467,7 +1467,7 @@ public:
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Split_2,
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Split_2,
|
||||||
split_2)
|
split_2)
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
split_2(*dynamic_cast< const Kernel_arc_2* >(this), p, s1, s2);
|
split_2(*dynamic_cast< const Kernel_arc_2* >(this), p, s1, s2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1483,7 +1483,7 @@ public:
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Are_mergeable_2,
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Are_mergeable_2,
|
||||||
are_mergeable_2)
|
are_mergeable_2)
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
return are_mergeable_2(
|
return are_mergeable_2(
|
||||||
*dynamic_cast< const Kernel_arc_2* >(this), cv2
|
*dynamic_cast< const Kernel_arc_2* >(this), cv2
|
||||||
);
|
);
|
||||||
|
|
@ -1503,7 +1503,7 @@ public:
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Merge_2, merge_2)
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_ARC(Merge_2, merge_2)
|
||||||
Kernel_arc_2 tmp;
|
Kernel_arc_2 tmp;
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
merge_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2, tmp);
|
merge_2(*dynamic_cast< const Kernel_arc_2* >(this), cv2, tmp);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
@ -1653,7 +1653,7 @@ public:
|
||||||
Kernel_arc_2& trimmed2) const {
|
Kernel_arc_2& trimmed2) const {
|
||||||
|
|
||||||
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_precondition(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2* >(this) != NULL);
|
dynamic_cast< const Kernel_arc_2* >(this) != nullptr);
|
||||||
|
|
||||||
const Kernel_arc_2& cv1 = static_cast< const Kernel_arc_2& >(*this);
|
const Kernel_arc_2& cv1 = static_cast< const Kernel_arc_2& >(*this);
|
||||||
|
|
||||||
|
|
@ -1956,7 +1956,7 @@ protected:
|
||||||
|
|
||||||
CGAL_precondition(!is_on_bottom_top(where));
|
CGAL_precondition(!is_on_bottom_top(where));
|
||||||
CGAL_assertion(Kernel_arc_2_equals_Arc_2 ||
|
CGAL_assertion(Kernel_arc_2_equals_Arc_2 ||
|
||||||
dynamic_cast< const Kernel_arc_2*>(this) != NULL);
|
dynamic_cast< const Kernel_arc_2*>(this) != nullptr);
|
||||||
Kernel_arc_2::simplify(*dynamic_cast< const Kernel_arc_2*>(this), cv2);
|
Kernel_arc_2::simplify(*dynamic_cast< const Kernel_arc_2*>(this), cv2);
|
||||||
if(curve().is_identical(cv2.curve()))
|
if(curve().is_identical(cv2.curve()))
|
||||||
return CGAL::sign(arcno() - cv2.arcno());
|
return CGAL::sign(arcno() - cv2.arcno());
|
||||||
|
|
|
||||||
|
|
@ -262,8 +262,8 @@ public:
|
||||||
class Allocator >
|
class Allocator >
|
||||||
inline void draw(const Arc_2& arc,
|
inline void draw(const Arc_2& arc,
|
||||||
Container< std::vector< Coord_2 >, Allocator >& pts,
|
Container< std::vector< Coord_2 >, Allocator >& pts,
|
||||||
boost::optional< Coord_2 > *end_pt1 = NULL,
|
boost::optional< Coord_2 > *end_pt1 = nullptr,
|
||||||
boost::optional< Coord_2 > *end_pt2 = NULL) {
|
boost::optional< Coord_2 > *end_pt2 = nullptr) {
|
||||||
|
|
||||||
#ifndef CGAL_CKVA_DUMMY_RENDERER
|
#ifndef CGAL_CKVA_DUMMY_RENDERER
|
||||||
Bbox_2 bbox;
|
Bbox_2 bbox;
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ public:
|
||||||
Curved_kernel_via_analysis_2_functor_base(
|
Curved_kernel_via_analysis_2_functor_base(
|
||||||
Curved_kernel_via_analysis_2 *kernel) :
|
Curved_kernel_via_analysis_2 *kernel) :
|
||||||
_m_curved_kernel(kernel) {
|
_m_curved_kernel(kernel) {
|
||||||
CGAL_precondition(kernel != NULL);
|
CGAL_precondition(kernel != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//!@}
|
//!@}
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ struct Make_x_monotone_2 :
|
||||||
*/
|
*/
|
||||||
Make_x_monotone_2(Curved_kernel_via_analysis_2 *kernel) :
|
Make_x_monotone_2(Curved_kernel_via_analysis_2 *kernel) :
|
||||||
_m_curved_kernel(kernel) {
|
_m_curved_kernel(kernel) {
|
||||||
CGAL_assertion(kernel != NULL);
|
CGAL_assertion(kernel != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
//!@}
|
//!@}
|
||||||
|
|
|
||||||
|
|
@ -504,7 +504,7 @@ public:
|
||||||
|
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Compare_x_2, compare_x_2)
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Compare_x_2, compare_x_2)
|
||||||
CGAL_precondition(Kernel_point_2_equals_Point_2 ||
|
CGAL_precondition(Kernel_point_2_equals_Point_2 ||
|
||||||
dynamic_cast< const Kernel_point_2* >(this) != NULL);
|
dynamic_cast< const Kernel_point_2* >(this) != nullptr);
|
||||||
return compare_x_2(*dynamic_cast< const Kernel_point_2* >(this), q);
|
return compare_x_2(*dynamic_cast< const Kernel_point_2* >(this), q);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -527,7 +527,7 @@ public:
|
||||||
|
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Compare_xy_2, compare_xy_2)
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Compare_xy_2, compare_xy_2)
|
||||||
CGAL_precondition(Kernel_point_2_equals_Point_2 ||
|
CGAL_precondition(Kernel_point_2_equals_Point_2 ||
|
||||||
dynamic_cast< const Kernel_point_2* >(this) != NULL);
|
dynamic_cast< const Kernel_point_2* >(this) != nullptr);
|
||||||
return compare_xy_2(
|
return compare_xy_2(
|
||||||
*dynamic_cast< const Kernel_point_2* >(this), q, equal_x
|
*dynamic_cast< const Kernel_point_2* >(this), q, equal_x
|
||||||
);
|
);
|
||||||
|
|
@ -547,7 +547,7 @@ public:
|
||||||
|
|
||||||
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Is_on_2, is_on_2)
|
CGAL_CKvA_2_GRAB_CK_FUNCTOR_FOR_POINT(Is_on_2, is_on_2)
|
||||||
CGAL_precondition(Kernel_point_2_equals_Point_2 ||
|
CGAL_precondition(Kernel_point_2_equals_Point_2 ||
|
||||||
dynamic_cast< const Kernel_point_2* >(this) != NULL);
|
dynamic_cast< const Kernel_point_2* >(this) != nullptr);
|
||||||
return is_on_2(*dynamic_cast< const Kernel_point_2* >(this), curve);
|
return is_on_2(*dynamic_cast< const Kernel_point_2* >(this), curve);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ public:
|
||||||
//! standard constructor
|
//! standard constructor
|
||||||
Compare_xy_2(SweepCurvesAdapter_2 *adapter) :
|
Compare_xy_2(SweepCurvesAdapter_2 *adapter) :
|
||||||
_m_adapter(adapter) {
|
_m_adapter(adapter) {
|
||||||
CGAL_assertion(adapter != NULL);
|
CGAL_assertion(adapter != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
result_type operator()(const Point_2& p1, const Point_2& p2) const {
|
result_type operator()(const Point_2& p1, const Point_2& p2) const {
|
||||||
|
|
@ -170,7 +170,7 @@ public:
|
||||||
//! standard constructor
|
//! standard constructor
|
||||||
Less_xy_2(SweepCurvesAdapter_2 *adapter) :
|
Less_xy_2(SweepCurvesAdapter_2 *adapter) :
|
||||||
_m_adapter(adapter) {
|
_m_adapter(adapter) {
|
||||||
CGAL_assertion(adapter != NULL);
|
CGAL_assertion(adapter != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -196,7 +196,7 @@ public:
|
||||||
//! standard constructor
|
//! standard constructor
|
||||||
Compare_y_at_x_2(SweepCurvesAdapter_2 *adapter) :
|
Compare_y_at_x_2(SweepCurvesAdapter_2 *adapter) :
|
||||||
_m_adapter(adapter) {
|
_m_adapter(adapter) {
|
||||||
CGAL_assertion(adapter != NULL);
|
CGAL_assertion(adapter != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
result_type operator()(const Arc_2& cv, const Point_2& p) const {
|
result_type operator()(const Arc_2& cv, const Point_2& p) const {
|
||||||
|
|
@ -322,7 +322,7 @@ public:
|
||||||
//! standard constructor
|
//! standard constructor
|
||||||
Equal_y_at_x_2(SweepCurvesAdapter_2 *adapter) :
|
Equal_y_at_x_2(SweepCurvesAdapter_2 *adapter) :
|
||||||
_m_adapter(adapter) {
|
_m_adapter(adapter) {
|
||||||
CGAL_assertion(adapter != NULL);
|
CGAL_assertion(adapter != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -425,7 +425,7 @@ public:
|
||||||
//! standard constructor
|
//! standard constructor
|
||||||
Source_2(SweepCurvesAdapter_2 *adapter) :
|
Source_2(SweepCurvesAdapter_2 *adapter) :
|
||||||
_m_adapter(adapter) {
|
_m_adapter(adapter) {
|
||||||
CGAL_assertion(adapter != NULL);
|
CGAL_assertion(adapter != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -452,7 +452,7 @@ public:
|
||||||
//! standard constructor
|
//! standard constructor
|
||||||
Target_2(SweepCurvesAdapter_2 *adapter) :
|
Target_2(SweepCurvesAdapter_2 *adapter) :
|
||||||
_m_adapter(adapter) {
|
_m_adapter(adapter) {
|
||||||
CGAL_assertion(adapter != NULL);
|
CGAL_assertion(adapter != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
@ -548,7 +548,7 @@ public:
|
||||||
//! standard constructor
|
//! standard constructor
|
||||||
New_endpoints_2(SweepCurvesAdapter_2 *adapter) :
|
New_endpoints_2(SweepCurvesAdapter_2 *adapter) :
|
||||||
_m_adapter(adapter) {
|
_m_adapter(adapter) {
|
||||||
CGAL_assertion(adapter != NULL);
|
CGAL_assertion(adapter != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!\brief
|
/*!\brief
|
||||||
|
|
@ -646,7 +646,7 @@ public:
|
||||||
//! standard constructor
|
//! standard constructor
|
||||||
Intersect_right_of_point_2(SweepCurvesAdapter_2 *adapter) :
|
Intersect_right_of_point_2(SweepCurvesAdapter_2 *adapter) :
|
||||||
_m_adapter(adapter) {
|
_m_adapter(adapter) {
|
||||||
CGAL_assertion(adapter != NULL);
|
CGAL_assertion(adapter != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!\brief
|
/*!\brief
|
||||||
|
|
@ -699,7 +699,7 @@ public:
|
||||||
//! standard constructor
|
//! standard constructor
|
||||||
Make_x_monotone_2(SweepCurvesAdapter_2 *adapter) :
|
Make_x_monotone_2(SweepCurvesAdapter_2 *adapter) :
|
||||||
_m_adapter(adapter) {
|
_m_adapter(adapter) {
|
||||||
CGAL_assertion(adapter != NULL);
|
CGAL_assertion(adapter != nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
|
||||||
|
|
@ -288,7 +288,7 @@ public:
|
||||||
//! \brief returns the drawing window and resolution
|
//! \brief returns the drawing window and resolution
|
||||||
void get_setup_parameters(CGAL::Bbox_2 *pbox, int& res_w_,
|
void get_setup_parameters(CGAL::Bbox_2 *pbox, int& res_w_,
|
||||||
int& res_h_) const {
|
int& res_h_) const {
|
||||||
if(pbox != NULL)
|
if(pbox != nullptr)
|
||||||
*pbox = engine.window;
|
*pbox = engine.window;
|
||||||
res_w_ = engine.res_w;
|
res_w_ = engine.res_w;
|
||||||
res_h_ = engine.res_h;
|
res_h_ = engine.res_h;
|
||||||
|
|
@ -332,7 +332,7 @@ private:
|
||||||
|
|
||||||
//! computes pixel coordinates from rational point
|
//! computes pixel coordinates from rational point
|
||||||
void get_pixel_coords(const Rational& x, const Rational& y,
|
void get_pixel_coords(const Rational& x, const Rational& y,
|
||||||
Pixel_2& pix, Rational *ppix_x=NULL, Rational *ppix_y=NULL)
|
Pixel_2& pix, Rational *ppix_x=nullptr, Rational *ppix_y=nullptr)
|
||||||
{
|
{
|
||||||
Rational p_x = (x - engine.x_min_r) / engine.pixel_w_r,
|
Rational p_x = (x - engine.x_min_r) / engine.pixel_w_r,
|
||||||
p_y = (y - engine.y_min_r) / engine.pixel_h_r;
|
p_y = (y - engine.y_min_r) / engine.pixel_h_r;
|
||||||
|
|
@ -344,7 +344,7 @@ private:
|
||||||
pix.x = static_cast<int>(std::floor(CGAL::to_double(p_x)));
|
pix.x = static_cast<int>(std::floor(CGAL::to_double(p_x)));
|
||||||
pix.y = static_cast<int>(std::floor(CGAL::to_double(p_y)));
|
pix.y = static_cast<int>(std::floor(CGAL::to_double(p_y)));
|
||||||
|
|
||||||
if(ppix_x != NULL && ppix_y != NULL) {
|
if(ppix_x != nullptr && ppix_y != nullptr) {
|
||||||
*ppix_x = p_x;
|
*ppix_x = p_x;
|
||||||
*ppix_y = p_y;
|
*ppix_y = p_y;
|
||||||
}
|
}
|
||||||
|
|
@ -428,8 +428,8 @@ template < class Coord_2, template < class, class > class Container,
|
||||||
class Allocator >
|
class Allocator >
|
||||||
void draw(const Arc_2& arc,
|
void draw(const Arc_2& arc,
|
||||||
Container< std::vector< Coord_2 >, Allocator >& points,
|
Container< std::vector< Coord_2 >, Allocator >& points,
|
||||||
boost::optional< Coord_2 > *end_pt1 = NULL,
|
boost::optional< Coord_2 > *end_pt1 = nullptr,
|
||||||
boost::optional< Coord_2 > *end_pt2 = NULL) {
|
boost::optional< Coord_2 > *end_pt2 = nullptr) {
|
||||||
|
|
||||||
#ifdef CGAL_CKVA_CR_TIMING
|
#ifdef CGAL_CKVA_CR_TIMING
|
||||||
refine_timer.start();
|
refine_timer.start();
|
||||||
|
|
@ -616,7 +616,7 @@ void draw(const Arc_2& arc,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CGAL_CKVA_RENDER_WITH_REFINEMENT
|
#ifdef CGAL_CKVA_RENDER_WITH_REFINEMENT
|
||||||
if(end_pt1 != NULL && loc_p1 == CGAL::ARR_INTERIOR &&
|
if(end_pt1 != nullptr && loc_p1 == CGAL::ARR_INTERIOR &&
|
||||||
(clip_src || y_lower < engine.y_min_r || y_lower > engine.y_max_r)) {
|
(clip_src || y_lower < engine.y_min_r || y_lower > engine.y_max_r)) {
|
||||||
y_lower0 = (clip_src ?
|
y_lower0 = (clip_src ?
|
||||||
get_endpoint_y(arc, lower0, CGAL::ARR_MIN_END, false,
|
get_endpoint_y(arc, lower0, CGAL::ARR_MIN_END, false,
|
||||||
|
|
@ -626,7 +626,7 @@ void draw(const Arc_2& arc,
|
||||||
*end_pt1 = Coord_2(CGAL::to_double(lower0),
|
*end_pt1 = Coord_2(CGAL::to_double(lower0),
|
||||||
CGAL::to_double(y_lower0));
|
CGAL::to_double(y_lower0));
|
||||||
}
|
}
|
||||||
if(end_pt2 != NULL && loc_p2 == CGAL::ARR_INTERIOR &&
|
if(end_pt2 != nullptr && loc_p2 == CGAL::ARR_INTERIOR &&
|
||||||
(clip_tgt || y_upper < engine.y_min_r || y_upper > engine.y_max_r)) {
|
(clip_tgt || y_upper < engine.y_min_r || y_upper > engine.y_max_r)) {
|
||||||
y_upper0 = (clip_tgt ?
|
y_upper0 = (clip_tgt ?
|
||||||
get_endpoint_y(arc, upper0, CGAL::ARR_MAX_END, false,
|
get_endpoint_y(arc, upper0, CGAL::ARR_MAX_END, false,
|
||||||
|
|
@ -650,9 +650,9 @@ void draw(const Arc_2& arc,
|
||||||
get_pixel_coords(upper, y_upper, pix_2);
|
get_pixel_coords(upper, y_upper, pix_2);
|
||||||
|
|
||||||
#ifndef CGAL_CKVA_RENDER_WITH_REFINEMENT
|
#ifndef CGAL_CKVA_RENDER_WITH_REFINEMENT
|
||||||
if(end_pt1 != NULL)
|
if(end_pt1 != nullptr)
|
||||||
*end_pt1 = Coord_2(pix_1.x, pix_1.y);
|
*end_pt1 = Coord_2(pix_1.x, pix_1.y);
|
||||||
if(end_pt2 != NULL)
|
if(end_pt2 != nullptr)
|
||||||
*end_pt2 = Coord_2(pix_2.x, pix_2.y);
|
*end_pt2 = Coord_2(pix_2.x, pix_2.y);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -321,11 +321,11 @@ public:
|
||||||
|
|
||||||
//! \brief evalutates a polynomial at certain x-coordinate
|
//! \brief evalutates a polynomial at certain x-coordinate
|
||||||
static NT evaluate(const Poly_1& poly, const NT& x,
|
static NT evaluate(const Poly_1& poly, const NT& x,
|
||||||
bool *error_bounds_ = NULL)
|
bool *error_bounds_ = nullptr)
|
||||||
{
|
{
|
||||||
typename Renderer_traits::Extract_eval extract;
|
typename Renderer_traits::Extract_eval extract;
|
||||||
int n = poly.degree()+1, m = (n-1)>>1, odd = n&1;
|
int n = poly.degree()+1, m = (n-1)>>1, odd = n&1;
|
||||||
if(error_bounds_ != NULL)
|
if(error_bounds_ != nullptr)
|
||||||
*error_bounds_ = false;
|
*error_bounds_ = false;
|
||||||
if(n == 1)
|
if(n == 1)
|
||||||
return extract(poly.lcoeff(), error_bounds_);
|
return extract(poly.lcoeff(), error_bounds_);
|
||||||
|
|
@ -479,7 +479,7 @@ bool setup(const CGAL::Bbox_2& box_, int res_w_, int res_h_)
|
||||||
pixel_w = (x_max - x_min) / res_w;
|
pixel_w = (x_max - x_min) / res_w;
|
||||||
pixel_h = (y_max - y_min) / res_h;
|
pixel_h = (y_max - y_min) / res_h;
|
||||||
|
|
||||||
//srand(time(NULL));
|
//srand(time(nullptr));
|
||||||
// from 0.1 to 0.5
|
// from 0.1 to 0.5
|
||||||
double rmin = 0.1, rmax = 0.5;
|
double rmin = 0.1, rmax = 0.5;
|
||||||
NT sx = pixel_w * static_cast<NT>(rmin +
|
NT sx = pixel_w * static_cast<NT>(rmin +
|
||||||
|
|
|
||||||
|
|
@ -223,8 +223,8 @@ struct Curve_renderer_traits_base
|
||||||
typedef Coeff result_type;
|
typedef Coeff result_type;
|
||||||
|
|
||||||
Coeff operator()(const Coeff& x,
|
Coeff operator()(const Coeff& x,
|
||||||
bool *error_bounds = NULL) const {
|
bool *error_bounds = nullptr) const {
|
||||||
if(error_bounds != NULL)
|
if(error_bounds != nullptr)
|
||||||
*error_bounds = false;
|
*error_bounds = false;
|
||||||
return x;
|
return x;
|
||||||
}
|
}
|
||||||
|
|
@ -309,13 +309,13 @@ struct Curve_renderer_traits<CGAL::Interval_nt<true>, CORE::BigRat > :
|
||||||
typedef Float result_type;
|
typedef Float result_type;
|
||||||
|
|
||||||
Float operator()(const Coeff& x,
|
Float operator()(const Coeff& x,
|
||||||
bool *error_bounds = NULL) const {
|
bool *error_bounds = nullptr) const {
|
||||||
bool err_bnd;
|
bool err_bnd;
|
||||||
// err_bnd = (CGAL_ABS(l) < 1E-15 || CGAL_ABS(u) < 1E-15) ||
|
// err_bnd = (CGAL_ABS(l) < 1E-15 || CGAL_ABS(u) < 1E-15) ||
|
||||||
// ((l <= 0 && u >= 0));
|
// ((l <= 0 && u >= 0));
|
||||||
Float l = x.inf(), u = x.sup(), mid = (l+u)/2;
|
Float l = x.inf(), u = x.sup(), mid = (l+u)/2;
|
||||||
err_bnd = ((l < 0 && u > 0)||(l == 0 && u == 0));
|
err_bnd = ((l < 0 && u > 0)||(l == 0 && u == 0));
|
||||||
if(error_bounds != NULL)
|
if(error_bounds != nullptr)
|
||||||
*error_bounds = err_bnd;
|
*error_bounds = err_bnd;
|
||||||
//! ATTENTION!!! if smth is screwed up try to uncomment the line below
|
//! ATTENTION!!! if smth is screwed up try to uncomment the line below
|
||||||
//! this is very crucial for performance & stability
|
//! this is very crucial for performance & stability
|
||||||
|
|
@ -456,13 +456,13 @@ struct Curve_renderer_traits<CGAL::Interval_nt<true>, leda::rational > :
|
||||||
typedef Float result_type;
|
typedef Float result_type;
|
||||||
|
|
||||||
Float operator()(const Coeff& x,
|
Float operator()(const Coeff& x,
|
||||||
bool *error_bounds = NULL) const {
|
bool *error_bounds = nullptr) const {
|
||||||
bool err_bnd;
|
bool err_bnd;
|
||||||
// err_bnd = (CGAL_ABS(l) < 1E-15 || CGAL_ABS(u) < 1E-15) ||
|
// err_bnd = (CGAL_ABS(l) < 1E-15 || CGAL_ABS(u) < 1E-15) ||
|
||||||
// ((l <= 0 && u >= 0));
|
// ((l <= 0 && u >= 0));
|
||||||
Float l = x.inf(), u = x.sup(), mid = (l+u)/2;
|
Float l = x.inf(), u = x.sup(), mid = (l+u)/2;
|
||||||
err_bnd = ((l < 0 && u > 0)||(l == 0 && u == 0));
|
err_bnd = ((l < 0 && u > 0)||(l == 0 && u == 0));
|
||||||
if(error_bounds != NULL)
|
if(error_bounds != nullptr)
|
||||||
*error_bounds = err_bnd;
|
*error_bounds = err_bnd;
|
||||||
//! ATTENTION!!! if smth is screwed up try to uncomment the line below
|
//! ATTENTION!!! if smth is screwed up try to uncomment the line below
|
||||||
//! this is very crucial for performance & stability
|
//! this is very crucial for performance & stability
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,7 @@ private:
|
||||||
template <class NT, class Algebraic_curve_2_>
|
template <class NT, class Algebraic_curve_2_>
|
||||||
void Subdivision_2<NT, Algebraic_curve_2_>::draw(QPainter *painter_)
|
void Subdivision_2<NT, Algebraic_curve_2_>::draw(QPainter *painter_)
|
||||||
{
|
{
|
||||||
if(!initialized||!polynomial_set||painter_==NULL)
|
if(!initialized||!polynomial_set||painter_==nullptr)
|
||||||
return;
|
return;
|
||||||
painter = painter_;
|
painter = painter_;
|
||||||
//std::cout << " P(x(y)): " << coeffs_x << std::endl;
|
//std::cout << " P(x(y)): " << coeffs_x << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -76,19 +76,19 @@ public:
|
||||||
|
|
||||||
/*! Default constructor.*/
|
/*! Default constructor.*/
|
||||||
Arr_text_formatter():
|
Arr_text_formatter():
|
||||||
m_out(NULL),
|
m_out(nullptr),
|
||||||
m_in(NULL)
|
m_in(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Construct an output formatter. */
|
/*! Construct an output formatter. */
|
||||||
Arr_text_formatter(std::ostream& os) :
|
Arr_text_formatter(std::ostream& os) :
|
||||||
m_out(&os),
|
m_out(&os),
|
||||||
m_in(NULL)
|
m_in(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Construct an input formatter. */
|
/*! Construct an input formatter. */
|
||||||
Arr_text_formatter(std::istream& is) :
|
Arr_text_formatter(std::istream& is) :
|
||||||
m_out(NULL),
|
m_out(nullptr),
|
||||||
m_in(&is)
|
m_in(&is)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
@ -111,14 +111,14 @@ public:
|
||||||
/*! Get the output stream. */
|
/*! Get the output stream. */
|
||||||
inline std::ostream& out()
|
inline std::ostream& out()
|
||||||
{
|
{
|
||||||
CGAL_assertion(m_out != NULL);
|
CGAL_assertion(m_out != nullptr);
|
||||||
return (*m_out);
|
return (*m_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Get the input stream. */
|
/*! Get the input stream. */
|
||||||
inline std::istream& in()
|
inline std::istream& in()
|
||||||
{
|
{
|
||||||
CGAL_assertion(m_in != NULL);
|
CGAL_assertion(m_in != nullptr);
|
||||||
return (*m_in);
|
return (*m_in);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -128,7 +128,7 @@ public:
|
||||||
/*! Write a begin-arrangement comment. */
|
/*! Write a begin-arrangement comment. */
|
||||||
void write_arrangement_begin()
|
void write_arrangement_begin()
|
||||||
{
|
{
|
||||||
CGAL_assertion(m_out != NULL);
|
CGAL_assertion(m_out != nullptr);
|
||||||
m_old_out_mode = get_mode(*m_out);
|
m_old_out_mode = get_mode(*m_out);
|
||||||
set_ascii_mode(*m_out);
|
set_ascii_mode(*m_out);
|
||||||
_write_comment("BEGIN ARRANGEMENT");
|
_write_comment("BEGIN ARRANGEMENT");
|
||||||
|
|
@ -285,7 +285,7 @@ public:
|
||||||
/*! Start reading an arrangement. */
|
/*! Start reading an arrangement. */
|
||||||
void read_arrangement_begin()
|
void read_arrangement_begin()
|
||||||
{
|
{
|
||||||
CGAL_assertion(m_in != NULL);
|
CGAL_assertion(m_in != nullptr);
|
||||||
m_old_in_mode = get_mode(*m_in);
|
m_old_in_mode = get_mode(*m_in);
|
||||||
set_ascii_mode(*m_in);
|
set_ascii_mode(*m_in);
|
||||||
_skip_comments();
|
_skip_comments();
|
||||||
|
|
@ -299,7 +299,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Read a size value (with a label comment line before it). */
|
/*! Read a size value (with a label comment line before it). */
|
||||||
Size read_size(const char* /* title */ = NULL)
|
Size read_size(const char* /* title */ = nullptr)
|
||||||
{
|
{
|
||||||
std::size_t val;
|
std::size_t val;
|
||||||
|
|
||||||
|
|
@ -448,7 +448,7 @@ protected:
|
||||||
/*! Skip until end of line. */
|
/*! Skip until end of line. */
|
||||||
void _skip_until_EOL()
|
void _skip_until_EOL()
|
||||||
{
|
{
|
||||||
CGAL_assertion(m_in != NULL);
|
CGAL_assertion(m_in != nullptr);
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
while ((c = m_in->get()) != EOF && c != '\n') {};
|
while ((c = m_in->get()) != EOF && c != '\n') {};
|
||||||
|
|
@ -457,7 +457,7 @@ protected:
|
||||||
/*! Skip comment lines. */
|
/*! Skip comment lines. */
|
||||||
void _skip_comments()
|
void _skip_comments()
|
||||||
{
|
{
|
||||||
CGAL_assertion(m_in != NULL);
|
CGAL_assertion(m_in != nullptr);
|
||||||
|
|
||||||
int c = m_in->get();
|
int c = m_in->get();
|
||||||
if (c == ' ')
|
if (c == ' ')
|
||||||
|
|
|
||||||
|
|
@ -124,7 +124,7 @@ namespace CGAL {
|
||||||
formatter.read_vertices_end();
|
formatter.read_vertices_end();
|
||||||
|
|
||||||
// Read the DCEL halfedges and store them in the halfedges vector.
|
// Read the DCEL halfedges and store them in the halfedges vector.
|
||||||
DHalfedge* he = NULL;
|
DHalfedge* he = nullptr;
|
||||||
formatter.read_edges_begin();
|
formatter.read_edges_begin();
|
||||||
|
|
||||||
m_halfedges.resize(number_of_halfedges);
|
m_halfedges.resize(number_of_halfedges);
|
||||||
|
|
@ -179,7 +179,7 @@ namespace CGAL {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Allocate a vertex at infinity.
|
// Allocate a vertex at infinity.
|
||||||
new_v = m_arr_access.new_vertex(NULL, ps_x, ps_y);
|
new_v = m_arr_access.new_vertex(nullptr, ps_x, ps_y);
|
||||||
}
|
}
|
||||||
|
|
||||||
formatter.read_vertex_end();
|
formatter.read_vertex_end();
|
||||||
|
|
@ -213,7 +213,7 @@ namespace CGAL {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Allocate a new fictitious edge.
|
// Allocate a new fictitious edge.
|
||||||
new_he = m_arr_access.new_edge(NULL);
|
new_he = m_arr_access.new_edge(nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the cross pointers between the twin halfedges and the end vertices.
|
// Set the cross pointers between the twin halfedges and the end vertices.
|
||||||
|
|
@ -276,7 +276,7 @@ namespace CGAL {
|
||||||
|
|
||||||
// Read the current outer CCB.
|
// Read the current outer CCB.
|
||||||
n = formatter.read_size("halfedges_on_outer_ccb");
|
n = formatter.read_size("halfedges_on_outer_ccb");
|
||||||
he = _read_ccb(formatter, n, new_occb, NULL);
|
he = _read_ccb(formatter, n, new_occb, nullptr);
|
||||||
new_f->add_outer_ccb(new_occb, he);
|
new_f->add_outer_ccb(new_occb, he);
|
||||||
}
|
}
|
||||||
formatter.read_outer_ccbs_end();
|
formatter.read_outer_ccbs_end();
|
||||||
|
|
@ -293,7 +293,7 @@ namespace CGAL {
|
||||||
|
|
||||||
// Read the current inner CCB.
|
// Read the current inner CCB.
|
||||||
n = formatter.read_size("halfedges_on_inner_ccb");
|
n = formatter.read_size("halfedges_on_inner_ccb");
|
||||||
he = _read_ccb(formatter, n, NULL, new_iccb);
|
he = _read_ccb(formatter, n, nullptr, new_iccb);
|
||||||
new_f->add_inner_ccb(new_iccb, he);
|
new_f->add_inner_ccb(new_iccb, he);
|
||||||
}
|
}
|
||||||
formatter.read_inner_ccbs_end();
|
formatter.read_inner_ccbs_end();
|
||||||
|
|
@ -331,7 +331,7 @@ namespace CGAL {
|
||||||
* \param boundary_size The number of halfedges along the boundary.
|
* \param boundary_size The number of halfedges along the boundary.
|
||||||
* \param p_outer The outer CCB.
|
* \param p_outer The outer CCB.
|
||||||
* \param p_inner The inner CCB.
|
* \param p_inner The inner CCB.
|
||||||
* \pre p_outer is valid and p_inner is NULL, or vice versa.
|
* \pre p_outer is valid and p_inner is nullptr, or vice versa.
|
||||||
* \return A pointer to the first halfedge read.
|
* \return A pointer to the first halfedge read.
|
||||||
*/
|
*/
|
||||||
template <class Formatter>
|
template <class Formatter>
|
||||||
|
|
@ -340,8 +340,8 @@ namespace CGAL {
|
||||||
DOuter_ccb* p_outer,
|
DOuter_ccb* p_outer,
|
||||||
DInner_ccb* p_inner)
|
DInner_ccb* p_inner)
|
||||||
{
|
{
|
||||||
CGAL_assertion((p_outer != NULL && p_inner == NULL) ||
|
CGAL_assertion((p_outer != nullptr && p_inner == nullptr) ||
|
||||||
(p_outer == NULL && p_inner != NULL));
|
(p_outer == nullptr && p_inner != nullptr));
|
||||||
|
|
||||||
formatter.read_ccb_halfedges_begin();
|
formatter.read_ccb_halfedges_begin();
|
||||||
|
|
||||||
|
|
@ -349,7 +349,7 @@ namespace CGAL {
|
||||||
std::size_t first_idx = formatter.read_halfedge_index();
|
std::size_t first_idx = formatter.read_halfedge_index();
|
||||||
DHalfedge* first_he = m_halfedges [first_idx];
|
DHalfedge* first_he = m_halfedges [first_idx];
|
||||||
|
|
||||||
if (p_outer != NULL)
|
if (p_outer != nullptr)
|
||||||
first_he->set_outer_ccb(p_outer);
|
first_he->set_outer_ccb(p_outer);
|
||||||
else
|
else
|
||||||
first_he->set_inner_ccb(p_inner);
|
first_he->set_inner_ccb(p_inner);
|
||||||
|
|
@ -369,7 +369,7 @@ namespace CGAL {
|
||||||
prev_he->set_next(curr_he);
|
prev_he->set_next(curr_he);
|
||||||
|
|
||||||
// Set the CCB.
|
// Set the CCB.
|
||||||
if (p_outer != NULL)
|
if (p_outer != nullptr)
|
||||||
curr_he->set_outer_ccb(p_outer);
|
curr_he->set_outer_ccb(p_outer);
|
||||||
else
|
else
|
||||||
curr_he->set_inner_ccb(p_inner);
|
curr_he->set_inner_ccb(p_inner);
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ namespace CGAL {
|
||||||
/*! Constructor. */
|
/*! Constructor. */
|
||||||
Arrangement_2_writer(const Arrangement_2& arr) :
|
Arrangement_2_writer(const Arrangement_2& arr) :
|
||||||
m_arr(arr),
|
m_arr(arr),
|
||||||
m_dcel(NULL),
|
m_dcel(nullptr),
|
||||||
m_curr_v(0),
|
m_curr_v(0),
|
||||||
m_curr_he(0)
|
m_curr_he(0)
|
||||||
{
|
{
|
||||||
|
|
@ -328,7 +328,7 @@ namespace CGAL {
|
||||||
/*! Get the number of edges along a given CCB. */
|
/*! Get the number of edges along a given CCB. */
|
||||||
std::size_t _circulator_size(const DHalfedge* ccb) const
|
std::size_t _circulator_size(const DHalfedge* ccb) const
|
||||||
{
|
{
|
||||||
CGAL_assertion(ccb != NULL);
|
CGAL_assertion(ccb != nullptr);
|
||||||
|
|
||||||
std::size_t n = 0;
|
std::size_t n = 0;
|
||||||
const DHalfedge* curr = ccb;
|
const DHalfedge* curr = ccb;
|
||||||
|
|
|
||||||
|
|
@ -1128,7 +1128,7 @@ public:
|
||||||
{
|
{
|
||||||
CGAL_precondition (_ofile.is_open());
|
CGAL_precondition (_ofile.is_open());
|
||||||
|
|
||||||
if (text == NULL || strlen(text) == 0)
|
if (text == nullptr || strlen(text) == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
_write_text (pos,
|
_write_text (pos,
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ template <typename Hlpr, typename Vis>
|
||||||
bool Arr_insertion_ss_visitor<Hlpr, Vis>::
|
bool Arr_insertion_ss_visitor<Hlpr, Vis>::
|
||||||
is_split_event(Subcurve* sc, Event* event)
|
is_split_event(Subcurve* sc, Event* event)
|
||||||
{
|
{
|
||||||
if (sc->last_curve().halfedge_handle() == Halfedge_handle(NULL)) return false;
|
if (sc->last_curve().halfedge_handle() == Halfedge_handle(nullptr)) return false;
|
||||||
|
|
||||||
if (! sc->originating_subcurve1())
|
if (! sc->originating_subcurve1())
|
||||||
return (sc->left_event() != this->current_event());
|
return (sc->left_event() != this->current_event());
|
||||||
|
|
|
||||||
|
|
@ -127,7 +127,7 @@ public:
|
||||||
// X_monotone_curve_2
|
// X_monotone_curve_2
|
||||||
for(; oi != oi_end; ++oi) {
|
for(; oi != oi_end; ++oi) {
|
||||||
base_overlap_cv = object_cast<Base_x_monotone_curve_2>(&(*oi));
|
base_overlap_cv = object_cast<Base_x_monotone_curve_2>(&(*oi));
|
||||||
if (base_overlap_cv != NULL) {
|
if (base_overlap_cv != nullptr) {
|
||||||
// Add halfedge handles to the resulting curve.
|
// Add halfedge handles to the resulting curve.
|
||||||
Halfedge_handle he;
|
Halfedge_handle he;
|
||||||
|
|
||||||
|
|
@ -144,7 +144,7 @@ public:
|
||||||
intersect_p =
|
intersect_p =
|
||||||
object_cast<std::pair<Base_point_2, unsigned int> >(&(*oi));
|
object_cast<std::pair<Base_point_2, unsigned int> >(&(*oi));
|
||||||
|
|
||||||
CGAL_assertion (intersect_p != NULL);
|
CGAL_assertion (intersect_p != nullptr);
|
||||||
|
|
||||||
*oi = make_object(std::make_pair(Point_2(intersect_p->first),
|
*oi = make_object(std::make_pair(Point_2(intersect_p->first),
|
||||||
intersect_p->second));
|
intersect_p->second));
|
||||||
|
|
|
||||||
|
|
@ -457,19 +457,19 @@ after_handle_event(Event* event, Status_line_iterator iter, bool flag)
|
||||||
// point, we update the top fictitious halfedges for all subcurves incident
|
// point, we update the top fictitious halfedges for all subcurves incident
|
||||||
// to this event.
|
// to this event.
|
||||||
Event_subcurve_reverse_iterator rev_iter = event->right_curves_rbegin();
|
Event_subcurve_reverse_iterator rev_iter = event->right_curves_rbegin();
|
||||||
Subcurve* sc_above = NULL;
|
Subcurve* sc_above = nullptr;
|
||||||
|
|
||||||
if (iter != this->status_line_end())
|
if (iter != this->status_line_end())
|
||||||
sc_above = (*iter);
|
sc_above = (*iter);
|
||||||
|
|
||||||
if (sc_above == NULL) {
|
if (sc_above == nullptr) {
|
||||||
if (rev_iter != event->right_curves_rend()) {
|
if (rev_iter != event->right_curves_rend()) {
|
||||||
if ((*rev_iter)->color() == Gt2::BLUE)
|
if ((*rev_iter)->color() == Gt2::BLUE)
|
||||||
(*rev_iter)->set_red_top_face(m_overlay_helper.red_top_face());
|
(*rev_iter)->set_red_top_face(m_overlay_helper.red_top_face());
|
||||||
else if ((*rev_iter)->color() == Gt2::RED)
|
else if ((*rev_iter)->color() == Gt2::RED)
|
||||||
(*rev_iter)->set_blue_top_face(m_overlay_helper.blue_top_face());
|
(*rev_iter)->set_blue_top_face(m_overlay_helper.blue_top_face());
|
||||||
|
|
||||||
(*rev_iter)->set_subcurve_above(NULL);
|
(*rev_iter)->set_subcurve_above(nullptr);
|
||||||
sc_above = *rev_iter;
|
sc_above = *rev_iter;
|
||||||
++rev_iter;
|
++rev_iter;
|
||||||
}
|
}
|
||||||
|
|
@ -484,7 +484,7 @@ after_handle_event(Event* event, Status_line_iterator iter, bool flag)
|
||||||
if (! curr_sc->has_same_color(sc_above))
|
if (! curr_sc->has_same_color(sc_above))
|
||||||
curr_sc->set_subcurve_above(sc_above);
|
curr_sc->set_subcurve_above(sc_above);
|
||||||
else {
|
else {
|
||||||
if (sc_above->subcurve_above() != NULL)
|
if (sc_above->subcurve_above() != nullptr)
|
||||||
curr_sc->set_subcurve_above(sc_above->subcurve_above());
|
curr_sc->set_subcurve_above(sc_above->subcurve_above());
|
||||||
else
|
else
|
||||||
curr_sc->set_top_face(sc_above);
|
curr_sc->set_top_face(sc_above);
|
||||||
|
|
@ -771,7 +771,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
|
||||||
// face. We have to find the identity of this containing blue face.
|
// face. We have to find the identity of this containing blue face.
|
||||||
Subcurve* sc_above = sc->subcurve_above();
|
Subcurve* sc_above = sc->subcurve_above();
|
||||||
red_face = red_he->face();
|
red_face = red_he->face();
|
||||||
blue_face = (sc_above != NULL) ?
|
blue_face = (sc_above != nullptr) ?
|
||||||
sc_above->blue_halfedge_handle()->face() : sc->blue_top_face();
|
sc_above->blue_halfedge_handle()->face() : sc->blue_top_face();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -781,7 +781,7 @@ insert_at_vertices(const X_monotone_curve_2& cv,
|
||||||
// face. We have to find the identity of this containing red face.
|
// face. We have to find the identity of this containing red face.
|
||||||
Subcurve* sc_above = sc->subcurve_above();
|
Subcurve* sc_above = sc->subcurve_above();
|
||||||
blue_face = blue_he->face();
|
blue_face = blue_he->face();
|
||||||
red_face = (sc_above != NULL) ?
|
red_face = (sc_above != nullptr) ?
|
||||||
sc_above->red_halfedge_handle()->face() : sc->red_top_face();
|
sc_above->red_halfedge_handle()->face() : sc->red_top_face();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -835,7 +835,7 @@ insert_isolated_vertex(const Point_2& pt,
|
||||||
// sufficient to go at most two steps up.
|
// sufficient to go at most two steps up.
|
||||||
// There is nothing above the vertex - use the current red top face.
|
// There is nothing above the vertex - use the current red top face.
|
||||||
Subcurve* sc_above = *iter;
|
Subcurve* sc_above = *iter;
|
||||||
if (sc_above == NULL) {
|
if (sc_above == nullptr) {
|
||||||
red_face = m_overlay_helper.red_top_face();
|
red_face = m_overlay_helper.red_top_face();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -844,7 +844,7 @@ insert_isolated_vertex(const Point_2& pt,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sc_above = sc_above->subcurve_above();
|
sc_above = sc_above->subcurve_above();
|
||||||
red_face = (sc_above != NULL) ?
|
red_face = (sc_above != nullptr) ?
|
||||||
sc_above->red_halfedge_handle()->face() :
|
sc_above->red_halfedge_handle()->face() :
|
||||||
m_overlay_helper.red_top_face();
|
m_overlay_helper.red_top_face();
|
||||||
}
|
}
|
||||||
|
|
@ -871,7 +871,7 @@ insert_isolated_vertex(const Point_2& pt,
|
||||||
// sufficient to go at most two steps up.
|
// sufficient to go at most two steps up.
|
||||||
// If we do not find a blue halfedge, we use the current red top face.
|
// If we do not find a blue halfedge, we use the current red top face.
|
||||||
Subcurve* sc_above = *iter;
|
Subcurve* sc_above = *iter;
|
||||||
if (sc_above == NULL) {
|
if (sc_above == nullptr) {
|
||||||
blue_face = m_overlay_helper.blue_top_face();
|
blue_face = m_overlay_helper.blue_top_face();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
@ -880,7 +880,7 @@ insert_isolated_vertex(const Point_2& pt,
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sc_above = sc_above->subcurve_above();
|
sc_above = sc_above->subcurve_above();
|
||||||
blue_face = (sc_above != NULL) ?
|
blue_face = (sc_above != nullptr) ?
|
||||||
sc_above->blue_halfedge_handle()->face() :
|
sc_above->blue_halfedge_handle()->face() :
|
||||||
m_overlay_helper.blue_top_face();
|
m_overlay_helper.blue_top_face();
|
||||||
}
|
}
|
||||||
|
|
@ -991,20 +991,20 @@ _create_vertex(Event* event,
|
||||||
(event->parameter_space_in_y() != ARR_INTERIOR))
|
(event->parameter_space_in_y() != ARR_INTERIOR))
|
||||||
{
|
{
|
||||||
if (!red_handle) {
|
if (!red_handle) {
|
||||||
CGAL_assertion(blue_handle != NULL);
|
CGAL_assertion(blue_handle != nullptr);
|
||||||
// Obtain the red face by looking for a subcurve above.
|
// Obtain the red face by looking for a subcurve above.
|
||||||
const Subcurve* sc_above = sc->subcurve_above();
|
const Subcurve* sc_above = sc->subcurve_above();
|
||||||
Face_handle_red red_f = (sc_above != NULL) ?
|
Face_handle_red red_f = (sc_above != nullptr) ?
|
||||||
sc_above->red_halfedge_handle()->face() : sc->red_top_face();
|
sc_above->red_halfedge_handle()->face() : sc->red_top_face();
|
||||||
Handle_info info = std::make_pair(Cell_handle_red(red_f), *blue_handle);
|
Handle_info info = std::make_pair(Cell_handle_red(red_f), *blue_handle);
|
||||||
m_vertices_map[new_v] = info;
|
m_vertices_map[new_v] = info;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!blue_handle) {
|
if (!blue_handle) {
|
||||||
CGAL_assertion(red_handle != NULL);
|
CGAL_assertion(red_handle != nullptr);
|
||||||
// Obtain the blue face by looking for a subcurve above.
|
// Obtain the blue face by looking for a subcurve above.
|
||||||
const Subcurve* sc_above = sc->subcurve_above();
|
const Subcurve* sc_above = sc->subcurve_above();
|
||||||
Face_handle_blue blue_f = (sc_above != NULL) ?
|
Face_handle_blue blue_f = (sc_above != nullptr) ?
|
||||||
sc_above->blue_halfedge_handle()->face() : sc->blue_top_face();
|
sc_above->blue_halfedge_handle()->face() : sc->blue_top_face();
|
||||||
Handle_info info = std::make_pair(*red_handle, Cell_handle_blue(blue_f));
|
Handle_info info = std::make_pair(*red_handle, Cell_handle_blue(blue_f));
|
||||||
m_vertices_map[new_v] = info;
|
m_vertices_map[new_v] = info;
|
||||||
|
|
@ -1034,10 +1034,10 @@ _create_vertex(Event* event,
|
||||||
// A blue vertex is located inside a red face. Obtain the red face
|
// A blue vertex is located inside a red face. Obtain the red face
|
||||||
// by looking for a subcurve above.
|
// by looking for a subcurve above.
|
||||||
const Subcurve* sc_above = sc->subcurve_above();
|
const Subcurve* sc_above = sc->subcurve_above();
|
||||||
Face_handle_red red_f = (sc_above != NULL) ?
|
Face_handle_red red_f = (sc_above != nullptr) ?
|
||||||
sc_above->red_halfedge_handle()->face() : sc->red_top_face();
|
sc_above->red_halfedge_handle()->face() : sc->red_top_face();
|
||||||
|
|
||||||
CGAL_assertion(blue_handle != NULL);
|
CGAL_assertion(blue_handle != nullptr);
|
||||||
const Vertex_handle_blue& blue_v =
|
const Vertex_handle_blue& blue_v =
|
||||||
boost::get<Vertex_handle_blue>(*blue_handle);
|
boost::get<Vertex_handle_blue>(*blue_handle);
|
||||||
m_overlay_traits->create_vertex(red_f, blue_v, new_v);
|
m_overlay_traits->create_vertex(red_f, blue_v, new_v);
|
||||||
|
|
@ -1048,10 +1048,10 @@ _create_vertex(Event* event,
|
||||||
// A red vertex is located inside a blue face. Obtain the blue face
|
// A red vertex is located inside a blue face. Obtain the blue face
|
||||||
// by looking for a subcurve above.
|
// by looking for a subcurve above.
|
||||||
const Subcurve* sc_above = sc->subcurve_above();
|
const Subcurve* sc_above = sc->subcurve_above();
|
||||||
Face_handle_blue blue_f = (sc_above != NULL) ?
|
Face_handle_blue blue_f = (sc_above != nullptr) ?
|
||||||
sc_above->blue_halfedge_handle()->face() : sc->blue_top_face();
|
sc_above->blue_halfedge_handle()->face() : sc->blue_top_face();
|
||||||
|
|
||||||
CGAL_assertion(red_handle != NULL);
|
CGAL_assertion(red_handle != nullptr);
|
||||||
const Vertex_handle_red& red_v =
|
const Vertex_handle_red& red_v =
|
||||||
boost::get<Vertex_handle_red>(*red_handle);
|
boost::get<Vertex_handle_red>(*red_handle);
|
||||||
m_overlay_traits->create_vertex(red_v, blue_f, new_v);
|
m_overlay_traits->create_vertex(red_v, blue_f, new_v);
|
||||||
|
|
@ -1088,7 +1088,7 @@ _create_edge(Subcurve* sc,
|
||||||
// We have a red edge on a blue face.
|
// We have a red edge on a blue face.
|
||||||
Halfedge_handle_red red_he = sc->red_halfedge_handle();
|
Halfedge_handle_red red_he = sc->red_halfedge_handle();
|
||||||
Subcurve* sc_above = sc->subcurve_above();
|
Subcurve* sc_above = sc->subcurve_above();
|
||||||
Face_handle_blue blue_f = (sc_above != NULL) ?
|
Face_handle_blue blue_f = (sc_above != nullptr) ?
|
||||||
sc_above->blue_halfedge_handle()->face() : sc->blue_top_face();
|
sc_above->blue_halfedge_handle()->face() : sc->blue_top_face();
|
||||||
m_overlay_traits->create_edge(red_he, blue_f, new_he);
|
m_overlay_traits->create_edge(red_he, blue_f, new_he);
|
||||||
}
|
}
|
||||||
|
|
@ -1098,7 +1098,7 @@ _create_edge(Subcurve* sc,
|
||||||
// We have a blue edge on a red face.
|
// We have a blue edge on a red face.
|
||||||
Halfedge_handle_blue blue_he = sc->blue_halfedge_handle();
|
Halfedge_handle_blue blue_he = sc->blue_halfedge_handle();
|
||||||
Subcurve* sc_above = sc->subcurve_above();
|
Subcurve* sc_above = sc->subcurve_above();
|
||||||
Face_handle_red red_f = (sc_above != NULL) ?
|
Face_handle_red red_f = (sc_above != nullptr) ?
|
||||||
sc_above->red_halfedge_handle()->face() : sc->red_top_face();
|
sc_above->red_halfedge_handle()->face() : sc->red_top_face();
|
||||||
m_overlay_traits->create_edge(red_f, blue_he, new_he);
|
m_overlay_traits->create_edge(red_f, blue_he, new_he);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,7 @@ protected:
|
||||||
union {
|
union {
|
||||||
const Face_red* red;
|
const Face_red* red;
|
||||||
const Face_blue* blue;
|
const Face_blue* blue;
|
||||||
} m_top_face; // If m_above is NULL, points the top face in
|
} m_top_face; // If m_above is nullptr, points the top face in
|
||||||
// the arrangement of the opposite color that
|
// the arrangement of the opposite color that
|
||||||
// contains the subcurve.
|
// contains the subcurve.
|
||||||
|
|
||||||
|
|
@ -102,14 +102,14 @@ public:
|
||||||
/*! Constructor. */
|
/*! Constructor. */
|
||||||
Arr_overlay_subcurve() :
|
Arr_overlay_subcurve() :
|
||||||
Base(),
|
Base(),
|
||||||
m_above(NULL)
|
m_above(nullptr)
|
||||||
{ m_top_face.red = NULL; }
|
{ m_top_face.red = nullptr; }
|
||||||
|
|
||||||
/*! constructor given a curve. */
|
/*! constructor given a curve. */
|
||||||
Arr_overlay_subcurve(const X_monotone_curve_2& curve) :
|
Arr_overlay_subcurve(const X_monotone_curve_2& curve) :
|
||||||
Base(curve),
|
Base(curve),
|
||||||
m_above(NULL)
|
m_above(nullptr)
|
||||||
{ m_top_face.red = NULL; }
|
{ m_top_face.red = nullptr; }
|
||||||
|
|
||||||
/*! Get the subcurve lying above above this subcurve in the status line. */
|
/*! Get the subcurve lying above above this subcurve in the status line. */
|
||||||
Self* subcurve_above() const { return m_above; }
|
Self* subcurve_above() const { return m_above; }
|
||||||
|
|
@ -149,10 +149,10 @@ public:
|
||||||
/*! Copy the top face from the given subcurve. */
|
/*! Copy the top face from the given subcurve. */
|
||||||
void set_top_face(const Self* sc)
|
void set_top_face(const Self* sc)
|
||||||
{
|
{
|
||||||
CGAL_precondition(sc->m_above == NULL);
|
CGAL_precondition(sc->m_above == nullptr);
|
||||||
|
|
||||||
// Mark there is no curve above and copy the face pointer.
|
// Mark there is no curve above and copy the face pointer.
|
||||||
m_above = NULL;
|
m_above = nullptr;
|
||||||
m_top_face.red = sc->m_top_face.red;
|
m_top_face.red = sc->m_top_face.red;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -314,25 +314,25 @@ public:
|
||||||
void set_blue_cell(const Optional_cell_blue& cell_blue)
|
void set_blue_cell(const Optional_cell_blue& cell_blue)
|
||||||
{ m_blue_cell = cell_blue; }
|
{ m_blue_cell = cell_blue; }
|
||||||
|
|
||||||
/*! Obtain the red cell handle or NULL if it doesn't exist. */
|
/*! Obtain the red cell handle or nullptr if it doesn't exist. */
|
||||||
const Cell_handle_red* red_cell_handle() const
|
const Cell_handle_red* red_cell_handle() const
|
||||||
{ return m_red_cell ? &(*m_red_cell) : NULL; }
|
{ return m_red_cell ? &(*m_red_cell) : nullptr; }
|
||||||
|
|
||||||
/*! Obtain the blue cell handle or NULL if it doesn't exist. */
|
/*! Obtain the blue cell handle or nullptr if it doesn't exist. */
|
||||||
const Cell_handle_blue* blue_cell_handle() const
|
const Cell_handle_blue* blue_cell_handle() const
|
||||||
{ return m_blue_cell ? &(*m_blue_cell) : NULL; }
|
{ return m_blue_cell ? &(*m_blue_cell) : nullptr; }
|
||||||
|
|
||||||
/*! Obtain the red vertex handle or NULL if it doesn't exist. */
|
/*! Obtain the red vertex handle or nullptr if it doesn't exist. */
|
||||||
const Vertex_handle_red* red_vertex_handle() const
|
const Vertex_handle_red* red_vertex_handle() const
|
||||||
{
|
{
|
||||||
return m_red_cell ? boost::get<Vertex_handle_red>(&(*m_red_cell)) : NULL;
|
return m_red_cell ? boost::get<Vertex_handle_red>(&(*m_red_cell)) : nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Obtain the blue vertex handle or NULL if it doesn't exist. */
|
/*! Obtain the blue vertex handle or nullptr if it doesn't exist. */
|
||||||
const Vertex_handle_blue* blue_vertex_handle() const
|
const Vertex_handle_blue* blue_vertex_handle() const
|
||||||
{
|
{
|
||||||
return
|
return
|
||||||
m_blue_cell ? boost::get<Vertex_handle_blue>(&(*m_blue_cell)) : NULL;
|
m_blue_cell ? boost::get<Vertex_handle_blue>(&(*m_blue_cell)) : nullptr;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -437,7 +437,7 @@ public:
|
||||||
while (oi != oi_end) {
|
while (oi != oi_end) {
|
||||||
base_ipt = object_cast<std::pair<Base_point_2, unsigned int> >(&(*oi));
|
base_ipt = object_cast<std::pair<Base_point_2, unsigned int> >(&(*oi));
|
||||||
|
|
||||||
if (base_ipt != NULL) {
|
if (base_ipt != nullptr) {
|
||||||
// We have a red-blue intersection point, so we attach the
|
// We have a red-blue intersection point, so we attach the
|
||||||
// intersecting red and blue halfedges to it.
|
// intersecting red and blue halfedges to it.
|
||||||
Optional_cell_red red_cell;
|
Optional_cell_red red_cell;
|
||||||
|
|
@ -464,7 +464,7 @@ public:
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
overlap_xcv = object_cast<Base_x_monotone_curve_2>(&(*oi));
|
overlap_xcv = object_cast<Base_x_monotone_curve_2>(&(*oi));
|
||||||
CGAL_assertion(overlap_xcv != NULL);
|
CGAL_assertion(overlap_xcv != nullptr);
|
||||||
|
|
||||||
// We have a red-blue overlap, so we mark the curve accordingly.
|
// We have a red-blue overlap, so we mark the curve accordingly.
|
||||||
Halfedge_handle_red red_he;
|
Halfedge_handle_red red_he;
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ For convenience, the type `edge_descriptor` is hashable using the functor `CGAL:
|
||||||
<ul>
|
<ul>
|
||||||
<li> The item class used by `CGAL::Linear_cell_complex_for_combinatorial_map` must have both 0-attributes and 2-attributes enabled.</li>
|
<li> The item class used by `CGAL::Linear_cell_complex_for_combinatorial_map` must have both 0-attributes and 2-attributes enabled.</li>
|
||||||
|
|
||||||
<li> No dart is 1-free, nor 2-free. Holes in a mesh are represented by using the same convention than for `CGAL::Polyhedron_3` and `CGAL::Surface_mesh`: a dart <code>d</code> belongs to a border if the 2-attribute of <code>beta<2>(d)</code> is NULL.</li>
|
<li> No dart is 1-free, nor 2-free. Holes in a mesh are represented by using the same convention than for `CGAL::Polyhedron_3` and `CGAL::Surface_mesh`: a dart <code>d</code> belongs to a border if the 2-attribute of <code>beta<2>(d)</code> is nullptr.</li>
|
||||||
|
|
||||||
<li> All darts of the linear cell complexes must be associated with a 2-attribute, except darts that represent holes.</li>
|
<li> All darts of the linear cell complexes must be associated with a 2-attribute, except darts that represent holes.</li>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -370,12 +370,12 @@ struct Face_filtered_graph
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Is_simplex_valid()
|
Is_simplex_valid()
|
||||||
:adapter(NULL)
|
:adapter(nullptr)
|
||||||
{}
|
{}
|
||||||
template<typename Simplex>
|
template<typename Simplex>
|
||||||
bool operator()(Simplex s)
|
bool operator()(Simplex s)
|
||||||
{
|
{
|
||||||
CGAL_assertion(adapter!=NULL);
|
CGAL_assertion(adapter!=nullptr);
|
||||||
return (adapter->is_in_cc(s));
|
return (adapter->is_in_cc(s));
|
||||||
}
|
}
|
||||||
const Self* adapter;
|
const Self* adapter;
|
||||||
|
|
|
||||||
|
|
@ -44,11 +44,11 @@ public:
|
||||||
Descriptor descriptor;
|
Descriptor descriptor;
|
||||||
|
|
||||||
Gwdwg_descriptor()
|
Gwdwg_descriptor()
|
||||||
: graph(NULL), descriptor()
|
: graph(nullptr), descriptor()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Gwdwg_descriptor(Descriptor descriptor)
|
Gwdwg_descriptor(Descriptor descriptor)
|
||||||
: graph(NULL), descriptor(descriptor)
|
: graph(nullptr), descriptor(descriptor)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Gwdwg_descriptor(Descriptor descriptor, Graph& graph)
|
Gwdwg_descriptor(Descriptor descriptor, Graph& graph)
|
||||||
|
|
@ -60,7 +60,7 @@ template<typename Graph,typename Descriptor>
|
||||||
bool operator==(const Gwdwg_descriptor<Graph,Descriptor>& lhs,
|
bool operator==(const Gwdwg_descriptor<Graph,Descriptor>& lhs,
|
||||||
const Gwdwg_descriptor<Graph,Descriptor>& rhs)
|
const Gwdwg_descriptor<Graph,Descriptor>& rhs)
|
||||||
{
|
{
|
||||||
CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==NULL || lhs.graph==NULL);
|
CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==nullptr || lhs.graph==nullptr);
|
||||||
return lhs.descriptor == rhs.descriptor;
|
return lhs.descriptor == rhs.descriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -75,7 +75,7 @@ template<typename Graph,typename Descriptor>
|
||||||
bool operator<(const Gwdwg_descriptor<Graph,Descriptor>& lhs,
|
bool operator<(const Gwdwg_descriptor<Graph,Descriptor>& lhs,
|
||||||
const Gwdwg_descriptor<Graph,Descriptor>& rhs)
|
const Gwdwg_descriptor<Graph,Descriptor>& rhs)
|
||||||
{
|
{
|
||||||
CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==NULL || lhs.graph==NULL);
|
CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==nullptr || lhs.graph==nullptr);
|
||||||
return lhs.descriptor < rhs.descriptor;
|
return lhs.descriptor < rhs.descriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -83,7 +83,7 @@ template<typename Graph,typename Descriptor>
|
||||||
bool operator>(const Gwdwg_descriptor<Graph,Descriptor>& lhs,
|
bool operator>(const Gwdwg_descriptor<Graph,Descriptor>& lhs,
|
||||||
const Gwdwg_descriptor<Graph,Descriptor>& rhs)
|
const Gwdwg_descriptor<Graph,Descriptor>& rhs)
|
||||||
{
|
{
|
||||||
CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==NULL || lhs.graph==NULL);
|
CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==nullptr || lhs.graph==nullptr);
|
||||||
return lhs.descriptor > rhs.descriptor;
|
return lhs.descriptor > rhs.descriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -91,7 +91,7 @@ template<typename Graph,typename Descriptor>
|
||||||
bool operator<=(const Gwdwg_descriptor<Graph,Descriptor>& lhs,
|
bool operator<=(const Gwdwg_descriptor<Graph,Descriptor>& lhs,
|
||||||
const Gwdwg_descriptor<Graph,Descriptor>& rhs)
|
const Gwdwg_descriptor<Graph,Descriptor>& rhs)
|
||||||
{
|
{
|
||||||
CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==NULL || lhs.graph==NULL);
|
CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==nullptr || lhs.graph==nullptr);
|
||||||
return lhs.descriptor <= rhs.descriptor;
|
return lhs.descriptor <= rhs.descriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -99,7 +99,7 @@ template<typename Graph,typename Descriptor>
|
||||||
bool operator>=(const Gwdwg_descriptor<Graph,Descriptor>& lhs,
|
bool operator>=(const Gwdwg_descriptor<Graph,Descriptor>& lhs,
|
||||||
const Gwdwg_descriptor<Graph,Descriptor>& rhs)
|
const Gwdwg_descriptor<Graph,Descriptor>& rhs)
|
||||||
{
|
{
|
||||||
CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==NULL || lhs.graph==NULL);
|
CGAL_assertion( lhs.graph == rhs.graph || rhs.graph==nullptr || lhs.graph==nullptr);
|
||||||
return lhs.descriptor >= rhs.descriptor;
|
return lhs.descriptor >= rhs.descriptor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -142,7 +142,7 @@ struct Graph_with_descriptor_with_graph
|
||||||
typedef Gwdwg_descriptor<Graph, typename gt::face_descriptor> face_descriptor;
|
typedef Gwdwg_descriptor<Graph, typename gt::face_descriptor> face_descriptor;
|
||||||
|
|
||||||
Graph_with_descriptor_with_graph()
|
Graph_with_descriptor_with_graph()
|
||||||
: graph(NULL)
|
: graph(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Graph_with_descriptor_with_graph(Graph& graph)
|
Graph_with_descriptor_with_graph(Graph& graph)
|
||||||
|
|
@ -156,7 +156,7 @@ struct Descriptor2Descriptor: public CGAL::cpp98::unary_function<Graph_descripto
|
||||||
{
|
{
|
||||||
|
|
||||||
Descriptor2Descriptor()
|
Descriptor2Descriptor()
|
||||||
: graph(NULL)
|
: graph(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Descriptor2Descriptor(Graph& graph)
|
Descriptor2Descriptor(Graph& graph)
|
||||||
|
|
@ -166,7 +166,7 @@ struct Descriptor2Descriptor: public CGAL::cpp98::unary_function<Graph_descripto
|
||||||
Descriptor
|
Descriptor
|
||||||
operator()(Graph_descriptor gd) const
|
operator()(Graph_descriptor gd) const
|
||||||
{
|
{
|
||||||
CGAL_assertion(graph!=NULL);
|
CGAL_assertion(graph!=nullptr);
|
||||||
return Descriptor(gd,*graph);
|
return Descriptor(gd,*graph);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -716,7 +716,7 @@ struct Graph_with_descriptor_with_graph_property_map {
|
||||||
PM pm;
|
PM pm;
|
||||||
|
|
||||||
Graph_with_descriptor_with_graph_property_map()
|
Graph_with_descriptor_with_graph_property_map()
|
||||||
: graph(NULL)
|
: graph(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Graph_with_descriptor_with_graph_property_map(const Graph& graph, const PM& pm)
|
Graph_with_descriptor_with_graph_property_map(const Graph& graph, const PM& pm)
|
||||||
|
|
@ -728,7 +728,7 @@ struct Graph_with_descriptor_with_graph_property_map {
|
||||||
reference
|
reference
|
||||||
get(const Graph_with_descriptor_with_graph_property_map<Graph,PM>& gpm, const Descriptor& d)
|
get(const Graph_with_descriptor_with_graph_property_map<Graph,PM>& gpm, const Descriptor& d)
|
||||||
{
|
{
|
||||||
CGAL_assertion(gpm.graph!=NULL);
|
CGAL_assertion(gpm.graph!=nullptr);
|
||||||
CGAL_assertion(d.graph == gpm.graph);
|
CGAL_assertion(d.graph == gpm.graph);
|
||||||
return get(gpm.pm, d.descriptor);
|
return get(gpm.pm, d.descriptor);
|
||||||
}
|
}
|
||||||
|
|
@ -738,7 +738,7 @@ struct Graph_with_descriptor_with_graph_property_map {
|
||||||
void
|
void
|
||||||
put(const Graph_with_descriptor_with_graph_property_map<Graph,PM>& gpm, const Descriptor& d, const value_type& v)
|
put(const Graph_with_descriptor_with_graph_property_map<Graph,PM>& gpm, const Descriptor& d, const value_type& v)
|
||||||
{
|
{
|
||||||
CGAL_assertion(gpm.graph!=NULL);
|
CGAL_assertion(gpm.graph!=nullptr);
|
||||||
CGAL_assertion(d.graph == gpm.graph);
|
CGAL_assertion(d.graph == gpm.graph);
|
||||||
put(gpm.pm, d.descriptor, v);
|
put(gpm.pm, d.descriptor, v);
|
||||||
}
|
}
|
||||||
|
|
@ -762,7 +762,7 @@ struct Graph_with_descriptor_with_graph_property_map<Graph, PM, boost::lvalue_pr
|
||||||
}
|
}
|
||||||
|
|
||||||
Graph_with_descriptor_with_graph_property_map()
|
Graph_with_descriptor_with_graph_property_map()
|
||||||
: graph(NULL)
|
: graph(nullptr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Graph_with_descriptor_with_graph_property_map(const Graph& graph, const PM& pm)
|
Graph_with_descriptor_with_graph_property_map(const Graph& graph, const PM& pm)
|
||||||
|
|
@ -774,7 +774,7 @@ struct Graph_with_descriptor_with_graph_property_map<Graph, PM, boost::lvalue_pr
|
||||||
reference
|
reference
|
||||||
get(const Graph_with_descriptor_with_graph_property_map<Graph,PM>& gpm, const Descriptor& d)
|
get(const Graph_with_descriptor_with_graph_property_map<Graph,PM>& gpm, const Descriptor& d)
|
||||||
{
|
{
|
||||||
CGAL_assertion(gpm.graph!=NULL);
|
CGAL_assertion(gpm.graph!=nullptr);
|
||||||
CGAL_assertion(d.graph == gpm.graph);
|
CGAL_assertion(d.graph == gpm.graph);
|
||||||
return get(gpm.pm, d.descriptor);
|
return get(gpm.pm, d.descriptor);
|
||||||
}
|
}
|
||||||
|
|
@ -784,7 +784,7 @@ struct Graph_with_descriptor_with_graph_property_map<Graph, PM, boost::lvalue_pr
|
||||||
void
|
void
|
||||||
put(const Graph_with_descriptor_with_graph_property_map<Graph,PM>& gpm, const Descriptor& d, const value_type& v)
|
put(const Graph_with_descriptor_with_graph_property_map<Graph,PM>& gpm, const Descriptor& d, const value_type& v)
|
||||||
{
|
{
|
||||||
CGAL_assertion(gpm.graph!=NULL);
|
CGAL_assertion(gpm.graph!=nullptr);
|
||||||
CGAL_assertion(d.graph == gpm.graph);
|
CGAL_assertion(d.graph == gpm.graph);
|
||||||
put(gpm.pm, d.descriptor, v);
|
put(gpm.pm, d.descriptor, v);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -97,11 +97,11 @@ void partition_dual_graph(const TriangleMesh& tm,
|
||||||
|
|
||||||
// partition info for the nodes
|
// partition info for the nodes
|
||||||
idx_t* npart = (idx_t*) calloc(num_vertices(tm), sizeof(idx_t));
|
idx_t* npart = (idx_t*) calloc(num_vertices(tm), sizeof(idx_t));
|
||||||
CGAL_assertion(npart != NULL);
|
CGAL_assertion(npart != nullptr);
|
||||||
|
|
||||||
// partition info for the elements
|
// partition info for the elements
|
||||||
idx_t* epart = (idx_t*) calloc(num_faces(tm), sizeof(idx_t));
|
idx_t* epart = (idx_t*) calloc(num_faces(tm), sizeof(idx_t));
|
||||||
CGAL_assertion(epart != NULL);
|
CGAL_assertion(epart != nullptr);
|
||||||
|
|
||||||
// do not support Fortran-style arrays
|
// do not support Fortran-style arrays
|
||||||
CGAL_assertion((*options)[METIS_OPTION_NUMBERING] == -1 || // default initialization is '-1'
|
CGAL_assertion((*options)[METIS_OPTION_NUMBERING] == -1 || // default initialization is '-1'
|
||||||
|
|
@ -109,9 +109,9 @@ void partition_dual_graph(const TriangleMesh& tm,
|
||||||
|
|
||||||
CGAL_assertion_code(int ret =)
|
CGAL_assertion_code(int ret =)
|
||||||
METIS_PartMeshDual(&ne, &nn, eptr, eind,
|
METIS_PartMeshDual(&ne, &nn, eptr, eind,
|
||||||
NULL /* elements weights*/, NULL /*elements sizes*/,
|
nullptr /* elements weights*/, nullptr /*elements sizes*/,
|
||||||
&ncommon, &nparts,
|
&ncommon, &nparts,
|
||||||
NULL /* partitions weights */,
|
nullptr /* partitions weights */,
|
||||||
*options,
|
*options,
|
||||||
&objval, epart, npart);
|
&objval, epart, npart);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -129,11 +129,11 @@ void partition_graph(const TriangleMesh& tm,
|
||||||
|
|
||||||
// partition info for the nodes
|
// partition info for the nodes
|
||||||
idx_t* npart = (idx_t*) calloc(num_vertices(tm), sizeof(idx_t));
|
idx_t* npart = (idx_t*) calloc(num_vertices(tm), sizeof(idx_t));
|
||||||
CGAL_assertion(npart != NULL);
|
CGAL_assertion(npart != nullptr);
|
||||||
|
|
||||||
// partition info for the elements
|
// partition info for the elements
|
||||||
idx_t* epart = (idx_t*) calloc(num_faces(tm), sizeof(idx_t));
|
idx_t* epart = (idx_t*) calloc(num_faces(tm), sizeof(idx_t));
|
||||||
CGAL_assertion(epart != NULL);
|
CGAL_assertion(epart != nullptr);
|
||||||
|
|
||||||
// do not support Fortran-style arrays
|
// do not support Fortran-style arrays
|
||||||
CGAL_assertion((*options)[METIS_OPTION_NUMBERING] == -1 || // default initialization is '-1'
|
CGAL_assertion((*options)[METIS_OPTION_NUMBERING] == -1 || // default initialization is '-1'
|
||||||
|
|
@ -141,9 +141,9 @@ void partition_graph(const TriangleMesh& tm,
|
||||||
|
|
||||||
CGAL_assertion_code(int ret =)
|
CGAL_assertion_code(int ret =)
|
||||||
METIS_PartMeshNodal(&ne, &nn, eptr, eind,
|
METIS_PartMeshNodal(&ne, &nn, eptr, eind,
|
||||||
NULL /* nodes weights */, NULL /* nodes sizes */,
|
nullptr /* nodes weights */, nullptr /* nodes sizes */,
|
||||||
&nparts,
|
&nparts,
|
||||||
NULL /* partitions weights */,
|
nullptr /* partitions weights */,
|
||||||
*options,
|
*options,
|
||||||
&objval, epart, npart);
|
&objval, epart, npart);
|
||||||
|
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue