diff --git a/Combinatorial_map/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp b/Combinatorial_map/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp index dabd054f92d..2ded0f2d543 100644 --- a/Combinatorial_map/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp +++ b/Combinatorial_map/examples/Combinatorial_map/map_3_dynamic_onmerge.cpp @@ -71,8 +71,8 @@ int main() CMap_3 cm; // 0) Create 2 hexahedra. - Dart_descriptor dh1 = cm.make_combinatorial_hexahedron(); - Dart_descriptor dh2 = cm.make_combinatorial_hexahedron(); + Dart_descriptor d1 = cm.make_combinatorial_hexahedron(); + Dart_descriptor d2 = cm.make_combinatorial_hexahedron(); // 1) Create and initialize 2-attributes. for (CMap_3::One_dart_per_cell_range<2>::iterator @@ -85,14 +85,14 @@ int main() cm.onmerge_functor<2>()=Merge_functor(); // 3) 3-Sew the two hexahedra along one face. This calls 1 onmerge. - cm.sew<3>(dh1, dh2); + cm.sew<3>(d1, d2); // 4) Display all the values of 2-attributes. display_map_and_2attributes(cm); // 5) Insert a vertex in the face between the two hexahedra. // This calls 3 onsplit. - Dart_descriptor resdart=cm.insert_cell_0_in_cell_2(dh2); + Dart_descriptor resdart=cm.insert_cell_0_in_cell_2(d2); // 6) Display all the values of 2-attributes. display_map_and_2attributes(cm); diff --git a/Combinatorial_map/examples/Combinatorial_map/map_3_marks.cpp b/Combinatorial_map/examples/Combinatorial_map/map_3_marks.cpp index a224695cff7..882e0b43d7c 100644 --- a/Combinatorial_map/examples/Combinatorial_map/map_3_marks.cpp +++ b/Combinatorial_map/examples/Combinatorial_map/map_3_marks.cpp @@ -23,21 +23,21 @@ int main() } // 2) Create two tetrahedra. - Dart_descriptor dh1 = cm.make_combinatorial_tetrahedron(); - Dart_descriptor dh2 = cm.make_combinatorial_tetrahedron(); + Dart_descriptor d1 = cm.make_combinatorial_tetrahedron(); + Dart_descriptor d2 = cm.make_combinatorial_tetrahedron(); // 3) 3-sew them. - cm.sew<3>(dh1, dh2); + cm.sew<3>(d1, d2); // 4) Mark the darts belonging to the first tetrahedron. for (CMap_3::Dart_of_cell_range<3>::iterator - it(cm.darts_of_cell<3>(dh1).begin()), - itend(cm.darts_of_cell<3>(dh1).end()); it!=itend; ++it) + it(cm.darts_of_cell<3>(d1).begin()), + itend(cm.darts_of_cell<3>(d1).end()); it!=itend; ++it) cm.mark(it, amark); // 4) Remove the common 2-cell between the two cubes: // the two tetrahedra are merged. - cm.remove_cell<2>(dh1); + cm.remove_cell<2>(d1); // 5) Thanks to the mark, we know which darts come from the first tetrahedron. unsigned int res=0; diff --git a/Combinatorial_map/examples/Combinatorial_map/map_3_operations.cpp b/Combinatorial_map/examples/Combinatorial_map/map_3_operations.cpp index a73cda61e19..0a37a367fab 100644 --- a/Combinatorial_map/examples/Combinatorial_map/map_3_operations.cpp +++ b/Combinatorial_map/examples/Combinatorial_map/map_3_operations.cpp @@ -11,35 +11,35 @@ int main() CMap_3 cm; // Create one combinatorial hexahedron. - Dart_descriptor dh1 = cm.make_combinatorial_hexahedron(); + Dart_descriptor d1 = cm.make_combinatorial_hexahedron(); // Add two edges along two opposite facets. assert( cm.is_insertable_cell_1_in_cell_2 - (cm.beta(dh1,1),cm.beta(dh1,0)) ); + (cm.beta(d1,1),cm.beta(d1,0)) ); - cm.insert_cell_1_in_cell_2(cm.beta(dh1,1), cm.beta(dh1,0)); + cm.insert_cell_1_in_cell_2(cm.beta(d1,1), cm.beta(d1,0)); assert( cm.is_valid() ); - Dart_descriptor dh2=cm.beta(dh1,2,1,1,2); + Dart_descriptor d2=cm.beta(d1,2,1,1,2); assert( cm.is_insertable_cell_1_in_cell_2 - (dh2,cm.beta(dh2,1,1)) ); + (d2,cm.beta(d2,1,1)) ); - cm.insert_cell_1_in_cell_2(dh2, cm.beta(dh2,1,1)); + cm.insert_cell_1_in_cell_2(d2, cm.beta(d2,1,1)); assert( cm.is_valid() ); // Insert a facet along these two new edges plus two initial edges // of the hexahedron. std::vector path; - path.push_back(cm.beta(dh1,1)); - path.push_back(cm.beta(dh1,0,2,1)); - path.push_back(cm.beta(dh2,0)); - path.push_back(cm.beta(dh2,2,1)); + path.push_back(cm.beta(d1,1)); + path.push_back(cm.beta(d1,0,2,1)); + path.push_back(cm.beta(d2,0)); + path.push_back(cm.beta(d2,2,1)); assert( (cm.is_insertable_cell_2_in_cell_3 (path.begin(),path.end())) ); - Dart_descriptor dh3=cm.insert_cell_2_in_cell_3(path.begin(),path.end()); + Dart_descriptor d3=cm.insert_cell_2_in_cell_3(path.begin(),path.end()); assert( cm.is_valid() ); // Display the combinatorial map characteristics. @@ -47,16 +47,16 @@ int main() cm.is_valid() << std::endl; // We use the removal operations to get back to the initial hexahedron. - assert( (cm.is_removable<2>(dh3)) ); - cm.remove_cell<2>(dh3); + assert( (cm.is_removable<2>(d3)) ); + cm.remove_cell<2>(d3); assert( cm.is_valid() ); - assert( (cm.is_removable<1>(cm.beta(dh1,1))) ); - cm.remove_cell<1>(cm.beta(dh1,1)); + assert( (cm.is_removable<1>(cm.beta(d1,1))) ); + cm.remove_cell<1>(cm.beta(d1,1)); assert( cm.is_valid() ); - assert( (cm.is_removable<1>(cm.beta(dh2,0))) ); - cm.remove_cell<1>(cm.beta(dh2,0)); + assert( (cm.is_removable<1>(cm.beta(d2,0))) ); + cm.remove_cell<1>(cm.beta(d2,0)); assert( cm.is_valid() ); // Display the combinatorial map characteristics. diff --git a/Combinatorial_map/examples/Combinatorial_map/map_3_simple_example.cpp b/Combinatorial_map/examples/Combinatorial_map/map_3_simple_example.cpp index 29e16dd54a3..18c644f735d 100644 --- a/Combinatorial_map/examples/Combinatorial_map/map_3_simple_example.cpp +++ b/Combinatorial_map/examples/Combinatorial_map/map_3_simple_example.cpp @@ -10,8 +10,8 @@ int main() CMap_3 cm; // Create two tetrahedra. - Dart_const_descriptor dh1 = cm.make_combinatorial_tetrahedron(); - Dart_const_descriptor dh2 = cm.make_combinatorial_tetrahedron(); + Dart_const_descriptor d1 = cm.make_combinatorial_tetrahedron(); + Dart_const_descriptor d2 = cm.make_combinatorial_tetrahedron(); // Display the combinatorial map characteristics. cm.display_characteristics(std::cout); @@ -22,20 +22,20 @@ int main() // Note that CMap_3::Dart_of_orbit_range<1,2> in 3D is equivalent to // CMap_3::Dart_of_cell_range<3>. for (CMap_3::Dart_of_orbit_range<1,2>::const_iterator - it(cm.darts_of_orbit<1,2>(dh1).begin()), - itend(cm.darts_of_orbit<1,2>(dh1).end()); it!=itend; ++it) + it(cm.darts_of_orbit<1,2>(d1).begin()), + itend(cm.darts_of_orbit<1,2>(d1).end()); it!=itend; ++it) ++res; std::cout<<"Number of darts of the first tetrahedron: "<::const_iterator - it(cm.darts_of_orbit<1>(dh2).begin()), - itend(cm.darts_of_orbit<1>(dh2).end()); it!=itend; ++it) + it(cm.darts_of_orbit<1>(d2).begin()), + itend(cm.darts_of_orbit<1>(d2).end()); it!=itend; ++it) ++res; - std::cout<<"Number of darts of the facet containing dh2: "<::iterator - it=cm.one_dart_per_incident_cell<2,3>(dh1).begin(), - itend=cm.one_dart_per_incident_cell<2,3>(dh1).end(); it!=itend; ++it) + it=cm.one_dart_per_incident_cell<2,3>(d1).begin(), + itend=cm.one_dart_per_incident_cell<2,3>(d1).end(); it!=itend; ++it) { cm.info<2>(it)=7; } // 3) Set the color of all facets of the second hexahedron to 13. for (CMap_3::One_dart_per_incident_cell_range<2, 3>::iterator it= - cm.one_dart_per_incident_cell<2,3>(dh2).begin(), - itend=cm.one_dart_per_incident_cell<2,3>(dh2).end(); it!=itend; ++it) + cm.one_dart_per_incident_cell<2,3>(d2).begin(), + itend=cm.one_dart_per_incident_cell<2,3>(d2).end(); it!=itend; ++it) { cm.info<2>(it)=13; } // 4) 3-Sew the two hexahedra along one facet. - cm.sew<3>(dh1, dh2); + cm.sew<3>(d1, d2); // 5) Display all the values of 2-attributes. for (CMap_3::Attribute_range<2>::type::iterator @@ -76,7 +76,7 @@ int main() std::cout<::type::iterator diff --git a/Generalized_map/examples/Generalized_map/gmap_2_moebius.cpp b/Generalized_map/examples/Generalized_map/gmap_2_moebius.cpp index 91142c3fcf9..0f6d44c1959 100644 --- a/Generalized_map/examples/Generalized_map/gmap_2_moebius.cpp +++ b/Generalized_map/examples/Generalized_map/gmap_2_moebius.cpp @@ -8,8 +8,8 @@ typedef GMap_2::Dart_descriptor Dart_descriptor; int main() { GMap_2 gm; - Dart_descriptor dh=gm.make_combinatorial_polygon(4); - gm.sew<2>(dh, gm.alpha<1,0,1,0>(dh)); + Dart_descriptor d=gm.make_combinatorial_polygon(4); + gm.sew<2>(d, gm.alpha<1,0,1,0>(d)); gm.display_characteristics(std::cout); std::cout<<", valid="<::iterator @@ -87,14 +87,14 @@ int main() gm.onmerge_functor<2>()=Merge_functor(); // 3) 3-Sew the two hexahedra along one face. This calls 1 onmerge. - gm.sew<3>(dh1, dh2); + gm.sew<3>(d1, d2); // 4) Display all the values of 2-attributes. display_map_and_2attributes(gm); // 5) Insert a vertex in the face between the two hexahedra. // This calls 3 onsplit. - Dart_descriptor resdart=gm.insert_cell_0_in_cell_2(dh2); + Dart_descriptor resdart=gm.insert_cell_0_in_cell_2(d2); // 6) Display all the values of 2-attributes. display_map_and_2attributes(gm); diff --git a/Generalized_map/examples/Generalized_map/gmap_3_marks.cpp b/Generalized_map/examples/Generalized_map/gmap_3_marks.cpp index 2de2561c8d4..6d2f6e97112 100644 --- a/Generalized_map/examples/Generalized_map/gmap_3_marks.cpp +++ b/Generalized_map/examples/Generalized_map/gmap_3_marks.cpp @@ -24,27 +24,27 @@ int main() } // 2) Create two tetrahedra. - Dart_descriptor dh1 = gm.make_combinatorial_tetrahedron(); - Dart_descriptor dh2 = gm.make_combinatorial_tetrahedron(); + Dart_descriptor d1 = gm.make_combinatorial_tetrahedron(); + Dart_descriptor d2 = gm.make_combinatorial_tetrahedron(); assert( gm.is_valid() ); - assert( gm.is_volume_combinatorial_tetrahedron(dh1) ); - assert( gm.is_volume_combinatorial_tetrahedron(dh2) ); + assert( gm.is_volume_combinatorial_tetrahedron(d1) ); + assert( gm.is_volume_combinatorial_tetrahedron(d2) ); // 3) 3-sew them. - gm.sew<3>(dh1, dh2); + gm.sew<3>(d1, d2); // 4) Mark the darts belonging to the first tetrahedron. // Mark the darts belonging to the first tetrahedron. for (GMap_3::Dart_of_cell_range<3>::iterator - it(gm.darts_of_cell<3>(dh1).begin()), - itend(gm.darts_of_cell<3>(dh1).end()); it!=itend; ++it) + it(gm.darts_of_cell<3>(d1).begin()), + itend(gm.darts_of_cell<3>(d1).end()); it!=itend; ++it) gm.mark(it, amark); // 4) Remove the common 2-cell between the two cubes: // the two tetrahedra are merged. - gm.remove_cell<2>(dh1); + gm.remove_cell<2>(d1); // 5) Thanks to the mark, we know which darts come from the first tetrahedron. unsigned int res=0; diff --git a/Generalized_map/examples/Generalized_map/gmap_3_simple_example.cpp b/Generalized_map/examples/Generalized_map/gmap_3_simple_example.cpp index ba686610428..97f7b7a3455 100644 --- a/Generalized_map/examples/Generalized_map/gmap_3_simple_example.cpp +++ b/Generalized_map/examples/Generalized_map/gmap_3_simple_example.cpp @@ -10,8 +10,8 @@ int main() GMap_3 gm; // Create two tetrahedra. - Dart_const_descriptor dh1 = gm.make_combinatorial_tetrahedron(); - Dart_const_descriptor dh2 = gm.make_combinatorial_tetrahedron(); + Dart_const_descriptor d1 = gm.make_combinatorial_tetrahedron(); + Dart_const_descriptor d2 = gm.make_combinatorial_tetrahedron(); // Display the generalized map characteristics. gm.display_characteristics(std::cout); @@ -22,20 +22,20 @@ int main() // Note that GMap_3::Dart_of_orbit_range<0,1,2> in 3D is equivalent to // GMap_3::Dart_of_cell_range<3>. for (GMap_3::Dart_of_orbit_range<0,1,2>::const_iterator - it(gm.darts_of_orbit<0,1,2>(dh1).begin()), - itend(gm.darts_of_orbit<0,1,2>(dh1).end()); it!=itend; ++it) + it(gm.darts_of_orbit<0,1,2>(d1).begin()), + itend(gm.darts_of_orbit<0,1,2>(d1).end()); it!=itend; ++it) ++res; std::cout<<"Number of darts of the first tetrahedron: "<::const_iterator - it(gm.darts_of_orbit<0,1>(dh2).begin()), - itend(gm.darts_of_orbit<0,1>(dh2).end()); it!=itend; ++it) + it(gm.darts_of_orbit<0,1>(d2).begin()), + itend(gm.darts_of_orbit<0,1>(d2).end()); it!=itend; ++it) ++res; - std::cout<<"Number of darts of the face incident to dh2: "<::iterator - it=gm.one_dart_per_incident_cell<2,3>(dh1).begin(), - itend=gm.one_dart_per_incident_cell<2,3>(dh1).end(); it!=itend; ++it) + it=gm.one_dart_per_incident_cell<2,3>(d1).begin(), + itend=gm.one_dart_per_incident_cell<2,3>(d1).end(); it!=itend; ++it) { gm.info<2>(it)=7; } // 3) Set the color of all facets of the second hexahedron to 13. for (GMap_3::One_dart_per_incident_cell_range<2, 3>::iterator it= - gm.one_dart_per_incident_cell<2,3>(dh2).begin(), - itend=gm.one_dart_per_incident_cell<2,3>(dh2).end(); it!=itend; ++it) + gm.one_dart_per_incident_cell<2,3>(d2).begin(), + itend=gm.one_dart_per_incident_cell<2,3>(d2).end(); it!=itend; ++it) { gm.info<2>(it)=13; } // 4) 3-Sew the two hexahedra along one facet. - gm.sew<3>(dh1, dh2); + gm.sew<3>(d1, d2); // 5) Display all the values of 2-attributes. for (GMap_3::Attribute_range<2>::type::iterator @@ -76,7 +76,7 @@ int main() std::cout<::type::iterator diff --git a/Linear_cell_complex/examples/Linear_cell_complex/draw_linear_cell_complex.cpp b/Linear_cell_complex/examples/Linear_cell_complex/draw_linear_cell_complex.cpp index cff51b6e8f5..080fa980856 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/draw_linear_cell_complex.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/draw_linear_cell_complex.cpp @@ -8,18 +8,18 @@ typedef LCC::Point Point; int main() { LCC lcc; - Dart_descriptor dh1= + Dart_descriptor d1= lcc.make_hexahedron(Point(0,0,0), Point(5,0,0), Point(5,5,0), Point(0,5,0), Point(0,5,4), Point(0,0,4), Point(5,0,4), Point(5,5,4)); - Dart_descriptor dh2= + Dart_descriptor d2= lcc.make_hexahedron(Point(5,0,0), Point(10,0,0), Point(10,5,0), Point(5,5,0), Point(5,5,4), Point(5,0,4), Point(10,0,4), Point(10,5,4)); - lcc.sew<3>(lcc.beta(dh1, 1, 1, 2), lcc.beta(dh2, 2)); + lcc.sew<3>(lcc.beta(d1, 1, 1, 2), lcc.beta(d2, 2)); lcc.display_characteristics(std::cout)<<", valid=" <0; ) { - dh=it++; - if ( it!=itend && it==lcc.beta<2>(dh) ) ++it; - lcc.remove_cell<1>(dh); + d=it++; + if ( it!=itend && it==lcc.beta<2>(d) ) ++it; + lcc.remove_cell<1>(d); --nb; } if ( !updateattribs ) lcc.set_automatic_attributes_management(true); diff --git a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_operations.cpp b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_operations.cpp index 107459c6319..804ed7b5481 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_operations.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/linear_cell_complex_3_operations.cpp @@ -9,14 +9,14 @@ template struct Alpha1 { - static typename LCC::Dart_descriptor run(LCC&, typename LCC::Dart_descriptor dh) - { return dh; } + static typename LCC::Dart_descriptor run(LCC&, typename LCC::Dart_descriptor d) + { return d; } }; template struct Alpha1 { - static typename LCC::Dart_descriptor run(LCC& lcc, typename LCC::Dart_descriptor dh) - { return lcc.template alpha<1>(dh); } + static typename LCC::Dart_descriptor run(LCC& lcc, typename LCC::Dart_descriptor d) + { return lcc.template alpha<1>(d); } }; template @@ -27,40 +27,40 @@ void run_test() LCC lcc; - Dart_descriptor dh1 = lcc. + Dart_descriptor d1 = lcc. make_hexahedron(Point(0,0,0),Point(1,0,0), Point(1,2,0),Point(0,2,0), Point(0,3,4),Point(0,0,4), Point(6,0,4),Point(6,3,4)); - Dart_descriptor dh2 = lcc. + Dart_descriptor d2 = lcc. make_hexahedron(Point(0,-5,0),Point(2,-5,0), Point(2,-2,0),Point(0,-2,0), Point(1,-1,5),Point(1,-2,5), Point(5,-2,5),Point(5,-2,5)); - Dart_descriptor dh3 = lcc. + Dart_descriptor d3 = lcc. make_hexahedron(Point(1,0,5),Point(0,0,6), Point(0,2,5),Point(1,2,6), Point(1,3,8),Point(0,0,8), Point(5,0,9),Point(7,3,9)); - lcc.template sew<3>(dh1,lcc.other_orientation + lcc.template sew<3>(d1,lcc.other_orientation (lcc.template opposite<2> - (lcc.next(lcc.next(lcc.template opposite<2>(dh2)))))); - lcc.template sew<3>(lcc.template opposite<2>(lcc.next(dh1)), - lcc.other_orientation(lcc.template opposite<2>(lcc.previous(dh3)))); + (lcc.next(lcc.next(lcc.template opposite<2>(d2)))))); + lcc.template sew<3>(lcc.template opposite<2>(lcc.next(d1)), + lcc.other_orientation(lcc.template opposite<2>(lcc.previous(d3)))); - lcc.insert_cell_1_in_cell_2(lcc.next(dh1), - Alpha1::run(lcc, lcc.previous(dh1))); - dh2=lcc.template opposite<2>(lcc.next(lcc.next - (lcc.template opposite<2>(dh1)))); - lcc.insert_cell_1_in_cell_2(dh2, Alpha1::run - (lcc, lcc.next(lcc.next(dh2)))); + lcc.insert_cell_1_in_cell_2(lcc.next(d1), + Alpha1::run(lcc, lcc.previous(d1))); + d2=lcc.template opposite<2>(lcc.next(lcc.next + (lcc.template opposite<2>(d1)))); + lcc.insert_cell_1_in_cell_2(d2, Alpha1::run + (lcc, lcc.next(lcc.next(d2)))); std::vector path; - path.push_back(lcc.next(dh1)); - path.push_back(lcc.next(lcc.template opposite<2>(lcc.previous(dh1)))); - path.push_back(lcc.previous(dh2)); - path.push_back(lcc.next(lcc.template opposite<2>(dh2))); + path.push_back(lcc.next(d1)); + path.push_back(lcc.next(lcc.template opposite<2>(lcc.previous(d1)))); + path.push_back(lcc.previous(d2)); + path.push_back(lcc.next(lcc.template opposite<2>(d2))); lcc.insert_cell_2_in_cell_3(path.begin(),path.end()); lcc.display_characteristics(std::cout) << ", valid=" diff --git a/Linear_cell_complex/examples/Linear_cell_complex/voronoi_2.cpp b/Linear_cell_complex/examples/Linear_cell_complex/voronoi_2.cpp index 36bd833d052..73a40cacea1 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/voronoi_2.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/voronoi_2.cpp @@ -130,7 +130,7 @@ int main(int narg, char** argv) std::map face_to_dart; - Dart_descriptor dh=CGAL::import_from_triangulation_2 + Dart_descriptor d=CGAL::import_from_triangulation_2 (lcc, T, &face_to_dart); assert(lcc.is_without_boundary()); @@ -140,7 +140,7 @@ int main(int narg, char** argv) // 3) Compute the dual lcc. LCC_2 dual_lcc; - Dart_descriptor ddh=lcc.dual(dual_lcc, dh); + Dart_descriptor dd=lcc.dual(dual_lcc, d); // Here, dual_lcc is the 2D Voronoi diagram. assert(dual_lcc.is_without_boundary()); @@ -156,7 +156,7 @@ int main(int narg, char** argv) << dual_lcc.is_valid() << std::endl; - display_voronoi(dual_lcc, ddh); + display_voronoi(dual_lcc, dd); return EXIT_SUCCESS; } diff --git a/Linear_cell_complex/examples/Linear_cell_complex/voronoi_3.cpp b/Linear_cell_complex/examples/Linear_cell_complex/voronoi_3.cpp index 7c3c46177d3..4b157e1e7af 100644 --- a/Linear_cell_complex/examples/Linear_cell_complex/voronoi_3.cpp +++ b/Linear_cell_complex/examples/Linear_cell_complex/voronoi_3.cpp @@ -134,7 +134,7 @@ int main(int narg, char** argv) std::map vol_to_dart; - Dart_descriptor dh=CGAL::import_from_triangulation_3 + Dart_descriptor d=CGAL::import_from_triangulation_3 (lcc, T, &vol_to_dart); std::cout<<"Delaunay triangulation :"<