mirror of https://github.com/CGAL/cgal
Use null_handle instead of NULL everywhere internally to simplify the future possible version with index.
This commit is contained in:
parent
e6647d3751
commit
61d6236b60
|
|
@ -110,10 +110,10 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the dart associated with the cell.
|
/// Get the dart associated with the cell.
|
||||||
Dart_handle dart() { return NULL; }
|
Dart_handle dart() { return Refs::null_handle; }
|
||||||
|
|
||||||
/// Get the dart associated with the cell.
|
/// Get the dart associated with the cell.
|
||||||
Dart_const_handle dart() const { return NULL; }
|
Dart_const_handle dart() const { return Refs::null_handle; }
|
||||||
|
|
||||||
/// Set the dart associated with the cell.
|
/// Set the dart associated with the cell.
|
||||||
void set_dart(Dart_handle) {}
|
void set_dart(Dart_handle) {}
|
||||||
|
|
@ -234,7 +234,7 @@ namespace CGAL {
|
||||||
/// Test if the cell is valid.
|
/// Test if the cell is valid.
|
||||||
/// A cell is valid if its dart is not NULL.
|
/// A cell is valid if its dart is not NULL.
|
||||||
bool is_valid() const
|
bool is_valid() const
|
||||||
{ return mdart!=NULL; }
|
{ return mdart!=Refs::null_handle; }
|
||||||
|
|
||||||
bool operator==(const Cell_attribute_without_info&) const
|
bool operator==(const Cell_attribute_without_info&) const
|
||||||
{ return true; }
|
{ return true; }
|
||||||
|
|
@ -244,7 +244,7 @@ namespace CGAL {
|
||||||
|
|
||||||
// protected:
|
// protected:
|
||||||
/// Contructor without parameter.
|
/// Contructor without parameter.
|
||||||
Cell_attribute_without_info() : mdart(NULL),
|
Cell_attribute_without_info() : mdart(Refs::null_handle),
|
||||||
mrefcounting(0)
|
mrefcounting(0)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,9 @@ namespace CGAL {
|
||||||
|
|
||||||
static const size_type NB_MARKS = Base::NB_MARKS;
|
static const size_type NB_MARKS = Base::NB_MARKS;
|
||||||
static const unsigned int dimension = Base::dimension;
|
static const unsigned int dimension = Base::dimension;
|
||||||
static const typename Base::Null_handle_type null_handle;
|
|
||||||
|
typedef typename Base::Null_handle_type Null_handle_type;
|
||||||
|
static Null_handle_type null_handle;
|
||||||
|
|
||||||
using Base::null_dart_handle;
|
using Base::null_dart_handle;
|
||||||
using Base::mdarts;
|
using Base::mdarts;
|
||||||
|
|
@ -2100,7 +2102,7 @@ namespace CGAL {
|
||||||
*/
|
*/
|
||||||
void topo_unsew_1(Dart_handle adart)
|
void topo_unsew_1(Dart_handle adart)
|
||||||
{
|
{
|
||||||
CGAL_assertion( adart!=NULL && !adart->template is_free<1>() );
|
CGAL_assertion( !is_free<1>(adart) );
|
||||||
|
|
||||||
int m = get_new_mark();
|
int m = get_new_mark();
|
||||||
std::deque<Dart_handle> dartv;
|
std::deque<Dart_handle> dartv;
|
||||||
|
|
@ -2133,7 +2135,7 @@ namespace CGAL {
|
||||||
*/
|
*/
|
||||||
void topo_unsew_0(Dart_handle adart)
|
void topo_unsew_0(Dart_handle adart)
|
||||||
{
|
{
|
||||||
CGAL_assertion( adart!=NULL && !adart->template is_free<0>() );
|
CGAL_assertion( !is_free<0>(adart) );
|
||||||
topo_unsew_1( adart->template beta<0>() );
|
topo_unsew_1( adart->template beta<0>() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2147,7 +2149,7 @@ namespace CGAL {
|
||||||
template<unsigned int i>
|
template<unsigned int i>
|
||||||
void topo_unsew_for_involution(Dart_handle adart)
|
void topo_unsew_for_involution(Dart_handle adart)
|
||||||
{
|
{
|
||||||
CGAL_assertion( adart!=NULL && !adart->template is_free<i>() );
|
CGAL_assertion( !is_free<i>(adart) );
|
||||||
CGAL_assertion( 2<=i && i<=Self::dimension );
|
CGAL_assertion( 2<=i && i<=Self::dimension );
|
||||||
|
|
||||||
for ( CGAL::CMap_dart_iterator_of_involution<Self,i> it(*this, adart);
|
for ( CGAL::CMap_dart_iterator_of_involution<Self,i> it(*this, adart);
|
||||||
|
|
@ -3209,9 +3211,9 @@ namespace CGAL {
|
||||||
Dart_basic_range(Self &amap) : mmap(amap)
|
Dart_basic_range(Self &amap) : mmap(amap)
|
||||||
{}
|
{}
|
||||||
iterator begin() { return iterator(mmap); }
|
iterator begin() { return iterator(mmap); }
|
||||||
iterator end() { return iterator(mmap,NULL); }
|
iterator end() { return iterator(mmap,mmap.null_handle); }
|
||||||
const_iterator begin() const { return const_iterator(mmap); }
|
const_iterator begin() const { return const_iterator(mmap); }
|
||||||
const_iterator end() const { return const_iterator(mmap,NULL); }
|
const_iterator end() const { return const_iterator(mmap,mmap.null_handle); }
|
||||||
size_type size()
|
size_type size()
|
||||||
{ return mmap.number_of_darts(); }
|
{ return mmap.number_of_darts(); }
|
||||||
bool empty() const
|
bool empty() const
|
||||||
|
|
@ -3226,7 +3228,7 @@ namespace CGAL {
|
||||||
Dart_basic_const_range(Self &amap) : mmap(amap)
|
Dart_basic_const_range(Self &amap) : mmap(amap)
|
||||||
{}
|
{}
|
||||||
const_iterator begin() const { return const_iterator(mmap); }
|
const_iterator begin() const { return const_iterator(mmap); }
|
||||||
const_iterator end() const { return const_iterator(mmap,NULL); }
|
const_iterator end() const { return const_iterator(mmap,mmap.null_handle); }
|
||||||
size_type size() const
|
size_type size() const
|
||||||
{ return mmap.number_of_darts(); }
|
{ return mmap.number_of_darts(); }
|
||||||
bool empty() const
|
bool empty() const
|
||||||
|
|
@ -3281,9 +3283,9 @@ namespace CGAL {
|
||||||
One_dart_per_cell_range(Self &amap) : mmap(amap), msize(0)
|
One_dart_per_cell_range(Self &amap) : mmap(amap), msize(0)
|
||||||
{}
|
{}
|
||||||
iterator begin() { return iterator(mmap); }
|
iterator begin() { return iterator(mmap); }
|
||||||
iterator end() { return iterator(mmap,NULL); }
|
iterator end() { return iterator(mmap,mmap.null_handle); }
|
||||||
const_iterator begin() const { return const_iterator(mmap); }
|
const_iterator begin() const { return const_iterator(mmap); }
|
||||||
const_iterator end() const { return const_iterator(mmap,NULL); }
|
const_iterator end() const { return const_iterator(mmap,mmap.null_handle); }
|
||||||
size_type size()
|
size_type size()
|
||||||
{
|
{
|
||||||
if (msize==0)
|
if (msize==0)
|
||||||
|
|
@ -3306,7 +3308,7 @@ namespace CGAL {
|
||||||
One_dart_per_cell_const_range(const Self &amap) : mmap(amap), msize(0)
|
One_dart_per_cell_const_range(const Self &amap) : mmap(amap), msize(0)
|
||||||
{}
|
{}
|
||||||
const_iterator begin() const { return const_iterator(mmap); }
|
const_iterator begin() const { return const_iterator(mmap); }
|
||||||
const_iterator end() const { return const_iterator(mmap,NULL); }
|
const_iterator end() const { return const_iterator(mmap,mmap.null_handle); }
|
||||||
size_type size()
|
size_type size()
|
||||||
{
|
{
|
||||||
if (msize==0)
|
if (msize==0)
|
||||||
|
|
@ -3371,13 +3373,13 @@ namespace CGAL {
|
||||||
* simultaneously through all the darts of the two maps and we have
|
* simultaneously through all the darts of the two maps and we have
|
||||||
* each time of the iteration two "dual" darts.
|
* each time of the iteration two "dual" darts.
|
||||||
*/
|
*/
|
||||||
Dart_handle dual(Self& amap, Dart_handle adart=NULL)
|
Dart_handle dual(Self& amap, Dart_handle adart=null_handle)
|
||||||
{
|
{
|
||||||
CGAL_assertion( is_without_boundary(dimension) );
|
CGAL_assertion( is_without_boundary(dimension) );
|
||||||
|
|
||||||
CGAL::Unique_hash_map< Dart_handle, Dart_handle,
|
CGAL::Unique_hash_map< Dart_handle, Dart_handle,
|
||||||
typename Self::Hash_function > dual;
|
typename Self::Hash_function > dual;
|
||||||
Dart_handle d, d2, res = NULL;
|
Dart_handle d, d2, res = amap.null_handle;
|
||||||
|
|
||||||
// We clear amap. TODO return a new amap ?
|
// We clear amap. TODO return a new amap ?
|
||||||
amap.clear();
|
amap.clear();
|
||||||
|
|
@ -3387,7 +3389,7 @@ namespace CGAL {
|
||||||
it!=darts().end(); ++it)
|
it!=darts().end(); ++it)
|
||||||
{
|
{
|
||||||
dual[it] = amap.create_dart();
|
dual[it] = amap.create_dart();
|
||||||
if ( it==adart && res==NULL ) res = dual[it];
|
if ( it==adart && res==amap.null_handle ) res = dual[it];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Then we link the darts by using the dual formula :
|
// Then we link the darts by using the dual formula :
|
||||||
|
|
@ -3422,7 +3424,7 @@ namespace CGAL {
|
||||||
|
|
||||||
// CGAL_postcondition(amap2.is_valid());
|
// CGAL_postcondition(amap2.is_valid());
|
||||||
|
|
||||||
if ( res==NULL ) res = amap.darts().begin();
|
if ( res==amap.null_handle ) res = amap.darts().begin();
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3669,7 +3671,7 @@ namespace CGAL {
|
||||||
|
|
||||||
template < unsigned int d_, class Refs, class Items_, class Alloc_,
|
template < unsigned int d_, class Refs, class Items_, class Alloc_,
|
||||||
class Storage_ >
|
class Storage_ >
|
||||||
const typename Combinatorial_map_base<d_,Refs,Items_,Alloc_,Storage_>::
|
typename Combinatorial_map_base<d_,Refs,Items_,Alloc_,Storage_>::
|
||||||
Base::Null_handle_type
|
Base::Null_handle_type
|
||||||
Combinatorial_map_base<d_,Refs,Items_,Alloc_,Storage_>::null_handle =
|
Combinatorial_map_base<d_,Refs,Items_,Alloc_,Storage_>::null_handle =
|
||||||
Combinatorial_map_base<d_,Refs,Items_,Alloc_,Storage_>::Base::null_handle;
|
Combinatorial_map_base<d_,Refs,Items_,Alloc_,Storage_>::Base::null_handle;
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,6 @@ bool is_face_combinatorial_polygon(const Map& amap,
|
||||||
unsigned int alg)
|
unsigned int alg)
|
||||||
{
|
{
|
||||||
CGAL_assertion(alg>0);
|
CGAL_assertion(alg>0);
|
||||||
CGAL_assertion(adart!=NULL);
|
|
||||||
|
|
||||||
unsigned int nb = 0;
|
unsigned int nb = 0;
|
||||||
typename Map::Dart_const_handle cur = adart;
|
typename Map::Dart_const_handle cur = adart;
|
||||||
|
|
@ -127,8 +126,6 @@ template < class Map >
|
||||||
bool is_volume_combinatorial_tetrahedron(const Map& amap,
|
bool is_volume_combinatorial_tetrahedron(const Map& amap,
|
||||||
typename Map::Dart_const_handle d1)
|
typename Map::Dart_const_handle d1)
|
||||||
{
|
{
|
||||||
CGAL_assertion(d1!=NULL);
|
|
||||||
|
|
||||||
typename Map::Dart_const_handle d2 = amap.beta(d1, 2);
|
typename Map::Dart_const_handle d2 = amap.beta(d1, 2);
|
||||||
typename Map::Dart_const_handle d3 = amap.beta(d2, 0, 2);
|
typename Map::Dart_const_handle d3 = amap.beta(d2, 0, 2);
|
||||||
typename Map::Dart_const_handle d4 = amap.beta(d2, 1, 2);
|
typename Map::Dart_const_handle d4 = amap.beta(d2, 1, 2);
|
||||||
|
|
@ -232,8 +229,6 @@ template < class Map >
|
||||||
bool is_volume_combinatorial_hexahedron(const Map& amap,
|
bool is_volume_combinatorial_hexahedron(const Map& amap,
|
||||||
typename Map::Dart_const_handle d1)
|
typename Map::Dart_const_handle d1)
|
||||||
{
|
{
|
||||||
CGAL_assertion(d1!=NULL);
|
|
||||||
|
|
||||||
typename Map::Dart_const_handle d2 = amap.beta(d1, 1, 1, 2);
|
typename Map::Dart_const_handle d2 = amap.beta(d1, 1, 1, 2);
|
||||||
typename Map::Dart_const_handle d3 = amap.beta(d2, 1, 1, 2);
|
typename Map::Dart_const_handle d3 = amap.beta(d2, 1, 1, 2);
|
||||||
typename Map::Dart_const_handle d4 = amap.beta(d3, 1, 1, 2);
|
typename Map::Dart_const_handle d4 = amap.beta(d3, 1, 1, 2);
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ template<class CMap>
|
||||||
typename CMap::Dart_handle
|
typename CMap::Dart_handle
|
||||||
insert_cell_0_in_cell_1( CMap& amap, typename CMap::Dart_handle adart,
|
insert_cell_0_in_cell_1( CMap& amap, typename CMap::Dart_handle adart,
|
||||||
typename CMap::template
|
typename CMap::template
|
||||||
Attribute_handle<0>::type ah=NULL )
|
Attribute_handle<0>::type ah=CMap::null_handle )
|
||||||
{
|
{
|
||||||
typename CMap::Dart_handle d1, d2;
|
typename CMap::Dart_handle d1, d2;
|
||||||
int mark=amap.get_new_mark();
|
int mark=amap.get_new_mark();
|
||||||
|
|
@ -112,14 +112,14 @@ template < class CMap >
|
||||||
typename CMap::Dart_handle
|
typename CMap::Dart_handle
|
||||||
insert_cell_0_in_cell_2( CMap& amap, typename CMap::Dart_handle adart,
|
insert_cell_0_in_cell_2( CMap& amap, typename CMap::Dart_handle adart,
|
||||||
typename CMap::template
|
typename CMap::template
|
||||||
Attribute_handle<0>::type ah=NULL )
|
Attribute_handle<0>::type ah=CMap::null_handle )
|
||||||
{
|
{
|
||||||
CGAL_assertion(adart != NULL && adart!=amap.null_dart_handle);
|
CGAL_assertion(adart!=amap.null_dart_handle);
|
||||||
|
|
||||||
typename CMap::Dart_handle first=adart, prev=NULL, cur=NULL;
|
typename CMap::Dart_handle first=adart, prev=amap.null_handle,
|
||||||
typename CMap::Dart_handle next=NULL, n1=NULL, n2=NULL;
|
cur=amap.null_handle, next=amap.null_handle,
|
||||||
|
n1=amap.null_handle, n2=amap.null_handle,
|
||||||
typename CMap::Dart_handle nn1 = NULL, nn2 = NULL;
|
nn1=amap.null_handle, nn2=amap.null_handle;
|
||||||
|
|
||||||
// If the facet is open, we search the dart 0-free
|
// If the facet is open, we search the dart 0-free
|
||||||
while ( !amap.template is_free<0>(first) &&
|
while ( !amap.template is_free<0>(first) &&
|
||||||
|
|
@ -145,21 +145,21 @@ insert_cell_0_in_cell_2( CMap& amap, typename CMap::Dart_handle adart,
|
||||||
n1=amap.create_dart();
|
n1=amap.create_dart();
|
||||||
amap.link_beta_0(cur, n1);
|
amap.link_beta_0(cur, n1);
|
||||||
}
|
}
|
||||||
else n1 = NULL;
|
else n1 = amap.null_handle;
|
||||||
|
|
||||||
if (!amap.template is_free<1>(cur))
|
if (!amap.template is_free<1>(cur))
|
||||||
{
|
{
|
||||||
n2 = amap.create_dart();
|
n2 = amap.create_dart();
|
||||||
amap.link_beta_1(cur, n2);
|
amap.link_beta_1(cur, n2);
|
||||||
}
|
}
|
||||||
else n2 = NULL;
|
else n2 = amap.null_handle;
|
||||||
|
|
||||||
if ( n1!=NULL )
|
if ( n1!=amap.null_handle )
|
||||||
{
|
{
|
||||||
if ( n2!=NULL )
|
if ( n2!=amap.null_handle )
|
||||||
amap.basic_link_beta_0(n1, n2);
|
amap.basic_link_beta_0(n1, n2);
|
||||||
|
|
||||||
if ( prev!=NULL )
|
if ( prev!=amap.null_handle )
|
||||||
amap.template basic_link_beta_for_involution<2>(prev, n1);
|
amap.template basic_link_beta_for_involution<2>(prev, n1);
|
||||||
|
|
||||||
CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
|
CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
|
||||||
|
|
@ -172,15 +172,15 @@ insert_cell_0_in_cell_2( CMap& amap, typename CMap::Dart_handle adart,
|
||||||
{
|
{
|
||||||
if ( !amap.is_marked(amap.beta(cur, dim), treated) )
|
if ( !amap.is_marked(amap.beta(cur, dim), treated) )
|
||||||
{
|
{
|
||||||
if (n1!=NULL)
|
if (n1!=amap.null_handle)
|
||||||
{
|
{
|
||||||
nn1=amap.create_dart();
|
nn1=amap.create_dart();
|
||||||
amap.link_beta_1(amap.beta(cur, dim), nn1);
|
amap.link_beta_1(amap.beta(cur, dim), nn1);
|
||||||
amap.basic_link_beta_for_involution(n1, nn1, dim);
|
amap.basic_link_beta_for_involution(n1, nn1, dim);
|
||||||
}
|
}
|
||||||
else nn1=NULL;
|
else nn1=amap.null_handle;
|
||||||
|
|
||||||
if (n2!=NULL)
|
if (n2!=amap.null_handle)
|
||||||
{
|
{
|
||||||
nn2=amap.create_dart();
|
nn2=amap.create_dart();
|
||||||
amap.link_beta_0(amap.beta(cur, dim), nn2);
|
amap.link_beta_0(amap.beta(cur, dim), nn2);
|
||||||
|
|
@ -188,12 +188,12 @@ insert_cell_0_in_cell_2( CMap& amap, typename CMap::Dart_handle adart,
|
||||||
CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
|
CGAL::internal::Set_i_attribute_of_dart_functor<CMap, 0>::
|
||||||
run(&amap, nn2, ah);
|
run(&amap, nn2, ah);
|
||||||
}
|
}
|
||||||
else nn2=NULL;
|
else nn2=amap.null_handle;
|
||||||
|
|
||||||
if (nn1 != NULL && nn2 != NULL)
|
if (nn1 != amap.null_handle && nn2 != amap.null_handle)
|
||||||
amap.basic_link_beta_1(nn1, nn2);
|
amap.basic_link_beta_1(nn1, nn2);
|
||||||
|
|
||||||
if (nn1 != NULL && prev != NULL)
|
if (nn1 != amap.null_handle && prev != amap.null_handle)
|
||||||
amap.template basic_link_beta_for_involution<2>
|
amap.template basic_link_beta_for_involution<2>
|
||||||
(nn1, amap.beta(prev, dim));
|
(nn1, amap.beta(prev, dim));
|
||||||
|
|
||||||
|
|
@ -201,10 +201,10 @@ insert_cell_0_in_cell_2( CMap& amap, typename CMap::Dart_handle adart,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( n1!=NULL )
|
if ( n1!=amap.null_handle )
|
||||||
amap.basic_link_beta_for_involution(n1,
|
amap.basic_link_beta_for_involution(n1,
|
||||||
amap.beta(cur, dim, 1), dim);
|
amap.beta(cur, dim, 1), dim);
|
||||||
if ( n2!=NULL )
|
if ( n2!=amap.null_handle )
|
||||||
amap.basic_link_beta_for_involution(n2,
|
amap.basic_link_beta_for_involution(n2,
|
||||||
amap.beta(cur, dim, 0), dim);
|
amap.beta(cur, dim, 0), dim);
|
||||||
}
|
}
|
||||||
|
|
@ -216,7 +216,7 @@ insert_cell_0_in_cell_2( CMap& amap, typename CMap::Dart_handle adart,
|
||||||
}
|
}
|
||||||
while(cur!=first && cur!=amap.null_dart_handle);
|
while(cur!=first && cur!=amap.null_dart_handle);
|
||||||
|
|
||||||
if (n2 != NULL)
|
if (n2 != amap.null_handle)
|
||||||
{
|
{
|
||||||
amap.template basic_link_beta_for_involution<2>
|
amap.template basic_link_beta_for_involution<2>
|
||||||
(amap.template beta<0>(first), n2);
|
(amap.template beta<0>(first), n2);
|
||||||
|
|
@ -265,7 +265,7 @@ typename CMap::Dart_handle
|
||||||
insert_dangling_cell_1_in_cell_2( CMap& amap,
|
insert_dangling_cell_1_in_cell_2( CMap& amap,
|
||||||
typename CMap::Dart_handle adart1,
|
typename CMap::Dart_handle adart1,
|
||||||
typename CMap::template
|
typename CMap::template
|
||||||
Attribute_handle<0>::type ah=NULL )
|
Attribute_handle<0>::type ah=CMap::null_handle )
|
||||||
{
|
{
|
||||||
int mark1 = amap.get_new_mark();
|
int mark1 = amap.get_new_mark();
|
||||||
std::deque<typename CMap::Dart_handle> to_unmark;
|
std::deque<typename CMap::Dart_handle> to_unmark;
|
||||||
|
|
@ -278,8 +278,8 @@ insert_dangling_cell_1_in_cell_2( CMap& amap,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
typename CMap::Dart_handle d1 = NULL;
|
typename CMap::Dart_handle d1 = amap.null_handle;
|
||||||
typename CMap::Dart_handle d2 = NULL;
|
typename CMap::Dart_handle d2 = amap.null_handle;
|
||||||
unsigned int s1 = 0;
|
unsigned int s1 = 0;
|
||||||
|
|
||||||
int treated=amap.get_new_mark();
|
int treated=amap.get_new_mark();
|
||||||
|
|
@ -386,7 +386,7 @@ insert_cell_1_in_cell_2(CMap& amap,
|
||||||
typename CMap::Dart_handle adart1,
|
typename CMap::Dart_handle adart1,
|
||||||
typename CMap::Dart_handle adart2)
|
typename CMap::Dart_handle adart2)
|
||||||
{
|
{
|
||||||
if ( adart2==NULL ) return insert_dangling_cell_1_in_cell_2(amap,adart1);
|
if ( adart2==amap.null_handle ) return insert_dangling_cell_1_in_cell_2(amap,adart1);
|
||||||
|
|
||||||
CGAL_assertion(is_insertable_cell_1_in_cell_2<CMap>(amap, adart1, adart2));
|
CGAL_assertion(is_insertable_cell_1_in_cell_2<CMap>(amap, adart1, adart2));
|
||||||
|
|
||||||
|
|
@ -407,8 +407,8 @@ insert_cell_1_in_cell_2(CMap& amap,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
typename CMap::Dart_handle d1=NULL;
|
typename CMap::Dart_handle d1=amap.null_handle;
|
||||||
typename CMap::Dart_handle d2=NULL;
|
typename CMap::Dart_handle d2=amap.null_handle;
|
||||||
unsigned int s1=0;
|
unsigned int s1=0;
|
||||||
|
|
||||||
int treated=amap.get_new_mark();
|
int treated=amap.get_new_mark();
|
||||||
|
|
@ -511,20 +511,20 @@ bool is_insertable_cell_2_in_cell_3(const CMap& amap,
|
||||||
|
|
||||||
// The path must have at least one dart.
|
// The path must have at least one dart.
|
||||||
if (afirst==alast) return false;
|
if (afirst==alast) return false;
|
||||||
typename CMap::Dart_const_handle prec = NULL;
|
typename CMap::Dart_const_handle prec = amap.null_handle;
|
||||||
typename CMap::Dart_const_handle od = NULL;
|
typename CMap::Dart_const_handle od = amap.null_handle;
|
||||||
|
|
||||||
for (InputIterator it(afirst); it!=alast; ++it)
|
for (InputIterator it(afirst); it!=alast; ++it)
|
||||||
{
|
{
|
||||||
// The path must contain only non empty darts.
|
// The path must contain only non empty darts.
|
||||||
if (*it == NULL || *it==amap.null_dart_handle) return false;
|
if (*it == amap.null_handle || *it==amap.null_dart_handle) return false;
|
||||||
|
|
||||||
// Two consecutive darts of the path must belong to two edges
|
// Two consecutive darts of the path must belong to two edges
|
||||||
// incident to the same vertex of the same volume.
|
// incident to the same vertex of the same volume.
|
||||||
if (prec != NULL)
|
if (prec != amap.null_handle)
|
||||||
{
|
{
|
||||||
od = amap.other_extremity(prec);
|
od = amap.other_extremity(prec);
|
||||||
if ( od==NULL ) return false;
|
if ( od==amap.null_handle ) return false;
|
||||||
|
|
||||||
// of and *it must belong to the same vertex of the same volume
|
// of and *it must belong to the same vertex of the same volume
|
||||||
if ( !CGAL::belong_to_same_cell<CMap, 0, 2>(amap, od, *it) )
|
if ( !CGAL::belong_to_same_cell<CMap, 0, 2>(amap, od, *it) )
|
||||||
|
|
@ -535,7 +535,7 @@ bool is_insertable_cell_2_in_cell_3(const CMap& amap,
|
||||||
|
|
||||||
// The path must be closed.
|
// The path must be closed.
|
||||||
od = amap.other_extremity(prec);
|
od = amap.other_extremity(prec);
|
||||||
if ( od==NULL ) return false;
|
if ( od==amap.null_handle ) return false;
|
||||||
|
|
||||||
if (!CGAL::belong_to_same_cell<CMap, 0, 2>(amap, od, *afirst))
|
if (!CGAL::belong_to_same_cell<CMap, 0, 2>(amap, od, *afirst))
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -555,7 +555,8 @@ insert_cell_2_in_cell_3(CMap& amap, InputIterator afirst, InputIterator alast)
|
||||||
{
|
{
|
||||||
CGAL_assertion(is_insertable_cell_2_in_cell_3(amap,afirst,alast));
|
CGAL_assertion(is_insertable_cell_2_in_cell_3(amap,afirst,alast));
|
||||||
|
|
||||||
typename CMap::Dart_handle prec = NULL, d = NULL, dd = NULL, first = NULL;
|
typename CMap::Dart_handle prec = amap.null_handle, d = amap.null_handle,
|
||||||
|
dd = amap.null_handle, first = amap.null_handle;
|
||||||
bool withBeta3 = false;
|
bool withBeta3 = false;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -572,7 +573,7 @@ insert_cell_2_in_cell_3(CMap& amap, InputIterator afirst, InputIterator alast)
|
||||||
if ( withBeta3 )
|
if ( withBeta3 )
|
||||||
dd = amap.create_dart();
|
dd = amap.create_dart();
|
||||||
|
|
||||||
if (prec != NULL)
|
if (prec != amap.null_handle)
|
||||||
{
|
{
|
||||||
amap.basic_link_beta_0(prec, d);
|
amap.basic_link_beta_0(prec, d);
|
||||||
if (withBeta3)
|
if (withBeta3)
|
||||||
|
|
@ -604,8 +605,8 @@ insert_cell_2_in_cell_3(CMap& amap, InputIterator afirst, InputIterator alast)
|
||||||
{
|
{
|
||||||
if ( !amap.is_free(first, dim) )
|
if ( !amap.is_free(first, dim) )
|
||||||
{
|
{
|
||||||
typename CMap::Dart_handle first2 = NULL;
|
typename CMap::Dart_handle first2 = amap.null_handle;
|
||||||
prec = NULL;
|
prec = amap.null_handle;
|
||||||
for ( CMap_dart_iterator_basic_of_orbit<CMap, 1> it(amap, first);
|
for ( CMap_dart_iterator_basic_of_orbit<CMap, 1> it(amap, first);
|
||||||
it.cont(); ++it )
|
it.cont(); ++it )
|
||||||
{
|
{
|
||||||
|
|
@ -618,7 +619,7 @@ insert_cell_2_in_cell_3(CMap& amap, InputIterator afirst, InputIterator alast)
|
||||||
(amap.template beta<2,3>(it), dd, dim);
|
(amap.template beta<2,3>(it), dd, dim);
|
||||||
amap.template basic_link_beta_for_involution<3>(d, dd);
|
amap.template basic_link_beta_for_involution<3>(d, dd);
|
||||||
}
|
}
|
||||||
if ( prec!=NULL )
|
if ( prec!=amap.null_handle )
|
||||||
{
|
{
|
||||||
amap.link_beta_0(prec, d);
|
amap.link_beta_0(prec, d);
|
||||||
if ( withBeta3 )
|
if ( withBeta3 )
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,7 @@ namespace CGAL {
|
||||||
mmark_number(amark),
|
mmark_number(amark),
|
||||||
minitial_dart(adart)
|
minitial_dart(adart)
|
||||||
{
|
{
|
||||||
if ( minitial_dart!=NULL )
|
if ( minitial_dart!=amap.null_handle )
|
||||||
{
|
{
|
||||||
this->mmap->mark_null_dart(mmark_number);
|
this->mmap->mark_null_dart(mmark_number);
|
||||||
this->mmap->mark(minitial_dart, mmark_number);
|
this->mmap->mark(minitial_dart, mmark_number);
|
||||||
|
|
@ -320,7 +320,7 @@ namespace CGAL {
|
||||||
CMap_extend_iterator(Map& amap, Dart_handle adart, int amark):
|
CMap_extend_iterator(Map& amap, Dart_handle adart, int amark):
|
||||||
Base(amap, adart, amark)
|
Base(amap, adart, amark)
|
||||||
{
|
{
|
||||||
if ( this->minitial_dart!=NULL &&
|
if ( this->minitial_dart!=amap.null_handle &&
|
||||||
!this->mmap->is_free(this->minitial_dart, Bi) &&
|
!this->mmap->is_free(this->minitial_dart, Bi) &&
|
||||||
this->mmap->beta(this->minitial_dart, Bi)!=this->minitial_dart )
|
this->mmap->beta(this->minitial_dart, Bi)!=this->minitial_dart )
|
||||||
{
|
{
|
||||||
|
|
@ -492,9 +492,9 @@ namespace CGAL {
|
||||||
mmap(amap), mdart(adart), msize(0)
|
mmap(amap), mdart(adart), msize(0)
|
||||||
{}
|
{}
|
||||||
iterator begin() { return iterator(mmap,mdart); }
|
iterator begin() { return iterator(mmap,mdart); }
|
||||||
iterator end() { return iterator(mmap,NULL); }
|
iterator end() { return iterator(mmap,mmap.null_handle); }
|
||||||
const_iterator begin() const { return const_iterator(mmap,mdart); }
|
const_iterator begin() const { return const_iterator(mmap,mdart); }
|
||||||
const_iterator end() const { return const_iterator(mmap,NULL); }
|
const_iterator end() const { return const_iterator(mmap,mmap.null_handle); }
|
||||||
typename Map_::size_type size()
|
typename Map_::size_type size()
|
||||||
{
|
{
|
||||||
if (msize==0)
|
if (msize==0)
|
||||||
|
|
@ -520,9 +520,9 @@ namespace CGAL {
|
||||||
mmap(amap), mdart(adart), msize(0), mmark(amark)
|
mmap(amap), mdart(adart), msize(0), mmark(amark)
|
||||||
{}
|
{}
|
||||||
iterator begin() { return iterator(mmap,mdart,mmark); }
|
iterator begin() { return iterator(mmap,mdart,mmark); }
|
||||||
iterator end() { return iterator(mmap,NULL,mmark); }
|
iterator end() { return iterator(mmap,mmap.null_handle,mmark); }
|
||||||
const_iterator begin() const { return const_iterator(mmap,mdart,mmark); }
|
const_iterator begin() const { return const_iterator(mmap,mdart,mmark); }
|
||||||
const_iterator end() const { return const_iterator(mmap,NULL,mmark); }
|
const_iterator end() const { return const_iterator(mmap,mmap.null_handle,mmark); }
|
||||||
typename Map_::size_type size()
|
typename Map_::size_type size()
|
||||||
{
|
{
|
||||||
if (msize==0)
|
if (msize==0)
|
||||||
|
|
@ -549,7 +549,7 @@ namespace CGAL {
|
||||||
mmap(amap), mdart(adart), msize(0)
|
mmap(amap), mdart(adart), msize(0)
|
||||||
{}
|
{}
|
||||||
const_iterator begin() const { return const_iterator(mmap,mdart); }
|
const_iterator begin() const { return const_iterator(mmap,mdart); }
|
||||||
const_iterator end() const { return const_iterator(mmap,NULL); }
|
const_iterator end() const { return const_iterator(mmap,mmap.null_handle); }
|
||||||
typename Map_::size_type size()
|
typename Map_::size_type size()
|
||||||
{
|
{
|
||||||
if (msize==0)
|
if (msize==0)
|
||||||
|
|
@ -574,7 +574,7 @@ namespace CGAL {
|
||||||
mmap(amap), mdart(adart), msize(0), mmark(amark)
|
mmap(amap), mdart(adart), msize(0), mmark(amark)
|
||||||
{}
|
{}
|
||||||
const_iterator begin() const { return const_iterator(mmap,mdart,mmark); }
|
const_iterator begin() const { return const_iterator(mmap,mdart,mmark); }
|
||||||
const_iterator end() const { return const_iterator(mmap,NULL,mmark); }
|
const_iterator end() const { return const_iterator(mmap,mmap.null_handle,mmark); }
|
||||||
typename Map_::size_type size()
|
typename Map_::size_type size()
|
||||||
{
|
{
|
||||||
if (msize==0)
|
if (msize==0)
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ namespace CGAL
|
||||||
size_t res = 0;
|
size_t res = 0;
|
||||||
|
|
||||||
typename CMap::Dart_handle d1, d2;
|
typename CMap::Dart_handle d1, d2;
|
||||||
typename CMap::Dart_handle dg1=NULL, dg2=NULL;
|
typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
|
||||||
|
|
||||||
int mark = amap.get_new_mark();
|
int mark = amap.get_new_mark();
|
||||||
int mark_modified_darts = amap.get_new_mark();
|
int mark_modified_darts = amap.get_new_mark();
|
||||||
|
|
@ -109,14 +109,14 @@ namespace CGAL
|
||||||
it.cont(); ++it )
|
it.cont(); ++it )
|
||||||
{
|
{
|
||||||
to_erase.push_back(it);
|
to_erase.push_back(it);
|
||||||
if ( !amap.template is_free<i+1>(it) && dg1==NULL )
|
if ( !amap.template is_free<i+1>(it) && dg1==amap.null_handle )
|
||||||
{ dg1=it; dg2=amap.template beta<i+1>(it); }
|
{ dg1=it; dg2=amap.template beta<i+1>(it); }
|
||||||
amap.mark(it, mark);
|
amap.mark(it, mark);
|
||||||
++res;
|
++res;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We group the two (i+1)-cells incident if they exist.
|
// We group the two (i+1)-cells incident if they exist.
|
||||||
if ( dg1!=NULL )
|
if ( dg1!=amap.null_handle )
|
||||||
CGAL::internal::Group_attribute_functor_run<CMap, i+1>::
|
CGAL::internal::Group_attribute_functor_run<CMap, i+1>::
|
||||||
run(&amap, dg1, dg2);
|
run(&amap, dg1, dg2);
|
||||||
|
|
||||||
|
|
@ -334,7 +334,7 @@ namespace CGAL
|
||||||
size_t res = 0;
|
size_t res = 0;
|
||||||
|
|
||||||
typename CMap::Dart_handle d1, d2;
|
typename CMap::Dart_handle d1, d2;
|
||||||
typename CMap::Dart_handle dg1=NULL, dg2=NULL;
|
typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
|
||||||
|
|
||||||
int mark = amap.get_new_mark();
|
int mark = amap.get_new_mark();
|
||||||
// int mark_modified_darts = amap.get_new_mark();
|
// int mark_modified_darts = amap.get_new_mark();
|
||||||
|
|
@ -345,14 +345,14 @@ namespace CGAL
|
||||||
it.cont(); ++it )
|
it.cont(); ++it )
|
||||||
{
|
{
|
||||||
to_erase.push_back(it);
|
to_erase.push_back(it);
|
||||||
if ( !amap.template is_free<0>(it) && dg1==NULL )
|
if ( !amap.template is_free<0>(it) && dg1==amap.null_handle )
|
||||||
{ dg1=it; dg2=amap.template beta<0>(it); }
|
{ dg1=it; dg2=amap.template beta<0>(it); }
|
||||||
amap.mark(it, mark);
|
amap.mark(it, mark);
|
||||||
++res;
|
++res;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We group the two edges incident if they exist.
|
// We group the two edges incident if they exist.
|
||||||
if ( dg1!=NULL )
|
if ( dg1!=amap.null_handle )
|
||||||
CGAL::internal::Group_attribute_functor_run<CMap, 1>::
|
CGAL::internal::Group_attribute_functor_run<CMap, 1>::
|
||||||
run(&amap, dg1, dg2);
|
run(&amap, dg1, dg2);
|
||||||
|
|
||||||
|
|
@ -507,7 +507,7 @@ namespace CGAL
|
||||||
size_t res = 0;
|
size_t res = 0;
|
||||||
|
|
||||||
typename CMap::Dart_handle d1, d2;
|
typename CMap::Dart_handle d1, d2;
|
||||||
typename CMap::Dart_handle dg1=NULL, dg2=NULL;
|
typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
|
||||||
|
|
||||||
int mark = amap.get_new_mark();
|
int mark = amap.get_new_mark();
|
||||||
int mark_modified_darts = amap.get_new_mark();
|
int mark_modified_darts = amap.get_new_mark();
|
||||||
|
|
@ -520,14 +520,14 @@ namespace CGAL
|
||||||
it.cont(); ++it )
|
it.cont(); ++it )
|
||||||
{
|
{
|
||||||
to_erase.push_back(it);
|
to_erase.push_back(it);
|
||||||
if ( !amap.template is_free<i-1>(it) && dg1==NULL )
|
if ( !amap.template is_free<i-1>(it) && dg1==amap.null_handle )
|
||||||
{ dg1=it; dg2=amap.template beta<i-1>(it); }
|
{ dg1=it; dg2=amap.template beta<i-1>(it); }
|
||||||
amap.mark(it, mark);
|
amap.mark(it, mark);
|
||||||
++res;
|
++res;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We group the two (i+1)-cells incident if they exist.
|
// We group the two (i+1)-cells incident if they exist.
|
||||||
if ( dg1!=NULL )
|
if ( dg1!=amap.null_handle )
|
||||||
CGAL::internal::Group_attribute_functor_run<CMap,i-1>::
|
CGAL::internal::Group_attribute_functor_run<CMap,i-1>::
|
||||||
run(&amap, dg1, dg2);
|
run(&amap, dg1, dg2);
|
||||||
|
|
||||||
|
|
@ -656,7 +656,7 @@ namespace CGAL
|
||||||
size_t res = 0;
|
size_t res = 0;
|
||||||
|
|
||||||
typename CMap::Dart_handle d1, d2;
|
typename CMap::Dart_handle d1, d2;
|
||||||
typename CMap::Dart_handle dg1=NULL, dg2=NULL;
|
typename CMap::Dart_handle dg1=amap.null_handle, dg2=amap.null_handle;
|
||||||
|
|
||||||
int mark = amap.get_new_mark();
|
int mark = amap.get_new_mark();
|
||||||
// int mark_modified_darts = amap.get_new_mark();
|
// int mark_modified_darts = amap.get_new_mark();
|
||||||
|
|
@ -667,7 +667,7 @@ namespace CGAL
|
||||||
it.cont(); ++it )
|
it.cont(); ++it )
|
||||||
{
|
{
|
||||||
to_erase.push_back(it);
|
to_erase.push_back(it);
|
||||||
if ( dg1==NULL && !amap.template is_free<0>(it) &&
|
if ( dg1==amap.null_handle && !amap.template is_free<0>(it) &&
|
||||||
!amap.template is_free<1>(it) )
|
!amap.template is_free<1>(it) )
|
||||||
{ dg1=amap.template beta<0>(it); dg2=amap.template beta<1>(it); }
|
{ dg1=amap.template beta<0>(it); dg2=amap.template beta<1>(it); }
|
||||||
amap.mark(it, mark);
|
amap.mark(it, mark);
|
||||||
|
|
@ -675,7 +675,7 @@ namespace CGAL
|
||||||
}
|
}
|
||||||
|
|
||||||
// We group the two vertices incident if they exist.
|
// We group the two vertices incident if they exist.
|
||||||
if ( dg1!=NULL )
|
if ( dg1!=amap.null_handle )
|
||||||
CGAL::internal::Group_attribute_functor_run<CMap, 0, 1>::
|
CGAL::internal::Group_attribute_functor_run<CMap, 0, 1>::
|
||||||
run(&amap, dg1, dg2);
|
run(&amap, dg1, dg2);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,9 @@ namespace CGAL {
|
||||||
typedef typename Dart_container::const_iterator Dart_const_handle;
|
typedef typename Dart_container::const_iterator Dart_const_handle;
|
||||||
typedef typename Dart_container::size_type size_type;
|
typedef typename Dart_container::size_type size_type;
|
||||||
|
|
||||||
|
typedef CGAL::Void* Null_handle_type;
|
||||||
|
static Null_handle_type null_handle;
|
||||||
|
|
||||||
typedef Items_ Items;
|
typedef Items_ Items;
|
||||||
typedef Alloc_ Alloc;
|
typedef Alloc_ Alloc;
|
||||||
|
|
||||||
|
|
@ -396,6 +399,11 @@ namespace CGAL {
|
||||||
typename Helper::Attribute_containers mattribute_containers;
|
typename Helper::Attribute_containers mattribute_containers;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// null_handle
|
||||||
|
template < unsigned int d_, class Items_, class Alloc_ >
|
||||||
|
typename Combinatorial_map_storage_1<d_, Items_, Alloc_>::Null_handle_type
|
||||||
|
Combinatorial_map_storage_1<d_, Items_, Alloc_>::null_handle = NULL;
|
||||||
|
|
||||||
#ifdef CGAL_CMAP_DEPRECATED
|
#ifdef CGAL_CMAP_DEPRECATED
|
||||||
/// Allocation of static data members
|
/// Allocation of static data members
|
||||||
/// mnull_dart_container
|
/// mnull_dart_container
|
||||||
|
|
|
||||||
|
|
@ -263,17 +263,6 @@ namespace CGAL {
|
||||||
(mattribute_handles);
|
(mattribute_handles);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Set the handle on the i th attribute
|
|
||||||
template<int i>
|
|
||||||
void set_attribute( typename Attribute_handle<i>::type ahandle )
|
|
||||||
{
|
|
||||||
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
|
|
||||||
"set_attribute<i> called but i-attributes are disabled.");
|
|
||||||
CGAL::cpp11::get<Helper::template Dimension_index<i>::value>
|
|
||||||
(mattribute_handles) = ahandle;
|
|
||||||
if (ahandle!=NULL) ahandle->inc_nb_refs();
|
|
||||||
}
|
|
||||||
|
|
||||||
/** Return the mark value of a given mark number.
|
/** Return the mark value of a given mark number.
|
||||||
* @param amark the mark number.
|
* @param amark the mark number.
|
||||||
* @return the value for this number.
|
* @return the value for this number.
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ namespace CGAL {
|
||||||
Self& operator++()
|
Self& operator++()
|
||||||
{
|
{
|
||||||
CGAL_assertion(this->cont());
|
CGAL_assertion(this->cont());
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
@ -248,7 +248,7 @@ namespace CGAL {
|
||||||
|
|
||||||
if ((*this)==this->mfirst_dart)
|
if ((*this)==this->mfirst_dart)
|
||||||
{
|
{
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -256,7 +256,7 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
if (this->mmap->is_free(*this, 1))
|
if (this->mmap->is_free(*this, 1))
|
||||||
{
|
{
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -338,7 +338,7 @@ namespace CGAL {
|
||||||
|
|
||||||
if ((*this)==this->mfirst_dart)
|
if ((*this)==this->mfirst_dart)
|
||||||
{
|
{
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -346,7 +346,7 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
if (this->mmap->is_free(*this, 0))
|
if (this->mmap->is_free(*this, 0))
|
||||||
{
|
{
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -402,7 +402,7 @@ namespace CGAL {
|
||||||
CGAL_assertion(this->cont());
|
CGAL_assertion(this->cont());
|
||||||
if ((*this)!=this->mfirst_dart || this->mmap->is_free(*this, Bi))
|
if ((*this)!=this->mfirst_dart || this->mmap->is_free(*this, Bi))
|
||||||
{
|
{
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -485,7 +485,7 @@ namespace CGAL {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -500,7 +500,7 @@ namespace CGAL {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (mcurdart==2)
|
else if (mcurdart==2)
|
||||||
|
|
@ -514,7 +514,7 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
CGAL_assertion (mcurdart==3);
|
CGAL_assertion (mcurdart==3);
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
|
|
@ -623,7 +623,7 @@ namespace CGAL {
|
||||||
mexist_betaj(false),
|
mexist_betaj(false),
|
||||||
mprev_betaj(false),
|
mprev_betaj(false),
|
||||||
mfirst_border(true)
|
mfirst_border(true)
|
||||||
{ if (adart!=NULL)
|
{ if (adart!=this->mmap->null_handle)
|
||||||
mexist_betaj=!this->mmap->is_free(adart, delta); }
|
mexist_betaj=!this->mmap->is_free(adart, delta); }
|
||||||
|
|
||||||
/// Main constructor.
|
/// Main constructor.
|
||||||
|
|
@ -634,7 +634,7 @@ namespace CGAL {
|
||||||
mexist_betaj(false),
|
mexist_betaj(false),
|
||||||
mprev_betaj(false),
|
mprev_betaj(false),
|
||||||
mfirst_border(true)
|
mfirst_border(true)
|
||||||
{ if (adart!=NULL)
|
{ if (adart!=this->mmap->null_handle)
|
||||||
mexist_betaj=!this->mmap->is_free(adart, delta); }
|
mexist_betaj=!this->mmap->is_free(adart, delta); }
|
||||||
|
|
||||||
/// Prefix ++ operator.
|
/// Prefix ++ operator.
|
||||||
|
|
@ -654,7 +654,7 @@ namespace CGAL {
|
||||||
++mit;
|
++mit;
|
||||||
this->mprev_op = mit.prev_operation();
|
this->mprev_op = mit.prev_operation();
|
||||||
if ( !mit.cont() )
|
if ( !mit.cont() )
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( !mfirst_border )
|
if ( !mfirst_border )
|
||||||
|
|
@ -723,7 +723,7 @@ namespace CGAL {
|
||||||
mexist_betaj(false),
|
mexist_betaj(false),
|
||||||
mprev_betaj(false),
|
mprev_betaj(false),
|
||||||
mfirst_border(true)
|
mfirst_border(true)
|
||||||
{ if (adart!=NULL)
|
{ if (adart!=this->mmap->null_handle)
|
||||||
mexist_betaj=!this->mmap->is_free(adart, 1+delta); }
|
mexist_betaj=!this->mmap->is_free(adart, 1+delta); }
|
||||||
|
|
||||||
/// Main constructor.
|
/// Main constructor.
|
||||||
|
|
@ -734,7 +734,7 @@ namespace CGAL {
|
||||||
mexist_betaj(false),
|
mexist_betaj(false),
|
||||||
mprev_betaj(false),
|
mprev_betaj(false),
|
||||||
mfirst_border(true)
|
mfirst_border(true)
|
||||||
{ if (adart!=NULL)
|
{ if (adart!=this->mmap->null_handle)
|
||||||
mexist_betaj=!this->mmap->is_free(adart, 1+delta); }
|
mexist_betaj=!this->mmap->is_free(adart, 1+delta); }
|
||||||
|
|
||||||
/// Prefix ++ operator.
|
/// Prefix ++ operator.
|
||||||
|
|
@ -754,7 +754,7 @@ namespace CGAL {
|
||||||
++mit;
|
++mit;
|
||||||
this->mprev_op = mit.prev_operation();
|
this->mprev_op = mit.prev_operation();
|
||||||
if ( !mit.cont() )
|
if ( !mit.cont() )
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ( !mfirst_border )
|
if ( !mfirst_border )
|
||||||
|
|
@ -854,7 +854,7 @@ namespace CGAL {
|
||||||
if (this->mmap->is_free(this->mfirst_dart, Bi+1))
|
if (this->mmap->is_free(this->mfirst_dart, Bi+1))
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -877,7 +877,7 @@ namespace CGAL {
|
||||||
if (this->mmap->is_free(this->mfirst_dart, Bi+1))
|
if (this->mmap->is_free(this->mfirst_dart, Bi+1))
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -892,7 +892,7 @@ namespace CGAL {
|
||||||
if ((*this)==this->mfirst_dart)
|
if ((*this)==this->mfirst_dart)
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -909,7 +909,7 @@ namespace CGAL {
|
||||||
if (this->mmap->is_free(*this, Bi))
|
if (this->mmap->is_free(*this, Bi))
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -923,7 +923,7 @@ namespace CGAL {
|
||||||
if (this->mmap->is_free(*this, Bi+1))
|
if (this->mmap->is_free(*this, Bi+1))
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1137,7 +1137,7 @@ namespace CGAL {
|
||||||
{ this->mprev_op = OP_POP; }
|
{ this->mprev_op = OP_POP; }
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
|
|
@ -1176,7 +1176,7 @@ namespace CGAL {
|
||||||
Base(amap, adart),
|
Base(amap, adart),
|
||||||
mmark_number(amark)
|
mmark_number(amark)
|
||||||
{
|
{
|
||||||
if (adart!=NULL)
|
if (adart!=this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
this->mmap->mark_null_dart(mmark_number);
|
this->mmap->mark_null_dart(mmark_number);
|
||||||
this->mmap->mark(adart, mmark_number);
|
this->mmap->mark(adart, mmark_number);
|
||||||
|
|
@ -1198,13 +1198,13 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
CGAL_assertion(mmark_number != -1);
|
CGAL_assertion(mmark_number != -1);
|
||||||
CGAL_assertion(this->cont());
|
CGAL_assertion(this->cont());
|
||||||
Dart_handle nd = NULL;
|
Dart_handle nd = this->mmap->null_handle;
|
||||||
|
|
||||||
for ( unsigned int k=0; k<i; ++k )
|
for ( unsigned int k=0; k<i; ++k )
|
||||||
{
|
{
|
||||||
if ( this->is_unmarked((*this), k, mmark_number) )
|
if ( this->is_unmarked((*this), k, mmark_number) )
|
||||||
{
|
{
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
nd = this->mmap->beta(*this, k);
|
nd = this->mmap->beta(*this, k);
|
||||||
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
||||||
|
|
@ -1221,7 +1221,7 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
if ( this->is_unmarked((*this), k, mmark_number) )
|
if ( this->is_unmarked((*this), k, mmark_number) )
|
||||||
{
|
{
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
nd = this->mmap->beta(*this, k);
|
nd = this->mmap->beta(*this, k);
|
||||||
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
||||||
|
|
@ -1235,7 +1235,7 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
if (!mto_treat.empty())
|
if (!mto_treat.empty())
|
||||||
{
|
{
|
||||||
|
|
@ -1246,7 +1246,7 @@ namespace CGAL {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1288,7 +1288,7 @@ namespace CGAL {
|
||||||
Base(amap, adart),
|
Base(amap, adart),
|
||||||
mmark_number(amark)
|
mmark_number(amark)
|
||||||
{
|
{
|
||||||
if (adart!=NULL)
|
if (adart!=this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
this->mmap->mark(adart, mmark_number);
|
this->mmap->mark(adart, mmark_number);
|
||||||
this->mmap->mark_null_dart(mmark_number);
|
this->mmap->mark_null_dart(mmark_number);
|
||||||
|
|
@ -1311,13 +1311,13 @@ namespace CGAL {
|
||||||
CGAL_assertion(mmark_number != -1);
|
CGAL_assertion(mmark_number != -1);
|
||||||
CGAL_assertion(this->cont());
|
CGAL_assertion(this->cont());
|
||||||
|
|
||||||
Dart_handle nd = NULL;
|
Dart_handle nd = this->mmap->null_handle;
|
||||||
|
|
||||||
for ( unsigned int k=2; k<=d; ++k )
|
for ( unsigned int k=2; k<=d; ++k )
|
||||||
{
|
{
|
||||||
if ( this->is_unmarked((*this), k, mmark_number) )
|
if ( this->is_unmarked((*this), k, mmark_number) )
|
||||||
{
|
{
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
nd = this->mmap->beta(*this, k);
|
nd = this->mmap->beta(*this, k);
|
||||||
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
||||||
|
|
@ -1331,7 +1331,7 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
if (!mto_treat.empty())
|
if (!mto_treat.empty())
|
||||||
{
|
{
|
||||||
|
|
@ -1343,7 +1343,7 @@ namespace CGAL {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1384,7 +1384,7 @@ namespace CGAL {
|
||||||
int amark):
|
int amark):
|
||||||
Base(amap, adart),
|
Base(amap, adart),
|
||||||
mmark_number(amark)
|
mmark_number(amark)
|
||||||
{ if (adart!=NULL)
|
{ if (adart!=this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
this->mmap->mark(adart, mmark_number);
|
this->mmap->mark(adart, mmark_number);
|
||||||
this->mmap->mark_null_dart(mmark_number);
|
this->mmap->mark_null_dart(mmark_number);
|
||||||
|
|
@ -1407,13 +1407,13 @@ namespace CGAL {
|
||||||
CGAL_assertion(mmark_number != -1);
|
CGAL_assertion(mmark_number != -1);
|
||||||
CGAL_assertion(this->cont());
|
CGAL_assertion(this->cont());
|
||||||
|
|
||||||
Dart_handle nd = NULL;
|
Dart_handle nd = this->mmap->null_handle;
|
||||||
|
|
||||||
for ( unsigned int k=2; k<=d; ++k )
|
for ( unsigned int k=2; k<=d; ++k )
|
||||||
{
|
{
|
||||||
if ( this->is_unmarked2((*this), 0, k, mmark_number) )
|
if ( this->is_unmarked2((*this), 0, k, mmark_number) )
|
||||||
{
|
{
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
nd = this->mmap->beta(*this, 0, k);
|
nd = this->mmap->beta(*this, 0, k);
|
||||||
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
||||||
|
|
@ -1427,7 +1427,7 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
if ( this->is_unmarked2((*this), k, 1, mmark_number) )
|
if ( this->is_unmarked2((*this), k, 1, mmark_number) )
|
||||||
{
|
{
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
nd = this->mmap->beta(*this, k, 1);
|
nd = this->mmap->beta(*this, k, 1);
|
||||||
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
||||||
|
|
@ -1443,7 +1443,7 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
if ( this->is_unmarked2((*this), k, l, mmark_number) )
|
if ( this->is_unmarked2((*this), k, l, mmark_number) )
|
||||||
{
|
{
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
nd = this->mmap->beta(*this, k, l);
|
nd = this->mmap->beta(*this, k, l);
|
||||||
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
||||||
|
|
@ -1457,7 +1457,7 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
if ( this->is_unmarked2((*this), l, k, mmark_number) )
|
if ( this->is_unmarked2((*this), l, k, mmark_number) )
|
||||||
{
|
{
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
nd = this->mmap->beta(*this, l, k);
|
nd = this->mmap->beta(*this, l, k);
|
||||||
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
||||||
|
|
@ -1472,7 +1472,7 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
if (!mto_treat.empty())
|
if (!mto_treat.empty())
|
||||||
{
|
{
|
||||||
|
|
@ -1484,7 +1484,7 @@ namespace CGAL {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1720,7 +1720,7 @@ namespace CGAL {
|
||||||
if ((*this)==this->mmap->null_dart_handle)
|
if ((*this)==this->mmap->null_dart_handle)
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1732,7 +1732,7 @@ namespace CGAL {
|
||||||
if ((*this)==this->mfirst_dart)
|
if ((*this)==this->mfirst_dart)
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
this->mprev_op = OP_BETA0I;
|
this->mprev_op = OP_BETA0I;
|
||||||
|
|
@ -1744,7 +1744,7 @@ namespace CGAL {
|
||||||
if ((*this) == this->mmap->null_dart_handle)
|
if ((*this) == this->mmap->null_dart_handle)
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
this->mprev_op = OP_BETA21;
|
this->mprev_op = OP_BETA21;
|
||||||
|
|
@ -1904,7 +1904,7 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
CGAL_assertion( d>=3 && d<=Map::dimension );
|
CGAL_assertion( d>=3 && d<=Map::dimension );
|
||||||
CGAL_assertion( i>=3 && i<=Map::dimension );
|
CGAL_assertion( i>=3 && i<=Map::dimension );
|
||||||
if (adart!=NULL)
|
if (adart!=this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
this->mmap->mark(adart, mmark_number);
|
this->mmap->mark(adart, mmark_number);
|
||||||
this->mmap->mark_null_dart(mmark_number);
|
this->mmap->mark_null_dart(mmark_number);
|
||||||
|
|
@ -1927,13 +1927,13 @@ namespace CGAL {
|
||||||
CGAL_assertion(mmark_number != -1);
|
CGAL_assertion(mmark_number != -1);
|
||||||
CGAL_assertion(this->cont());
|
CGAL_assertion(this->cont());
|
||||||
|
|
||||||
Dart_handle nd = NULL;
|
Dart_handle nd = this->mmap->null_handle;
|
||||||
|
|
||||||
for ( int k=0; k<2; ++k )
|
for ( int k=0; k<2; ++k )
|
||||||
{
|
{
|
||||||
if ( this->is_unmarked((*this), k, mmark_number) )
|
if ( this->is_unmarked((*this), k, mmark_number) )
|
||||||
{
|
{
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
nd = this->mmap->beta(*this, k);
|
nd = this->mmap->beta(*this, k);
|
||||||
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
||||||
|
|
@ -1952,7 +1952,7 @@ namespace CGAL {
|
||||||
if ( k!=i-1 && k!=i && k!=i+1 &&
|
if ( k!=i-1 && k!=i && k!=i+1 &&
|
||||||
this->is_unmarked((*this), k, mmark_number) )
|
this->is_unmarked((*this), k, mmark_number) )
|
||||||
{
|
{
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
nd = this->mmap->beta(*this, k);
|
nd = this->mmap->beta(*this, k);
|
||||||
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
||||||
|
|
@ -1966,7 +1966,7 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
if (!mto_treat.empty())
|
if (!mto_treat.empty())
|
||||||
{
|
{
|
||||||
|
|
@ -1977,7 +1977,7 @@ namespace CGAL {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2026,7 +2026,7 @@ namespace CGAL {
|
||||||
mmark_number(amark)
|
mmark_number(amark)
|
||||||
{
|
{
|
||||||
CGAL_assertion( i>=3 && i<=Map::dimension );
|
CGAL_assertion( i>=3 && i<=Map::dimension );
|
||||||
if (adart!=NULL)
|
if (adart!=this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
this->mmap->mark(adart, mmark_number);
|
this->mmap->mark(adart, mmark_number);
|
||||||
this->mmap->mark_null_dart(mmark_number);
|
this->mmap->mark_null_dart(mmark_number);
|
||||||
|
|
@ -2049,13 +2049,13 @@ namespace CGAL {
|
||||||
CGAL_assertion(mmark_number != -1);
|
CGAL_assertion(mmark_number != -1);
|
||||||
CGAL_assertion(this->cont());
|
CGAL_assertion(this->cont());
|
||||||
|
|
||||||
Dart_handle nd = NULL;
|
Dart_handle nd = this->mmap->null_handle;
|
||||||
|
|
||||||
for ( int k=1; k>=0; --k )
|
for ( int k=1; k>=0; --k )
|
||||||
{
|
{
|
||||||
if ( this->is_unmarked((*this), k, mmark_number) )
|
if ( this->is_unmarked((*this), k, mmark_number) )
|
||||||
{
|
{
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
nd = this->mmap->beta(*this, k);
|
nd = this->mmap->beta(*this, k);
|
||||||
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
||||||
|
|
@ -2073,7 +2073,7 @@ namespace CGAL {
|
||||||
if ( k!=i-1 && k!=i && k!=i+1 &&
|
if ( k!=i-1 && k!=i && k!=i+1 &&
|
||||||
this->is_unmarked((*this), k, mmark_number) )
|
this->is_unmarked((*this), k, mmark_number) )
|
||||||
{
|
{
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
nd = this->mmap->beta(*this, k);
|
nd = this->mmap->beta(*this, k);
|
||||||
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
||||||
|
|
@ -2087,7 +2087,7 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
if (!mto_treat.empty())
|
if (!mto_treat.empty())
|
||||||
{
|
{
|
||||||
|
|
@ -2098,7 +2098,7 @@ namespace CGAL {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2143,7 +2143,7 @@ namespace CGAL {
|
||||||
int amark):
|
int amark):
|
||||||
Base(amap, adart),
|
Base(amap, adart),
|
||||||
mmark_number(amark)
|
mmark_number(amark)
|
||||||
{ if (adart!=NULL)
|
{ if (adart!=this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
this->mmap->mark(adart, mmark_number);
|
this->mmap->mark(adart, mmark_number);
|
||||||
this->mmap->mark_null_dart(mmark_number);
|
this->mmap->mark_null_dart(mmark_number);
|
||||||
|
|
@ -2166,13 +2166,13 @@ namespace CGAL {
|
||||||
CGAL_assertion(mmark_number != -1);
|
CGAL_assertion(mmark_number != -1);
|
||||||
CGAL_assertion(this->cont());
|
CGAL_assertion(this->cont());
|
||||||
|
|
||||||
Dart_handle nd = NULL;
|
Dart_handle nd = this->mmap->null_handle;
|
||||||
|
|
||||||
for ( unsigned int k=3; k<=d; ++k )
|
for ( unsigned int k=3; k<=d; ++k )
|
||||||
{
|
{
|
||||||
if ( this->is_unmarked((*this), k, mmark_number) )
|
if ( this->is_unmarked((*this), k, mmark_number) )
|
||||||
{
|
{
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
nd = this->mmap->beta(*this, k);
|
nd = this->mmap->beta(*this, k);
|
||||||
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
||||||
|
|
@ -2186,7 +2186,7 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
if (!mto_treat.empty())
|
if (!mto_treat.empty())
|
||||||
{
|
{
|
||||||
|
|
@ -2197,7 +2197,7 @@ namespace CGAL {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2269,7 +2269,7 @@ namespace CGAL {
|
||||||
int amark):
|
int amark):
|
||||||
Base(amap, adart),
|
Base(amap, adart),
|
||||||
mmark_number(amark)
|
mmark_number(amark)
|
||||||
{ if ( adart!=NULL)
|
{ if ( adart!=this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
this->mmap->mark(adart, mmark_number);
|
this->mmap->mark(adart, mmark_number);
|
||||||
this->mmap->mark_null_dart(mmark_number);
|
this->mmap->mark_null_dart(mmark_number);
|
||||||
|
|
@ -2292,13 +2292,13 @@ namespace CGAL {
|
||||||
CGAL_assertion(mmark_number != -1);
|
CGAL_assertion(mmark_number != -1);
|
||||||
CGAL_assertion(this->cont());
|
CGAL_assertion(this->cont());
|
||||||
|
|
||||||
Dart_handle nd = NULL;
|
Dart_handle nd = this->mmap->null_handle;
|
||||||
|
|
||||||
for ( unsigned int k=4; k<=d; ++k )
|
for ( unsigned int k=4; k<=d; ++k )
|
||||||
{
|
{
|
||||||
if ( this->is_unmarked((*this), k, mmark_number) )
|
if ( this->is_unmarked((*this), k, mmark_number) )
|
||||||
{
|
{
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
nd = this->mmap->beta(*this, k);
|
nd = this->mmap->beta(*this, k);
|
||||||
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
CGAL_assertion(nd!=this->mmap->null_dart_handle);
|
||||||
|
|
@ -2312,7 +2312,7 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (nd == NULL)
|
if (nd == this->mmap->null_handle)
|
||||||
{
|
{
|
||||||
if (!mto_treat.empty())
|
if (!mto_treat.empty())
|
||||||
{
|
{
|
||||||
|
|
@ -2323,7 +2323,7 @@ namespace CGAL {
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->mprev_op = OP_END;
|
this->mprev_op = OP_END;
|
||||||
this->set_current_dart(NULL);
|
this->set_current_dart(this->mmap->null_handle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ struct CreateAttributes
|
||||||
for(typename Map::Dart_range::iterator it=map.darts().begin(),
|
for(typename Map::Dart_range::iterator it=map.darts().begin(),
|
||||||
itend=map.darts().end(); it!=itend; ++it)
|
itend=map.darts().end(); it!=itend; ++it)
|
||||||
{
|
{
|
||||||
if ( it->template attribute<i>()==NULL )
|
if ( it->template attribute<i>()==map.null_handle )
|
||||||
map.template set_attribute<i>
|
map.template set_attribute<i>
|
||||||
(it, map.template create_attribute<i>(++nb));
|
(it, map.template create_attribute<i>(++nb));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ public:
|
||||||
Vertex operator () (Vertex & v) const
|
Vertex operator () (Vertex & v) const
|
||||||
{
|
{
|
||||||
Dart_handle d = v.dart ();
|
Dart_handle d = v.dart ();
|
||||||
CGAL_assertion (d != NULL);
|
|
||||||
|
|
||||||
int degree = 0;
|
int degree = 0;
|
||||||
bool open = false;
|
bool open = false;
|
||||||
|
|
@ -83,7 +82,7 @@ flip_edge (LCC & m, Dart_handle d)
|
||||||
CGAL_assertion ( !m.is_free(d,1) && !m.is_free(d,0) );
|
CGAL_assertion ( !m.is_free(d,1) && !m.is_free(d,0) );
|
||||||
CGAL_assertion ( !m.is_free(m.beta(d,2), 0) && !m.is_free(m.beta(d, 2), 1) );
|
CGAL_assertion ( !m.is_free(m.beta(d,2), 0) && !m.is_free(m.beta(d, 2), 1) );
|
||||||
|
|
||||||
if (!CGAL::is_removable<LCC,1>(m,d)) return NULL;
|
if (!CGAL::is_removable<LCC,1>(m,d)) return LCC::null_handle;
|
||||||
|
|
||||||
Dart_handle d1 = m.beta(d,1);
|
Dart_handle d1 = m.beta(d,1);
|
||||||
Dart_handle d2 = m.beta(d,2,0);
|
Dart_handle d2 = m.beta(d,2,0);
|
||||||
|
|
@ -170,12 +169,11 @@ subdivide_lcc_3 (LCC & m)
|
||||||
|
|
||||||
// 4) We flip all the old edges.
|
// 4) We flip all the old edges.
|
||||||
m.negate_mark (mark); // Now only new darts are marked.
|
m.negate_mark (mark); // Now only new darts are marked.
|
||||||
Dart_handle d2 = NULL;
|
Dart_handle d2 =LCC::null_handle;
|
||||||
for (LCC::Dart_range::iterator it (m.darts().begin ());
|
for (LCC::Dart_range::iterator it (m.darts().begin ());
|
||||||
it != m.darts().end ();)
|
it != m.darts().end ();)
|
||||||
{
|
{
|
||||||
d2 = it++;
|
d2 = it++;
|
||||||
CGAL_assertion (d2 != NULL);
|
|
||||||
if (!m.is_marked (d2, mark)) // This is an old dart.
|
if (!m.is_marked (d2, mark)) // This is an old dart.
|
||||||
{
|
{
|
||||||
// We process only the last dart of a same edge.
|
// We process only the last dart of a same edge.
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ public:
|
||||||
Vertex operator () (Vertex & v) const
|
Vertex operator () (Vertex & v) const
|
||||||
{
|
{
|
||||||
Dart_handle d = v.dart ();
|
Dart_handle d = v.dart ();
|
||||||
CGAL_assertion (d != NULL);
|
|
||||||
|
|
||||||
// Old points aren't concerned.
|
// Old points aren't concerned.
|
||||||
if (mlcc.is_marked(d, old))
|
if (mlcc.is_marked(d, old))
|
||||||
|
|
@ -119,7 +118,6 @@ public:
|
||||||
Vertex operator () (Vertex & v) const
|
Vertex operator () (Vertex & v) const
|
||||||
{
|
{
|
||||||
Dart_handle d = v.dart ();
|
Dart_handle d = v.dart ();
|
||||||
CGAL_assertion (d != NULL);
|
|
||||||
|
|
||||||
// Just old points are concerned.
|
// Just old points are concerned.
|
||||||
if (!mlcc.is_marked(d, old))
|
if (!mlcc.is_marked(d, old))
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ void MainWindow::clear_all()
|
||||||
|
|
||||||
void MainWindow::on_new_volume(Dart_handle adart)
|
void MainWindow::on_new_volume(Dart_handle adart)
|
||||||
{
|
{
|
||||||
CGAL_assertion( scene.lcc->attribute<3>(adart)==NULL);
|
CGAL_assertion( scene.lcc->attribute<3>(adart)==LCC::null_handle);
|
||||||
CGAL::Set_i_attribute_functor<LCC, 3>::
|
CGAL::Set_i_attribute_functor<LCC, 3>::
|
||||||
run(scene.lcc, adart, scene.lcc->create_attribute<3>());
|
run(scene.lcc, adart, scene.lcc->create_attribute<3>());
|
||||||
update_volume_list_add(scene.lcc->attribute<3>(adart));
|
update_volume_list_add(scene.lcc->attribute<3>(adart));
|
||||||
|
|
@ -178,7 +178,7 @@ void MainWindow::init_all_new_volumes()
|
||||||
for (LCC::One_dart_per_cell_range<3>::iterator
|
for (LCC::One_dart_per_cell_range<3>::iterator
|
||||||
it(scene.lcc->one_dart_per_cell<3>().begin());
|
it(scene.lcc->one_dart_per_cell<3>().begin());
|
||||||
it.cont(); ++it)
|
it.cont(); ++it)
|
||||||
if ( scene.lcc->attribute<3>(it)==NULL )
|
if ( scene.lcc->attribute<3>(it)==LCC::null_handle )
|
||||||
{ on_new_volume(it); }
|
{ on_new_volume(it); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -751,7 +751,7 @@ void MainWindow::on_actionMerge_all_volumes_triggered()
|
||||||
timer.start();
|
timer.start();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Dart_handle prev = NULL;
|
Dart_handle prev = scene.lcc->null_handle;
|
||||||
for (LCC::Dart_range::iterator it(scene.lcc->darts().begin()),
|
for (LCC::Dart_range::iterator it(scene.lcc->darts().begin()),
|
||||||
itend=scene.lcc->darts().end(); it!=itend; )
|
itend=scene.lcc->darts().end(); it!=itend; )
|
||||||
{
|
{
|
||||||
|
|
@ -762,7 +762,7 @@ void MainWindow::on_actionMerge_all_volumes_triggered()
|
||||||
{
|
{
|
||||||
CGAL::remove_cell<LCC,2>(*scene.lcc,it);
|
CGAL::remove_cell<LCC,2>(*scene.lcc,it);
|
||||||
itend=scene.lcc->darts().end();
|
itend=scene.lcc->darts().end();
|
||||||
if ( prev==NULL ) it=scene.lcc->darts().begin();
|
if ( prev==scene.lcc->null_handle ) it=scene.lcc->darts().begin();
|
||||||
else { it=prev; if ( it!=itend ) ++it; }
|
else { it=prev; if ( it!=itend ) ++it; }
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ void Viewer::drawFacet(Dart_const_handle ADart)
|
||||||
{
|
{
|
||||||
LCC &m = *scene->lcc;
|
LCC &m = *scene->lcc;
|
||||||
::glBegin(GL_POLYGON);
|
::glBegin(GL_POLYGON);
|
||||||
CGAL_assertion( m.attribute<3>(ADart)!=NULL );
|
CGAL_assertion( m.attribute<3>(ADart)!=LCC::null_handle );
|
||||||
|
|
||||||
// double r = (double)ADart->attribute<3>()->info().r()/255.0;
|
// double r = (double)ADart->attribute<3>()->info().r()/255.0;
|
||||||
double r = (double)m.info<3>(ADart).color().r()/255.0;
|
double r = (double)m.info<3>(ADart).color().r()/255.0;
|
||||||
|
|
@ -128,7 +128,7 @@ void Viewer::drawEdges(Dart_const_handle ADart)
|
||||||
{
|
{
|
||||||
LCC::Point p = m.point(it);
|
LCC::Point p = m.point(it);
|
||||||
Dart_const_handle d2 = m.other_extremity(it);
|
Dart_const_handle d2 = m.other_extremity(it);
|
||||||
if ( d2!=NULL )
|
if ( d2!=LCC::null_handle )
|
||||||
{
|
{
|
||||||
LCC::Point p2 = m.point(d2);
|
LCC::Point p2 = m.point(d2);
|
||||||
glVertex3f( p.x(),p.y(),p.z());
|
glVertex3f( p.x(),p.y(),p.z());
|
||||||
|
|
@ -158,7 +158,7 @@ void Viewer::draw_one_vol(Dart_const_handle adart, bool filled)
|
||||||
for (LCC::One_dart_per_incident_cell_range<1,3>::const_iterator
|
for (LCC::One_dart_per_incident_cell_range<1,3>::const_iterator
|
||||||
it(m,adart); it.cont(); ++it)
|
it(m,adart); it.cont(); ++it)
|
||||||
{
|
{
|
||||||
if ( m.other_extremity(it)!=NULL )
|
if ( m.other_extremity(it)!=LCC::null_handle )
|
||||||
{
|
{
|
||||||
LCC::Point p1 = m.point(it);
|
LCC::Point p1 = m.point(it);
|
||||||
LCC::Point p2 = m.point(m.other_extremity(it));
|
LCC::Point p2 = m.point(m.other_extremity(it));
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,7 @@ namespace CGAL {
|
||||||
for (typename Dart_range::const_iterator it(this->darts().begin()),
|
for (typename Dart_range::const_iterator it(this->darts().begin()),
|
||||||
itend(this->darts().end()); valid && it != itend; ++it)
|
itend(this->darts().end()); valid && it != itend; ++it)
|
||||||
{
|
{
|
||||||
if ( vertex_attribute(it) == NULL )
|
if ( vertex_attribute(it)==null_handle )
|
||||||
{
|
{
|
||||||
std::cerr << "Map not valid: dart "<<&(*it)
|
std::cerr << "Map not valid: dart "<<&(*it)
|
||||||
<<" does not have a vertex."<< std::endl;
|
<<" does not have a vertex."<< std::endl;
|
||||||
|
|
@ -344,7 +344,7 @@ namespace CGAL {
|
||||||
bool samegeometry = true;
|
bool samegeometry = true;
|
||||||
for ( ; samegeometry && it1.cont() && it2.cont(); ++it1, ++it2)
|
for ( ; samegeometry && it1.cont() && it2.cont(); ++it1, ++it2)
|
||||||
{
|
{
|
||||||
if ( this->other_extremity(it2)!=NULL &&
|
if ( this->other_extremity(it2)!=null_handle &&
|
||||||
point(it1)!=point(this->other_extremity(it2)) )
|
point(it1)!=point(this->other_extremity(it2)) )
|
||||||
samegeometry = false;
|
samegeometry = false;
|
||||||
}
|
}
|
||||||
|
|
@ -686,7 +686,7 @@ namespace CGAL {
|
||||||
|
|
||||||
Dart_handle first = CGAL::insert_cell_0_in_cell_2(*this, dh, v);
|
Dart_handle first = CGAL::insert_cell_0_in_cell_2(*this, dh, v);
|
||||||
|
|
||||||
if ( first== NULL ) // If the triangulated facet was made of one dart
|
if ( first==null_handle ) // If the triangulated facet was made of one dart
|
||||||
erase_vertex_attribute(v);
|
erase_vertex_attribute(v);
|
||||||
|
|
||||||
#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
|
#ifdef CGAL_CMAP_TEST_VALID_INSERTIONS
|
||||||
|
|
@ -739,7 +739,7 @@ namespace CGAL {
|
||||||
* simultaneously through all the darts of the two lcc and we have
|
* simultaneously through all the darts of the two lcc and we have
|
||||||
* each time of the iteration two "dual" darts.
|
* each time of the iteration two "dual" darts.
|
||||||
*/
|
*/
|
||||||
Dart_handle dual_points_at_barycenter(Self & alcc, Dart_handle adart=NULL)
|
Dart_handle dual_points_at_barycenter(Self & alcc, Dart_handle adart=null_handle)
|
||||||
{
|
{
|
||||||
Dart_handle res = Base::dual(alcc, adart);
|
Dart_handle res = Base::dual(alcc, adart);
|
||||||
|
|
||||||
|
|
@ -750,7 +750,7 @@ namespace CGAL {
|
||||||
for (typename Dart_range::iterator it(this->darts().begin());
|
for (typename Dart_range::iterator it(this->darts().begin());
|
||||||
it!=this->darts().end(); ++it, ++it2)
|
it!=this->darts().end(); ++it, ++it2)
|
||||||
{
|
{
|
||||||
if (vertex_attribute(it2) == NULL)
|
if (vertex_attribute(it2)==null_handle)
|
||||||
{
|
{
|
||||||
alcc.set_vertex_attribute(it2, alcc.create_vertex_attribute
|
alcc.set_vertex_attribute(it2, alcc.create_vertex_attribute
|
||||||
(barycenter<dimension>(it)));
|
(barycenter<dimension>(it)));
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ namespace CGAL {
|
||||||
|
|
||||||
std::string txt;
|
std::string txt;
|
||||||
typename LCC::FT x, y;
|
typename LCC::FT x, y;
|
||||||
Dart_handle d1 = NULL, d2 = NULL;
|
Dart_handle d1 = alcc.null_handle, d2 = alcc.null_handle;
|
||||||
unsigned int v1, v2;
|
unsigned int v1, v2;
|
||||||
|
|
||||||
unsigned int nbSommets = 0;
|
unsigned int nbSommets = 0;
|
||||||
|
|
@ -76,7 +76,7 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
std::cout << "Problem: file does not contain enough vertices."
|
std::cout << "Problem: file does not contain enough vertices."
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return NULL;
|
return alcc.null_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
ais >> x >> y;
|
ais >> x >> y;
|
||||||
|
|
@ -92,7 +92,7 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
std::cout << "Problem: file does not contain enough edges."
|
std::cout << "Problem: file does not contain enough edges."
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return NULL;
|
return alcc.null_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We read an egde (given by the number of its two vertices).
|
// We read an egde (given by the number of its two vertices).
|
||||||
|
|
@ -115,8 +115,8 @@ namespace CGAL {
|
||||||
List_iterator it;
|
List_iterator it;
|
||||||
LCC_iterator it2;
|
LCC_iterator it2;
|
||||||
|
|
||||||
Dart_handle first = NULL;
|
Dart_handle first = alcc.null_handle;
|
||||||
Dart_handle prec = NULL;
|
Dart_handle prec = alcc.null_handle;
|
||||||
typename LCC::Point sommet1, sommet2;
|
typename LCC::Point sommet1, sommet2;
|
||||||
|
|
||||||
for (unsigned int i = 0; i < initVertices.size(); ++i)
|
for (unsigned int i = 0; i < initVertices.size(); ++i)
|
||||||
|
|
@ -182,10 +182,10 @@ namespace CGAL {
|
||||||
CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==2 );
|
CGAL_static_assertion( LCC::dimension>=2 && LCC::ambient_dimension==2 );
|
||||||
|
|
||||||
// Case of empty triangulations.
|
// Case of empty triangulations.
|
||||||
if (atr.number_of_vertices() == 0) return NULL;
|
if (atr.number_of_vertices() == 0) return LCC::null_handle;
|
||||||
|
|
||||||
// Check the dimension.
|
// Check the dimension.
|
||||||
if (atr.dimension() != 2) return NULL;
|
if (atr.dimension() != 2) return LCC::null_handle;
|
||||||
CGAL_assertion(atr.is_valid());
|
CGAL_assertion(atr.is_valid());
|
||||||
|
|
||||||
typedef typename Triangulation::Vertex_handle TVertex_handle;
|
typedef typename Triangulation::Vertex_handle TVertex_handle;
|
||||||
|
|
@ -213,8 +213,8 @@ namespace CGAL {
|
||||||
|
|
||||||
itmap_tcell maptcell_it;
|
itmap_tcell maptcell_it;
|
||||||
|
|
||||||
typename LCC::Dart_handle res=NULL, dart=NULL;
|
typename LCC::Dart_handle res=LCC::null_handle, dart=LCC::null_handle;
|
||||||
typename LCC::Dart_handle cur=NULL, neighbor=NULL;
|
typename LCC::Dart_handle cur=LCC::null_handle, neighbor=LCC::null_handle;
|
||||||
|
|
||||||
for (it = atr.all_faces_begin(); it != atr.all_faces_end(); ++it)
|
for (it = atr.all_faces_begin(); it != atr.all_faces_end(); ++it)
|
||||||
{
|
{
|
||||||
|
|
@ -228,7 +228,7 @@ namespace CGAL {
|
||||||
TV[it->vertex(1)],
|
TV[it->vertex(1)],
|
||||||
TV[it->vertex(2)]);
|
TV[it->vertex(2)]);
|
||||||
|
|
||||||
if ( dart==NULL )
|
if ( dart==LCC::null_handle )
|
||||||
{
|
{
|
||||||
if ( it->vertex(0) == atr.infinite_vertex() )
|
if ( it->vertex(0) == atr.infinite_vertex() )
|
||||||
dart = res;
|
dart = res;
|
||||||
|
|
@ -265,7 +265,7 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CGAL_assertion(dart!=NULL);
|
CGAL_assertion(dart!=LCC::null_handle);
|
||||||
return dart;
|
return dart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -285,10 +285,10 @@ namespace CGAL {
|
||||||
CGAL_static_assertion( LCC::dimension>=3 && LCC::ambient_dimension==3 );
|
CGAL_static_assertion( LCC::dimension>=3 && LCC::ambient_dimension==3 );
|
||||||
|
|
||||||
// Case of empty triangulations.
|
// Case of empty triangulations.
|
||||||
if (atr.number_of_vertices() == 0) return NULL;
|
if (atr.number_of_vertices() == 0) return LCC::null_handle;
|
||||||
|
|
||||||
// Check the dimension.
|
// Check the dimension.
|
||||||
if (atr.dimension() != 3) return NULL;
|
if (atr.dimension() != 3) return LCC::null_handle;
|
||||||
CGAL_assertion(atr.is_valid());
|
CGAL_assertion(atr.is_valid());
|
||||||
|
|
||||||
typedef typename Triangulation::Vertex_handle TVertex_handle;
|
typedef typename Triangulation::Vertex_handle TVertex_handle;
|
||||||
|
|
@ -316,8 +316,8 @@ namespace CGAL {
|
||||||
|
|
||||||
itmap_tcell maptcell_it;
|
itmap_tcell maptcell_it;
|
||||||
|
|
||||||
typename LCC::Dart_handle res=NULL, dart=NULL;
|
typename LCC::Dart_handle res=LCC::null_handle, dart=LCC::null_handle;
|
||||||
typename LCC::Dart_handle cur=NULL, neighbor=NULL;
|
typename LCC::Dart_handle cur=LCC::null_handle, neighbor=LCC::null_handle;
|
||||||
|
|
||||||
for (it = atr.cells_begin(); it != atr.cells_end(); ++it)
|
for (it = atr.cells_begin(); it != atr.cells_end(); ++it)
|
||||||
{
|
{
|
||||||
|
|
@ -332,7 +332,7 @@ namespace CGAL {
|
||||||
TV[it->vertex(2)],
|
TV[it->vertex(2)],
|
||||||
TV[it->vertex(3)]);
|
TV[it->vertex(3)]);
|
||||||
|
|
||||||
if ( dart==NULL )
|
if ( dart==LCC::null_handle )
|
||||||
{
|
{
|
||||||
if ( it->vertex(0) == atr.infinite_vertex() )
|
if ( it->vertex(0) == atr.infinite_vertex() )
|
||||||
dart = res;
|
dart = res;
|
||||||
|
|
@ -375,7 +375,7 @@ namespace CGAL {
|
||||||
(*mytc)[it] = res;
|
(*mytc)[it] = res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CGAL_assertion(dart!=NULL);
|
CGAL_assertion(dart!=LCC::null_handle);
|
||||||
return dart;
|
return dart;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -401,20 +401,20 @@ namespace CGAL {
|
||||||
Halfedge_handle_map TC;
|
Halfedge_handle_map TC;
|
||||||
|
|
||||||
itmap_hds it;
|
itmap_hds it;
|
||||||
typename LCC::Dart_handle d = NULL, prev = NULL;
|
typename LCC::Dart_handle d = LCC::null_handle, prev = LCC::null_handle;
|
||||||
typename LCC::Dart_handle firstFacet = NULL, firstAll = NULL;
|
typename LCC::Dart_handle firstFacet = LCC::null_handle, firstAll = LCC::null_handle;
|
||||||
|
|
||||||
// First traversal to build the darts and link them.
|
// First traversal to build the darts and link them.
|
||||||
for (Facet_iterator i = apoly.facets_begin(); i != apoly.facets_end(); ++i)
|
for (Facet_iterator i = apoly.facets_begin(); i != apoly.facets_end(); ++i)
|
||||||
{
|
{
|
||||||
HF_circulator j = i->facet_begin();
|
HF_circulator j = i->facet_begin();
|
||||||
prev = NULL;
|
prev = LCC::null_handle;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
d = alcc.create_dart();
|
d = alcc.create_dart();
|
||||||
TC[j] = d;
|
TC[j] = d;
|
||||||
|
|
||||||
if (prev != NULL) alcc.template link_beta<1>(prev, d);
|
if (prev != LCC::null_handle) alcc.template link_beta<1>(prev, d);
|
||||||
else firstFacet = d;
|
else firstFacet = d;
|
||||||
it = TC.find(j->opposite());
|
it = TC.find(j->opposite());
|
||||||
if (it != TC.end())
|
if (it != TC.end())
|
||||||
|
|
@ -423,7 +423,7 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
while (++j != i->facet_begin());
|
while (++j != i->facet_begin());
|
||||||
alcc.template link_beta<1>(prev, firstFacet);
|
alcc.template link_beta<1>(prev, firstFacet);
|
||||||
if (firstAll == NULL) firstAll = firstFacet;
|
if (firstAll == LCC::null_handle) firstAll = firstFacet;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Second traversal to update the geometry.
|
// Second traversal to update the geometry.
|
||||||
|
|
@ -434,7 +434,7 @@ namespace CGAL {
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
d = TC[j]; // Get the dart associated to the Halfedge
|
d = TC[j]; // Get the dart associated to the Halfedge
|
||||||
if (alcc.temp_vertex_attribute(d) == NULL)
|
if (alcc.temp_vertex_attribute(d) == LCC::null_handle)
|
||||||
{
|
{
|
||||||
alcc.set_vertex_attribute
|
alcc.set_vertex_attribute
|
||||||
(d, alcc.create_vertex_attribute(j->opposite()->vertex()->point()));
|
(d, alcc.create_vertex_attribute(j->opposite()->vertex()->point()));
|
||||||
|
|
@ -537,7 +537,7 @@ namespace CGAL {
|
||||||
if (!ais.good())
|
if (!ais.good())
|
||||||
{
|
{
|
||||||
std::cout << "Error reading flux." << std::endl;
|
std::cout << "Error reading flux." << std::endl;
|
||||||
return NULL;
|
return LCC::null_handle;
|
||||||
}
|
}
|
||||||
CGAL::Polyhedron_3<typename LCC::Traits> P;
|
CGAL::Polyhedron_3<typename LCC::Traits> P;
|
||||||
ais >> P;
|
ais >> P;
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ namespace CGAL {
|
||||||
|
|
||||||
void begin_facet()
|
void begin_facet()
|
||||||
{
|
{
|
||||||
CGAL_assertion( first_dart==NULL && prev_dart==NULL );
|
CGAL_assertion( first_dart==lcc.null_handle && prev_dart==lcc.null_handle );
|
||||||
// std::cout<<"Begin facet: "<<std::flush;
|
// std::cout<<"Begin facet: "<<std::flush;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -60,12 +60,12 @@ namespace CGAL {
|
||||||
// std::cout<<i<<" "<<std::flush;
|
// std::cout<<i<<" "<<std::flush;
|
||||||
Dart_handle cur = lcc.create_dart(vertex_map[i]);
|
Dart_handle cur = lcc.create_dart(vertex_map[i]);
|
||||||
|
|
||||||
if ( prev_dart!=NULL )
|
if ( prev_dart!=lcc.null_handle )
|
||||||
{
|
{
|
||||||
lcc.template link_beta<1>(prev_dart, cur);
|
lcc.template link_beta<1>(prev_dart, cur);
|
||||||
|
|
||||||
Dart_handle opposite=find_dart_between(i,lcc.temp_vertex_attribute(prev_dart));
|
Dart_handle opposite=find_dart_between(i,lcc.temp_vertex_attribute(prev_dart));
|
||||||
if ( opposite!=NULL )
|
if ( opposite!=lcc.null_handle )
|
||||||
{
|
{
|
||||||
CGAL_assertion( lcc.template is_free<2>(opposite) );
|
CGAL_assertion( lcc.template is_free<2>(opposite) );
|
||||||
lcc.template link_beta<2>(prev_dart, opposite);
|
lcc.template link_beta<2>(prev_dart, opposite);
|
||||||
|
|
@ -85,12 +85,12 @@ namespace CGAL {
|
||||||
|
|
||||||
void end_facet()
|
void end_facet()
|
||||||
{
|
{
|
||||||
CGAL_assertion( first_dart!=NULL && prev_dart!=NULL );
|
CGAL_assertion( first_dart!=lcc.null_handle && prev_dart!=lcc.null_handle );
|
||||||
lcc.template link_beta<1>(prev_dart, first_dart);
|
lcc.template link_beta<1>(prev_dart, first_dart);
|
||||||
|
|
||||||
Dart_handle opposite =
|
Dart_handle opposite =
|
||||||
find_dart_between(first_vertex,lcc.temp_vertex_attribute(prev_dart));
|
find_dart_between(first_vertex,lcc.temp_vertex_attribute(prev_dart));
|
||||||
if ( opposite!=NULL )
|
if ( opposite!=lcc.null_handle )
|
||||||
{
|
{
|
||||||
CGAL_assertion( lcc.template is_free<2>(opposite) );
|
CGAL_assertion( lcc.template is_free<2>(opposite) );
|
||||||
lcc.template link_beta<2>(prev_dart, opposite);
|
lcc.template link_beta<2>(prev_dart, opposite);
|
||||||
|
|
@ -98,16 +98,16 @@ namespace CGAL {
|
||||||
|
|
||||||
add_dart_in_vertex_to_dart_map( prev_dart, prev_vertex );
|
add_dart_in_vertex_to_dart_map( prev_dart, prev_vertex );
|
||||||
|
|
||||||
first_dart = NULL;
|
first_dart = lcc.null_handle;
|
||||||
prev_dart = NULL;
|
prev_dart = lcc.null_handle;
|
||||||
// std::cout<<" end facet."<<std::endl;
|
// std::cout<<" end facet."<<std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void begin_surface( std::size_t v, std::size_t /*f*/, std::size_t /*h*/)
|
void begin_surface( std::size_t v, std::size_t /*f*/, std::size_t /*h*/)
|
||||||
{
|
{
|
||||||
new_vertices = 0;
|
new_vertices = 0;
|
||||||
first_dart = NULL;
|
first_dart = lcc.null_handle;
|
||||||
prev_dart = NULL;
|
prev_dart = lcc.null_handle;
|
||||||
vertex_map.clear();
|
vertex_map.clear();
|
||||||
vertex_to_dart_map.clear();
|
vertex_to_dart_map.clear();
|
||||||
vertex_map.reserve(v);
|
vertex_map.reserve(v);
|
||||||
|
|
@ -131,12 +131,12 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
if ( lcc.temp_vertex_attribute(lcc.template beta<1>(*it))==vh ) return (*it);
|
if ( lcc.temp_vertex_attribute(lcc.template beta<1>(*it))==vh ) return (*it);
|
||||||
}
|
}
|
||||||
return NULL;
|
return lcc.null_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void add_dart_in_vertex_to_dart_map( Dart_handle adart, size_type i )
|
void add_dart_in_vertex_to_dart_map( Dart_handle adart, size_type i )
|
||||||
{
|
{
|
||||||
CGAL_assertion( adart!=NULL );
|
CGAL_assertion( adart!=lcc.null_handle );
|
||||||
CGAL_assertion( !lcc.template is_free<1>(adart) );
|
CGAL_assertion( !lcc.template is_free<1>(adart) );
|
||||||
vertex_to_dart_map[i].push_back(adart);
|
vertex_to_dart_map[i].push_back(adart);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ namespace CGAL {
|
||||||
start = amap.template beta<0>(start);
|
start = amap.template beta<0>(start);
|
||||||
|
|
||||||
if ( amap.template is_free<1>(start) ||
|
if ( amap.template is_free<1>(start) ||
|
||||||
amap.other_extremity(amap.template beta<1>(start))==NULL )
|
amap.other_extremity(amap.template beta<1>(start))==LCC::null_handle )
|
||||||
return normal;
|
return normal;
|
||||||
|
|
||||||
unsigned int nb = 0;
|
unsigned int nb = 0;
|
||||||
|
|
@ -64,7 +64,7 @@ namespace CGAL {
|
||||||
|
|
||||||
const Point* prev = &amap.point(start);
|
const Point* prev = &amap.point(start);
|
||||||
const Point* curr = &amap.point(adart);
|
const Point* curr = &amap.point(adart);
|
||||||
for ( ; adart!=start && amap.other_extremity(adart)!=NULL;
|
for ( ; adart!=start && amap.other_extremity(adart)!=LCC::null_handle;
|
||||||
adart=amap.template beta<1>(adart) )
|
adart=amap.template beta<1>(adart) )
|
||||||
{
|
{
|
||||||
const Point* next = &amap.point( amap.other_extremity(adart));
|
const Point* next = &amap.point( amap.other_extremity(adart));
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,9 @@ namespace CGAL {
|
||||||
typedef typename Dart_container::const_iterator Dart_const_handle;
|
typedef typename Dart_container::const_iterator Dart_const_handle;
|
||||||
typedef typename Dart_container::size_type size_type;
|
typedef typename Dart_container::size_type size_type;
|
||||||
|
|
||||||
|
typedef CGAL::Void* Null_handle_type;
|
||||||
|
static Null_handle_type null_handle;
|
||||||
|
|
||||||
typedef Items_ Items;
|
typedef Items_ Items;
|
||||||
typedef Alloc_ Alloc;
|
typedef Alloc_ Alloc;
|
||||||
|
|
||||||
|
|
@ -410,17 +413,31 @@ namespace CGAL {
|
||||||
typename Helper::Attribute_containers mattribute_containers;
|
typename Helper::Attribute_containers mattribute_containers;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/// null_handle
|
||||||
|
template <unsigned int d_, unsigned int ambient_dim,
|
||||||
|
class Traits_, class Items_, class Alloc_ >
|
||||||
|
typename Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
|
||||||
|
Items_, Alloc_>::Null_handle_type
|
||||||
|
Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
|
||||||
|
Items_, Alloc_>::null_handle = NULL;
|
||||||
|
|
||||||
#ifdef CGAL_CMAP_DEPRECATED
|
#ifdef CGAL_CMAP_DEPRECATED
|
||||||
/// Allocation of static data members
|
/// Allocation of static data members
|
||||||
/// mnull_dart_container
|
/// mnull_dart_container
|
||||||
template<unsigned int d_, class Items_, class Alloc_ >
|
template <unsigned int d_, unsigned int ambient_dim,
|
||||||
typename Linear_cell_complex_storage_1<d_, Items_, Alloc_>::Dart_container
|
class Traits_, class Items_, class Alloc_ >
|
||||||
Linear_cell_complex_storage_1<d_, Items_, Alloc_>::mnull_dart_container;
|
typename Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
|
||||||
|
Items_, Alloc_>::Dart_container
|
||||||
|
Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
|
||||||
|
Items_, Alloc_>::mnull_dart_container;
|
||||||
|
|
||||||
/// null_dart_handle
|
/// null_dart_handle
|
||||||
template < unsigned int d_, class Items_, class Alloc_ >
|
template <unsigned int d_, unsigned int ambient_dim,
|
||||||
typename Linear_cell_complex_storage_1<d_, Items_, Alloc_>::Dart_handle
|
class Traits_, class Items_, class Alloc_ >
|
||||||
Linear_cell_complex_storage_1<d_, Items_, Alloc_>::null_dart_handle;
|
typename Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
|
||||||
|
Items_, Alloc_>::Dart_handle
|
||||||
|
Linear_cell_complex_storage_1<d_, ambient_dim, Traits_,
|
||||||
|
Items_, Alloc_>::null_dart_handle;
|
||||||
// = mnull_dart_container.emplace( std::bitset<NB_MARKS>() );
|
// = mnull_dart_container.emplace( std::bitset<NB_MARKS>() );
|
||||||
// Does not work on windows => segfault
|
// Does not work on windows => segfault
|
||||||
// Thus we initialize null_dart_handle in the Combinatorial_map constructor
|
// Thus we initialize null_dart_handle in the Combinatorial_map constructor
|
||||||
|
|
|
||||||
|
|
@ -166,10 +166,10 @@ struct Converter_map9_points_into_map5_points
|
||||||
(const Map9& map1, Map5& map2, Map9::Dart_const_handle dh1,
|
(const Map9& map1, Map5& map2, Map9::Dart_const_handle dh1,
|
||||||
Map5::Dart_handle dh2) const
|
Map5::Dart_handle dh2) const
|
||||||
{
|
{
|
||||||
CGAL_assertion( map1.attribute<0>(dh1)!=NULL );
|
CGAL_assertion( map1.attribute<0>(dh1)!=map1.null_handle );
|
||||||
|
|
||||||
Map5::Attribute_handle<0>::type res = map2.attribute<0>(dh2);
|
Map5::Attribute_handle<0>::type res = map2.attribute<0>(dh2);
|
||||||
if ( res==NULL )
|
if ( res==map2.null_handle )
|
||||||
{
|
{
|
||||||
res = map2.create_attribute<0>();
|
res = map2.create_attribute<0>();
|
||||||
}
|
}
|
||||||
|
|
@ -221,7 +221,7 @@ struct CreateAttributes
|
||||||
for(typename Map::Dart_range::iterator it=map.darts().begin(),
|
for(typename Map::Dart_range::iterator it=map.darts().begin(),
|
||||||
itend=map.darts().end(); it!=itend; ++it)
|
itend=map.darts().end(); it!=itend; ++it)
|
||||||
{
|
{
|
||||||
if ( map.template attribute<i>(it)==NULL )
|
if ( map.template attribute<i>(it)==map.null_handle )
|
||||||
{
|
{
|
||||||
map.template set_attribute<i>(it, map.template create_attribute<i>());
|
map.template set_attribute<i>(it, map.template create_attribute<i>());
|
||||||
SetInfoIfNonVoid<Map, i>::run(map, map.template attribute<i>(it), ++nb);
|
SetInfoIfNonVoid<Map, i>::run(map, map.template attribute<i>(it), ++nb);
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#ifndef SCENE_COMBINATORIAL_MAP_ITEM_H
|
#ifndef SCENE_COMBINATORIAL_MAP_ITEM_H
|
||||||
#define SCENE_COMBINATORIAL_MAP_ITEM_H
|
#define SCENE_COMBINATORIAL_MAP_ITEM_H
|
||||||
|
|
||||||
|
#define CGAL_CMAP_DEPRECATED 1
|
||||||
|
|
||||||
//=========
|
//=========
|
||||||
#include <CGAL/internal/corefinement/Combinatorial_map_for_corefinement.h>
|
#include <CGAL/internal/corefinement/Combinatorial_map_for_corefinement.h>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue