mirror of https://github.com/CGAL/cgal
More trailling whitespaces...
This commit is contained in:
parent
0f3e5ed362
commit
f3098fc3f7
|
|
@ -208,7 +208,7 @@ namespace CGAL {
|
|||
|
||||
CGAL_assertion(number_of_darts()==0);
|
||||
}
|
||||
|
||||
|
||||
/** Copy the given combinatorial map 'amap' into *this.
|
||||
* Note that both CMap can have different dimensions and/or non void attributes.
|
||||
* Here CMap2 is necessarily non const; while Dart_handle_2 can be a const or non const handle.
|
||||
|
|
@ -257,7 +257,7 @@ namespace CGAL {
|
|||
// Create an mapping between darts of the two maps (originals->copies).
|
||||
// (here we cannot use CGAL::Unique_hash_map because it does not provide
|
||||
// iterators...
|
||||
boost::unordered_map<Dart_handle_2, Dart_handle> local_dartmap;
|
||||
boost::unordered_map<Dart_handle_2, Dart_handle> local_dartmap;
|
||||
if (origin_to_copy==NULL) // Use local_dartmap if user does not provides its own unordered_map
|
||||
{ origin_to_copy=&local_dartmap; }
|
||||
|
||||
|
|
@ -272,10 +272,10 @@ namespace CGAL {
|
|||
|
||||
if (mark_perforated!=NB_MARKS && amap.is_perforated(it))
|
||||
{ mark(new_dart, mark_perforated); }
|
||||
|
||||
|
||||
(*origin_to_copy)[it]=new_dart;
|
||||
if (copy_to_origin!=NULL) { (*copy_to_origin)[new_dart]=it; }
|
||||
|
||||
|
||||
internal::Copy_dart_info_functor
|
||||
<typename CMap2::Refs, Refs, DartInfoConverter>::run
|
||||
(static_cast<typename CMap2::Refs&>(amap), static_cast<Refs&>(*this),
|
||||
|
|
@ -395,7 +395,7 @@ namespace CGAL {
|
|||
converters, dartinfoconverter, pointconverter,
|
||||
copy_perforated_darts, mark_perforated);
|
||||
}
|
||||
|
||||
|
||||
// (3a) copy(amap, converters)
|
||||
template<typename CMap2, typename Converters>
|
||||
void copy(CMap2& amap,
|
||||
|
|
@ -427,7 +427,7 @@ namespace CGAL {
|
|||
copy(amap, origin_to_copy, copy_to_origin, converters, dartinfoconverter,
|
||||
copy_perforated_darts, mark_perforated);
|
||||
}
|
||||
|
||||
|
||||
// (4a) copy(amap)
|
||||
template<typename CMap2>
|
||||
void copy(CMap2& amap,
|
||||
|
|
@ -567,7 +567,7 @@ namespace CGAL {
|
|||
// iterators...
|
||||
boost::unordered_map
|
||||
<typename boost::graph_traits<HEG>::halfedge_descriptor,
|
||||
Dart_handle> local_dartmap;
|
||||
Dart_handle> local_dartmap;
|
||||
if (origin_to_copy==NULL) // Used local_dartmap if user does not provides its own unordered_map
|
||||
{ origin_to_copy=&local_dartmap; }
|
||||
|
||||
|
|
@ -582,7 +582,7 @@ namespace CGAL {
|
|||
|
||||
if (mark_perforated!=NB_MARKS && CGAL::is_border(*it, heg))
|
||||
{ mark(new_dart, mark_perforated); }
|
||||
|
||||
|
||||
(*origin_to_copy)[*it]=new_dart;
|
||||
if (copy_to_origin!=NULL) { (*copy_to_origin)[new_dart]=*it; }
|
||||
}
|
||||
|
|
@ -597,7 +597,7 @@ namespace CGAL {
|
|||
basic_link_beta(dartmap_iter->second,
|
||||
(*origin_to_copy)[CM_ADL_next(dartmap_iter->first, heg)],
|
||||
1);
|
||||
|
||||
|
||||
if (!CGAL::is_border(CM_ADL_opposite(dartmap_iter->first, heg), heg) &&
|
||||
(dartmap_iter->first)<CM_ADL_opposite(dartmap_iter->first, heg))
|
||||
{
|
||||
|
|
@ -609,7 +609,7 @@ namespace CGAL {
|
|||
|
||||
CGAL_assertion (is_valid());
|
||||
}
|
||||
|
||||
|
||||
/** Clear the combinatorial map. Remove all darts and all attributes.
|
||||
* Note that reserved marks are not free.
|
||||
*/
|
||||
|
|
@ -1194,7 +1194,7 @@ namespace CGAL {
|
|||
bool belong_to_same_cell(Dart_const_handle adart1,
|
||||
Dart_const_handle adart2) const
|
||||
{ return CGAL::belong_to_same_cell<Self, i, d>(*this, adart1, adart2); }
|
||||
|
||||
|
||||
template <unsigned int i, unsigned int d=dimension>
|
||||
bool is_whole_cell_unmarked(Dart_const_handle adart, size_type amark) const
|
||||
{ return CGAL::is_whole_cell_unmarked<Self, i, d>(*this, adart, amark); }
|
||||
|
|
@ -2726,16 +2726,16 @@ namespace CGAL {
|
|||
CGAL_assertion((!this->template is_free<1>(d1)));
|
||||
/* CGAL_assertion((belong_to_same_cell<0>(this->template beta<1>(d1),
|
||||
d2))); */
|
||||
|
||||
|
||||
if (d2==beta<2>(d1)) { return 0; }
|
||||
|
||||
|
||||
Dart_const_handle dd1=d1;
|
||||
std::size_t res=1;
|
||||
while (beta<1>(dd1)!=d2)
|
||||
{
|
||||
if (this->template is_free<2>(beta<1>(dd1)))
|
||||
{ return std::numeric_limits<std::size_t>::max(); }
|
||||
|
||||
|
||||
++res;
|
||||
dd1=beta<1, 2>(dd1);
|
||||
|
||||
|
|
@ -2752,7 +2752,7 @@ namespace CGAL {
|
|||
CGAL_assertion((!this->template is_free<1>(d1)));
|
||||
/* CGAL_assertion((belong_to_same_cell<0>(this->template beta<1>(d1),
|
||||
d2))); */
|
||||
|
||||
|
||||
if (d2==beta<2>(d1)) { return 0; }
|
||||
|
||||
if (this->template is_free<2>(d1) || this->template is_free<2>(d2))
|
||||
|
|
@ -2766,10 +2766,10 @@ namespace CGAL {
|
|||
{
|
||||
if (this->template is_free<2>(beta<0>(dd1)))
|
||||
{ return std::numeric_limits<std::size_t>::max(); }
|
||||
|
||||
|
||||
++res;
|
||||
dd1=beta<0, 2>(dd1);
|
||||
|
||||
|
||||
CGAL_assertion(!this->template is_free<0>(dd1));
|
||||
CGAL_assertion(beta<0>(dd1)==d2 || dd1!=d1);
|
||||
}
|
||||
|
|
@ -3444,7 +3444,7 @@ namespace CGAL {
|
|||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
CGAL_USE(testDartInfo);
|
||||
#endif
|
||||
|
||||
|
||||
typedef Combinatorial_map_base<d2,Refs2,Items2,Alloc2, Storage2> Map2;
|
||||
|
||||
bool match = true;
|
||||
|
|
@ -4813,6 +4813,6 @@ namespace CGAL {
|
|||
#endif
|
||||
|
||||
#include <CGAL/enable_warnings.h>
|
||||
|
||||
|
||||
#endif // CGAL_COMBINATORIAL_MAP_H //
|
||||
// EOF //
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public:
|
|||
// typedef My_halfedge_iterator<HEG> iterator;
|
||||
// typedef My_halfedge_iterator<HEG> const_iterator; // TODO ?
|
||||
};
|
||||
|
||||
|
||||
typedef typename boost::graph_traits<HEG>::halfedge_descriptor Dart_handle;
|
||||
typedef typename boost::graph_traits<HEG>::halfedge_descriptor Dart_const_handle;
|
||||
|
||||
|
|
@ -67,7 +67,7 @@ public:
|
|||
typedef typename boost::graph_traits<HEG>::edge_descriptor edge_descriptor;
|
||||
typedef typename boost::graph_traits<HEG>::face_descriptor face_descriptor;
|
||||
typedef boost::undirected_tag directed_category;
|
||||
typedef boost::disallow_parallel_edge_tag edge_parallel_category;
|
||||
typedef boost::disallow_parallel_edge_tag edge_parallel_category;
|
||||
|
||||
struct SM_graph_traversal_category : public virtual boost::bidirectional_graph_tag,
|
||||
public virtual boost::vertex_list_graph_tag,
|
||||
|
|
@ -75,7 +75,7 @@ public:
|
|||
{};
|
||||
typedef SM_graph_traversal_category traversal_category;
|
||||
|
||||
|
||||
|
||||
Face_graph_wrapper(const HEG& f) : m_fg(f),
|
||||
mdarts(*this),
|
||||
m_nb_darts(0),
|
||||
|
|
@ -111,7 +111,7 @@ public:
|
|||
|
||||
const HEG& get_fg() const
|
||||
{ return m_fg; }
|
||||
|
||||
|
||||
template<unsigned int i>
|
||||
bool is_free(Dart_const_handle /* dh */) const
|
||||
{ return false; } // Not possible to have a free dart with an HEG.
|
||||
|
|
@ -125,7 +125,7 @@ public:
|
|||
{
|
||||
CGAL_assertion(B1>=0 && B1<=static_cast<int>(dimension));
|
||||
if (B1==1) return Get_beta<HEG, 1>::value(m_fg, ADart);
|
||||
if (B1==2) return Get_beta<HEG, 2>::value(m_fg, ADart);
|
||||
if (B1==2) return Get_beta<HEG, 2>::value(m_fg, ADart);
|
||||
return Get_beta<HEG, 0>::value(m_fg, ADart);
|
||||
}
|
||||
template<int B1>
|
||||
|
|
@ -137,15 +137,15 @@ public:
|
|||
|
||||
bool is_empty() const
|
||||
{ return number_of_darts()==0; }
|
||||
|
||||
|
||||
/* ?? bool is_dart_used(Dart_const_handle dh) const
|
||||
{ return true; ?? } */
|
||||
|
||||
|
||||
int highest_nonfree_dimension(Dart_const_handle /* dh */) const
|
||||
{ return 2; }
|
||||
|
||||
Dart_const_handle previous(Dart_const_handle ADart) const
|
||||
{ return get_beta<0>(ADart); }
|
||||
{ return get_beta<0>(ADart); }
|
||||
Dart_const_handle next(Dart_const_handle ADart) const
|
||||
{ return get_beta<1>(ADart); }
|
||||
Dart_const_handle opposite(Dart_const_handle dh) const
|
||||
|
|
@ -159,7 +159,7 @@ public:
|
|||
Dart_const_handle opposite(Dart_const_handle ADart) const
|
||||
{ return this->template get_beta<dim>(ADart); }
|
||||
Dart_const_handle other_orientation(Dart_const_handle ADart) const
|
||||
{ return ADart; }
|
||||
{ return ADart; }
|
||||
|
||||
bool is_previous_exist(Dart_const_handle) const
|
||||
{ return true; }
|
||||
|
|
@ -185,10 +185,10 @@ public:
|
|||
Dart_const_handle beta(Dart_const_handle ADart) const
|
||||
{ return CGAL::internal::Beta_functor_static<const Self, Dart_const_handle, Betas...>::
|
||||
run(*this, ADart); }
|
||||
|
||||
|
||||
size_type number_of_darts() const
|
||||
{ return m_nb_darts; }
|
||||
|
||||
|
||||
size_type number_of_halfedges() const
|
||||
{ return number_of_darts(); }
|
||||
|
||||
|
|
@ -200,26 +200,26 @@ public:
|
|||
CGAL_assertion(amark<NB_MARKS);
|
||||
return (m_marks_initialized && mnb_times_reserved_marks[amark]!=0);
|
||||
}
|
||||
|
||||
|
||||
size_type number_of_marked_darts(size_type amark) const
|
||||
{
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
return mnb_marked_darts[amark];
|
||||
}
|
||||
|
||||
|
||||
size_type number_of_unmarked_darts(size_type amark) const
|
||||
{
|
||||
return number_of_darts() - number_of_marked_darts(amark);
|
||||
}
|
||||
|
||||
|
||||
bool is_whole_map_unmarked(size_type amark) const
|
||||
{ return number_of_marked_darts(amark)==0; }
|
||||
|
||||
|
||||
bool is_whole_map_marked(size_type amark) const
|
||||
{ return number_of_marked_darts(amark)==number_of_darts(); }
|
||||
|
||||
class Exception_no_more_available_mark {};
|
||||
|
||||
|
||||
size_type get_new_mark() const
|
||||
{
|
||||
initialize_marks();
|
||||
|
|
@ -230,19 +230,19 @@ public:
|
|||
std::cerr << " (exception launched)" << std::endl;
|
||||
throw Exception_no_more_available_mark();
|
||||
}
|
||||
|
||||
|
||||
size_type m=mfree_marks_stack[mnb_used_marks];
|
||||
mused_marks_stack[mnb_used_marks]=m;
|
||||
|
||||
|
||||
mindex_marks[m]=mnb_used_marks;
|
||||
mnb_times_reserved_marks[m]=1;
|
||||
|
||||
|
||||
++mnb_used_marks;
|
||||
CGAL_assertion(is_whole_map_unmarked(m));
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
|
||||
void share_a_mark(size_type amark) const
|
||||
{
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
|
|
@ -258,14 +258,14 @@ public:
|
|||
void negate_mark(size_type amark) const
|
||||
{
|
||||
CGAL_assertion(is_reserved(amark));
|
||||
|
||||
|
||||
mnb_marked_darts[amark]=number_of_darts()-mnb_marked_darts[amark];
|
||||
mmask_marks.flip(amark);
|
||||
}
|
||||
|
||||
void mark_null_dart( size_type /*amark*/) const
|
||||
{}
|
||||
|
||||
|
||||
bool get_dart_mark(Dart_const_handle ADart, size_type amark) const
|
||||
{
|
||||
CGAL_assertion(is_reserved(amark));
|
||||
|
|
@ -290,41 +290,41 @@ public:
|
|||
bool astate) const
|
||||
{
|
||||
CGAL_assertion(is_reserved(amark));
|
||||
|
||||
|
||||
if (is_marked(adart, amark)!=astate)
|
||||
{
|
||||
if (astate) ++mnb_marked_darts[amark];
|
||||
else --mnb_marked_darts[amark];
|
||||
|
||||
|
||||
flip_dart_mark(adart, amark);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void mark(Dart_const_handle adart, size_type amark) const
|
||||
{
|
||||
CGAL_assertion(is_reserved(amark));
|
||||
|
||||
|
||||
if (is_marked(adart, amark)) return;
|
||||
|
||||
|
||||
++mnb_marked_darts[amark];
|
||||
flip_dart_mark(adart, amark);
|
||||
}
|
||||
|
||||
|
||||
void unmark(Dart_const_handle adart, size_type amark) const
|
||||
{
|
||||
CGAL_assertion( adart!=this->null_dart_handle );
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
|
||||
|
||||
if (!is_marked(adart, amark)) return;
|
||||
|
||||
|
||||
--mnb_marked_darts[amark];
|
||||
flip_dart_mark(adart, amark);
|
||||
}
|
||||
|
||||
|
||||
void unmark_all(size_type amark) const
|
||||
{
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
|
||||
|
||||
if ( is_whole_map_marked(amark) )
|
||||
{
|
||||
negate_mark(amark);
|
||||
|
|
@ -337,44 +337,44 @@ public:
|
|||
}
|
||||
CGAL_assertion(is_whole_map_unmarked(amark));
|
||||
}
|
||||
|
||||
|
||||
void free_mark(size_type amark) const
|
||||
{
|
||||
CGAL_assertion( is_reserved(amark) );
|
||||
|
||||
|
||||
if ( mnb_times_reserved_marks[amark]>1 )
|
||||
{
|
||||
--mnb_times_reserved_marks[amark];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
unmark_all(amark);
|
||||
|
||||
|
||||
// 1) We remove amark from the array mused_marks_stack by
|
||||
// replacing it with the last mark in this array.
|
||||
mused_marks_stack[mindex_marks[amark]] =
|
||||
mused_marks_stack[--mnb_used_marks];
|
||||
mindex_marks[mused_marks_stack[mnb_used_marks]] =
|
||||
mindex_marks[amark];
|
||||
|
||||
|
||||
// 2) We add amark in the array mfree_marks_stack and update its index.
|
||||
mfree_marks_stack[ mnb_used_marks ]=amark;
|
||||
mindex_marks[amark] = mnb_used_marks;
|
||||
|
||||
|
||||
mnb_times_reserved_marks[amark]=0;
|
||||
}
|
||||
|
||||
|
||||
bool is_without_boundary(unsigned int i) const
|
||||
{
|
||||
CGAL_assertion(1<=i && i<=dimension);
|
||||
if (i==1) return true;
|
||||
|
||||
|
||||
for ( typename Dart_range::const_iterator it(darts().begin()),
|
||||
itend(darts().end()); it!=itend; ++it)
|
||||
{ if (is_perforated(it)) return false; }
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool is_without_boundary() const
|
||||
{ return is_without_boundary(2); }
|
||||
|
||||
|
|
@ -400,7 +400,7 @@ public:
|
|||
}
|
||||
return msize;
|
||||
}
|
||||
|
||||
|
||||
bool empty() const
|
||||
{ return mmap.is_empty(); }
|
||||
private:
|
||||
|
|
@ -477,7 +477,7 @@ public:
|
|||
}
|
||||
return msize;
|
||||
}
|
||||
|
||||
|
||||
bool empty() const
|
||||
{ return mmap.is_empty(); }
|
||||
private:
|
||||
|
|
@ -527,7 +527,7 @@ public:
|
|||
{ if (*it==adart2) { return true; } }
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
template <unsigned int i>
|
||||
bool is_whole_cell_unmarked(Dart_const_handle adart, size_type amark) const
|
||||
{
|
||||
|
|
@ -562,7 +562,7 @@ public:
|
|||
else if (i==1) { return mark_cell<1>(adart, amark); }
|
||||
else if (i==2) { return mark_cell<2>(adart, amark); }
|
||||
return mark_cell<3>(adart, amark);
|
||||
}
|
||||
}
|
||||
|
||||
template <unsigned int i>
|
||||
size_type unmark_cell(Dart_const_handle adart, size_type amark) const
|
||||
|
|
@ -586,7 +586,7 @@ public:
|
|||
res[i]=0;
|
||||
marks[i]=INVALID_MARK;
|
||||
}
|
||||
|
||||
|
||||
// Mark reservation
|
||||
for (unsigned int i=0; i<acells.size(); ++i)
|
||||
{
|
||||
|
|
@ -650,22 +650,22 @@ public:
|
|||
std::vector<unsigned int> res;
|
||||
size_type m=get_new_mark();
|
||||
negate_mark(m); // We mark all the cells.
|
||||
|
||||
|
||||
res=count_marked_cells(m, acells);
|
||||
|
||||
|
||||
negate_mark(m); // We unmark the cells
|
||||
free_mark(m);
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
std::vector<unsigned int> count_all_cells() const
|
||||
{
|
||||
std::vector<unsigned int> dim(dimension+2);
|
||||
|
||||
|
||||
for ( unsigned int i=0; i<=dimension+1; ++i)
|
||||
{ dim[i]=i; }
|
||||
|
||||
|
||||
return count_cells(dim);
|
||||
}
|
||||
|
||||
|
|
@ -674,9 +674,9 @@ public:
|
|||
std::vector<unsigned int> cells(dimension+2);
|
||||
for ( unsigned int i=0; i<=dimension+1; ++i)
|
||||
{ cells[i]=i; }
|
||||
|
||||
|
||||
std::vector<unsigned int> res=count_cells(cells);
|
||||
|
||||
|
||||
os<<"#Darts="<<number_of_darts();
|
||||
for (unsigned int i=0; i<=dimension; ++i)
|
||||
os<<", #"<<i<<"-cells="<<res[i];
|
||||
|
|
@ -690,25 +690,25 @@ protected:
|
|||
Dart_range mdarts;
|
||||
std::size_t m_nb_darts;
|
||||
mutable bool m_marks_initialized; /// True iff marks are initialized (we use lazy initialization)
|
||||
|
||||
|
||||
/// Number of times each mark is reserved. 0 if the mark is free.
|
||||
mutable size_type mnb_times_reserved_marks[NB_MARKS];
|
||||
|
||||
|
||||
/// Mask marks to know the value of unmark dart, for each index i.
|
||||
mutable std::bitset<NB_MARKS> mmask_marks;
|
||||
|
||||
|
||||
/// Number of used marks.
|
||||
mutable size_type mnb_used_marks;
|
||||
|
||||
|
||||
/// Index of each mark, in mfree_marks_stack or in mfree_marks_stack.
|
||||
mutable size_type mindex_marks[NB_MARKS];
|
||||
|
||||
|
||||
/// "Stack" of free marks.
|
||||
mutable size_type mfree_marks_stack[NB_MARKS];
|
||||
|
||||
|
||||
/// "Stack" of used marks.
|
||||
mutable size_type mused_marks_stack[NB_MARKS];
|
||||
|
||||
|
||||
/// Number of marked darts for each used marks.
|
||||
mutable size_type mnb_marked_darts[NB_MARKS];
|
||||
|
||||
|
|
|
|||
|
|
@ -191,7 +191,7 @@ namespace CGAL {
|
|||
* @post *this is valid.
|
||||
*/
|
||||
template <typename GMap2, typename Dart_handle_2,
|
||||
typename Converters, typename DartInfoConverter,
|
||||
typename Converters, typename DartInfoConverter,
|
||||
typename PointConverter>
|
||||
void generic_copy(GMap2& amap,
|
||||
boost::unordered_map<Dart_handle_2, Dart_handle>* origin_to_copy,
|
||||
|
|
@ -239,14 +239,14 @@ namespace CGAL {
|
|||
|
||||
(*origin_to_copy)[it]=new_dart;
|
||||
if (copy_to_origin!=NULL) { (*copy_to_origin)[new_dart]=it; }
|
||||
|
||||
|
||||
internal::Copy_dart_info_functor
|
||||
<typename GMap2::Refs, Refs, DartInfoConverter>::run
|
||||
(static_cast<const typename GMap2::Refs&>(amap), static_cast<Refs&>(*this),
|
||||
it, new_dart, dartinfoconverter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
unsigned int min_dim=(dimension<amap.dimension?dimension:amap.dimension);
|
||||
|
||||
typename boost::unordered_map<Dart_handle_2, Dart_handle>::iterator
|
||||
|
|
@ -359,7 +359,7 @@ namespace CGAL {
|
|||
dartinfoconverter, pointconverter,
|
||||
copy_perforated_darts, mark_perforated);
|
||||
}
|
||||
|
||||
|
||||
// (3a) copy(amap, converters)
|
||||
template<typename GMap2, typename Converters>
|
||||
void copy(GMap2& amap,
|
||||
|
|
@ -391,7 +391,7 @@ namespace CGAL {
|
|||
copy(amap, origin_to_copy, copy_to_origin, converters, dartinfoconverter,
|
||||
copy_perforated_darts, mark_perforated);
|
||||
}
|
||||
|
||||
|
||||
// (4a) copy(amap)
|
||||
template<typename GMap2>
|
||||
void copy(GMap2& amap,
|
||||
|
|
@ -420,7 +420,7 @@ namespace CGAL {
|
|||
CGAL::cpp11::tuple<> converters;
|
||||
copy(amap, origin_to_copy, copy_to_origin, converters,
|
||||
copy_perforated_darts, mark_perforated);
|
||||
}
|
||||
}
|
||||
|
||||
// Copy constructor from a map having exactly the same type.
|
||||
Generalized_map_base (const Self & amap) : Generalized_map_base()
|
||||
|
|
@ -1018,7 +1018,7 @@ namespace CGAL {
|
|||
bool belong_to_same_cell(Dart_const_handle adart1,
|
||||
Dart_const_handle adart2) const
|
||||
{ return CGAL::belong_to_same_cell<Self, i, d>(*this, adart1, adart2); }
|
||||
|
||||
|
||||
template <unsigned int i, unsigned int d=dimension>
|
||||
bool is_whole_cell_unmarked(Dart_const_handle adart, size_type amark) const
|
||||
{ return CGAL::is_whole_cell_unmarked<Self, i, d>(*this, adart, amark); }
|
||||
|
|
@ -1839,16 +1839,16 @@ namespace CGAL {
|
|||
{
|
||||
CGAL_assertion((!this->template is_free<1>(d1)));
|
||||
/* CGAL_assertion((belong_to_same_cell<0>(this->next(d1), d2))); */
|
||||
|
||||
|
||||
if (d2==opposite2(d1)) { return 0; }
|
||||
|
||||
|
||||
Dart_const_handle dd1=d1;
|
||||
std::size_t res=1;
|
||||
while (next(dd1)!=d2)
|
||||
{
|
||||
if (this->template is_free<2>(next(dd1)))
|
||||
{ return std::numeric_limits<std::size_t>::max(); }
|
||||
|
||||
|
||||
++res;
|
||||
dd1=opposite2(next(dd1));
|
||||
|
||||
|
|
@ -1881,7 +1881,7 @@ namespace CGAL {
|
|||
|
||||
++res;
|
||||
dd1=opposite2(previous(dd1));
|
||||
|
||||
|
||||
CGAL_assertion(!this->template is_free<0>(dd1));
|
||||
CGAL_assertion(previous(dd1)==d2 || dd1!=d1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
namespace CGAL
|
||||
{
|
||||
|
||||
|
||||
// Default color functor; user can change it to have its own face color
|
||||
struct DefaultDrawingFunctorLCC
|
||||
{
|
||||
|
|
@ -146,7 +146,7 @@ struct LCC_geom_utils<LCC, Local_kernel, 2>
|
|||
}
|
||||
};
|
||||
|
||||
// Viewer class for LCC
|
||||
// Viewer class for LCC
|
||||
template<class LCC, class DrawingFunctorLCC>
|
||||
class SimpleLCCViewerQt : public Basic_viewer_qt
|
||||
{
|
||||
|
|
@ -155,7 +155,7 @@ class SimpleLCCViewerQt : public Basic_viewer_qt
|
|||
typedef typename LCC::Traits Kernel;
|
||||
typedef typename Kernel::Point Point;
|
||||
typedef typename Kernel::Vector Vector;
|
||||
|
||||
|
||||
public:
|
||||
/// Construct the viewer.
|
||||
/// @param alcc the lcc to view
|
||||
|
|
@ -168,7 +168,7 @@ public:
|
|||
bool anofaces=false,
|
||||
const DrawingFunctorLCC& drawing_functor=DrawingFunctorLCC()) :
|
||||
// First draw: vertices; edges, faces; multi-color; inverse normal
|
||||
Base(parent, title, true, true, true, false, false),
|
||||
Base(parent, title, true, true, true, false, false),
|
||||
lcc(alcc),
|
||||
m_nofaces(anofaces),
|
||||
m_random_face_color(false),
|
||||
|
|
@ -184,7 +184,7 @@ protected:
|
|||
compute_elements();
|
||||
if (doredraw) { redraw(); }
|
||||
}
|
||||
|
||||
|
||||
void compute_face(Dart_const_handle dh, Dart_const_handle voldh)
|
||||
{
|
||||
if (m_nofaces || !m_drawing_functor.draw_face(*lcc, dh)) return;
|
||||
|
|
@ -204,7 +204,7 @@ protected:
|
|||
{
|
||||
CGAL::Random random((unsigned int)(lcc->darts().index(dh)));
|
||||
CGAL::Color c=get_random_color(random);
|
||||
face_begin(c);
|
||||
face_begin(c);
|
||||
}
|
||||
else if (m_drawing_functor.colored_face(*lcc, dh))
|
||||
{
|
||||
|
|
@ -260,7 +260,7 @@ protected:
|
|||
{
|
||||
clear();
|
||||
if (lcc==nullptr) return;
|
||||
|
||||
|
||||
typename LCC::size_type markvolumes = lcc->get_new_mark();
|
||||
typename LCC::size_type markfaces = lcc->get_new_mark();
|
||||
typename LCC::size_type markedges = lcc->get_new_mark();
|
||||
|
|
@ -331,13 +331,13 @@ protected:
|
|||
lcc->free_mark(markedges);
|
||||
lcc->free_mark(markvertices);
|
||||
}
|
||||
|
||||
|
||||
virtual void init()
|
||||
{
|
||||
Base::init();
|
||||
setKeyDescription(::Qt::Key_C, "Toggles random face colors");
|
||||
}
|
||||
|
||||
|
||||
virtual void keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
const ::Qt::KeyboardModifiers modifiers = e->modifiers();
|
||||
|
|
@ -350,7 +350,7 @@ protected:
|
|||
}
|
||||
else
|
||||
{ Base::keyPressEvent(e); } // Call the base method to process others/classicals key
|
||||
|
||||
|
||||
// Call: * compute_elements() if the model changed, followed by
|
||||
// * redraw() if some viewing parameters changed that implies some
|
||||
// modifications of the buffers
|
||||
|
|
@ -388,7 +388,7 @@ void draw(const CGAL_LCC_TYPE& alcc,
|
|||
#else
|
||||
bool cgal_test_suite=qEnvironmentVariableIsSet("CGAL_TEST_SUITE");
|
||||
#endif
|
||||
|
||||
|
||||
if (!cgal_test_suite)
|
||||
{
|
||||
int argc=1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue