Modifications of examples to follow modif of api.

This commit is contained in:
Guillaume Damiand 2011-10-24 09:55:24 +00:00
parent c3ed4ec5cb
commit 847b2f89f3
10 changed files with 69 additions and 80 deletions

View File

@ -94,9 +94,9 @@ public:
}
};
typedef CGAL::Combinatorial_map_with_points<2,3> LCC_3;
typedef LCC_3::Dart_handle Dart_handle;
typedef LCC_3::Point Point;
typedef CGAL::Linear_cell_complex<2,3> LCC_3;
typedef LCC_3::Dart_handle Dart_handle;
typedef LCC_3::Point Point;
typedef CGAL::Polyhedron_3<LCC_3::Traits> Polyhedron;
typedef Polyhedron::HalfedgeDS HalfedgeDS;

View File

@ -4,10 +4,10 @@
#include <iostream>
#include <algorithm>
typedef CGAL::Combinatorial_map_with_points<3> LCC_3;
typedef LCC_3::Dart_handle Dart_handle;
typedef LCC_3::Point Point;
typedef LCC_3::FT FT;
typedef CGAL::Linear_cell_complex<3> LCC_3;
typedef LCC_3::Dart_handle Dart_handle;
typedef LCC_3::Point Point;
typedef LCC_3::FT FT;
// Functor used to display all the vertices of a given volume
template<class LCC>

View File

@ -47,28 +47,28 @@ struct Myitem
typedef CGAL::Linear_cell_complex_traits
<3, CGAL::Exact_predicates_inexact_constructions_kernel> Traits;
typedef CGAL::Combinatorial_map_with_points<3,3,Traits,Myitem> LCC_3;
typedef LCC_3::Dart_handle Dart_handle;
typedef LCC_3::Point Point;
typedef LCC_3::FT FT;
typedef CGAL::Linear_cell_complex<3,3,Traits,Myitem> LCC_3;
typedef LCC_3::Dart_handle Dart_handle;
typedef LCC_3::Point Point;
typedef LCC_3::FT FT;
Dart_handle make_iso_cuboid(LCC_3& lcc, const Point& basepoint, FT lg)
{
return lcc.make_hexahedron(basepoint,
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(lg,0,0)),
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(lg,lg,0)),
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(0,lg,0)),
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(0,lg,lg)),
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(0,0,lg)),
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(lg,0,lg)),
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(lg,lg,lg)));
return lcc.make_hexahedron(basepoint,
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(lg,0,0)),
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(lg,lg,0)),
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(0,lg,0)),
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(0,lg,lg)),
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(0,0,lg)),
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(lg,0,lg)),
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(lg,lg,lg)));
}
int main()

View File

@ -4,11 +4,11 @@
#include <iostream>
#include <vector>
typedef CGAL::Combinatorial_map_with_points<4,5> LCC_4;
typedef LCC_4::Dart_handle Dart_handle;
typedef LCC_4::Point Point;
typedef LCC_4::Vector Vector;
typedef LCC_4::FT FT;
typedef CGAL::Linear_cell_complex<4,5> LCC_4;
typedef LCC_4::Dart_handle Dart_handle;
typedef LCC_4::Point Point;
typedef LCC_4::Vector Vector;
typedef LCC_4::FT FT;
// Functor used to display all the vertices of a given volume
template<class LCC>

View File

@ -24,7 +24,7 @@
#define NUMBER_OF_LOOP 10
typedef CGAL::Combinatorial_map_with_points<3> CMap_3;
typedef CGAL::Linear_cell_complex<3> CMap_3;
typedef CMap_3::Dart_handle Dart_handle;
int main(int narg, char** argv)

View File

@ -22,12 +22,12 @@
#include <iostream>
#include <fstream>
typedef CGAL::Combinatorial_map_with_points<3> LCC_3;
typedef LCC_3::Dart_handle Dart_handle;
typedef LCC_3::Vertex_attribute Vertex;
typedef LCC_3::Point Point;
typedef LCC_3::Vector Vector;
typedef LCC_3::FT FT;
typedef CGAL::Linear_cell_complex<3> LCC_3;
typedef LCC_3::Dart_handle Dart_handle;
typedef LCC_3::Vertex_attribute Vertex;
typedef LCC_3::Point Point;
typedef LCC_3::Vector Vector;
typedef LCC_3::FT FT;
#define PI 3.1415926535897932
@ -177,20 +177,20 @@ void subdivide_map_3(LCC_3& m)
Dart_handle make_iso_cuboid(LCC_3& lcc, const Point& basepoint, FT lg)
{
return lcc.make_hexahedron(basepoint,
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(lg,0,0)),
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(lg,lg,0)),
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(0,lg,0)),
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(0,lg,lg)),
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(0,0,lg)),
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(lg,0,lg)),
LCC_3::Construct_translated_point()(basepoint,
LCC_3::Vector(lg,lg,lg)));
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(lg,0,0)),
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(lg,lg,0)),
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(0,lg,0)),
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(0,lg,lg)),
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(0,0,lg)),
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(lg,0,lg)),
LCC_3::Traits::Construct_translated_point()(basepoint,
LCC_3::Traits::Vector(lg,lg,lg)));
}
int main(int narg, char** argv)

View File

@ -23,9 +23,9 @@
#include <fstream>
#include <cstring>
typedef CGAL::Combinatorial_map_with_points<2,2> Map_2;
typedef Map_2::Dart_handle Dart_handle;
typedef Map_2::Point Point;
typedef CGAL::Linear_cell_complex<2,2> Map_2;
typedef Map_2::Dart_handle Dart_handle;
typedef Map_2::Point Point;
int main(int narg, char** argv)
{

View File

@ -67,9 +67,9 @@ void run(const char* fname,const char* info)
bench<Poly_vector>(fname,"vector-based");
typedef CGAL::Linear_cell_complex_min_items<2> Items;
typedef CGAL::Combinatorial_map_with_points<2,3,
CGAL::Linear_cell_complex_traits<3, Kernel>,
Items> LCC;
typedef CGAL::Linear_cell_complex<2,3,
CGAL::Linear_cell_complex_traits<3, Kernel>,
Items> LCC;
bench2<LCC>(fname,"Linear cell complex");
}

View File

@ -1,22 +1,11 @@
cd debug; make; cd ..
make;
debug/map_3_with_points > res.txt 2>&1
debug/map_5_with_points >> res.txt 2>&1
debug/map_3_with_points_and_colored_vertices >> res.txt 2>&1
debug/map_3_subdivision >> res.txt 2>&1
debug/map_3_iterators data/aircraft.off >> res.txt 2>&1
debug/plane_graph_to_map_2 data/graph1.off >> res.txt 2>&1
debug/voronoi_3 data/small_points >> res.txt 2>&1
xxdiff res-valid.txt res.txt
cd release; make; cd ..
release/map_3_with_points > res.txt 2>&1
release/map_5_with_points >> res.txt 2>&1
release/map_3_with_points_and_colored_vertices >> res.txt 2>&1
release/map_3_subdivision >> res.txt 2>&1
release/map_3_iterators data/aircraft.off >> res.txt 2>&1
release/plane_graph_to_map_2 data/graph1.off >> res.txt 2>&1
release/voronoi_3 data/small_points >> res.txt 2>&1
./linear_cell_complex_3 > res.txt 2>&1
./linear_cell_complex_4 >> res.txt 2>&1
./linear_cell_complex_3_with_colored_vertices >> res.txt 2>&1
./map_3_subdivision >> res.txt 2>&1
./map_3_iterators data/aircraft.off >> res.txt 2>&1
./plane_graph_to_map_2 data/graph1.off >> res.txt 2>&1
./voronoi_3 data/small_points >> res.txt 2>&1
xxdiff res-valid.txt res.txt

View File

@ -26,9 +26,9 @@
// #include "cgal_map_viewer_vtk.h"
typedef CGAL::Combinatorial_map_with_points<3, 3> Map_3;
typedef Map_3::Dart_handle Dart_handle;
typedef Map_3::Point Point;
typedef CGAL::Linear_cell_complex<3, 3> Map_3;
typedef Map_3::Dart_handle Dart_handle;
typedef Map_3::Point Point;
typedef CGAL::Delaunay_triangulation_3<Map_3::Traits> Triangulation;