diff --git a/Cubical_gaussian_map_3/examples/Cubical_gaussian_map_3/minksum_simple.C b/Cubical_gaussian_map_3/examples/Cubical_gaussian_map_3/minksum_simple.C index abb16a079a6..cfeeff21eb9 100644 --- a/Cubical_gaussian_map_3/examples/Cubical_gaussian_map_3/minksum_simple.C +++ b/Cubical_gaussian_map_3/examples/Cubical_gaussian_map_3/minksum_simple.C @@ -1,22 +1,58 @@ // file: examples/Polyhedron/polyhedron_prog_simple.C #include -#include +#include +#include #include +#include -typedef CGAL::Simple_cartesian Kernel; -typedef CGAL::Polyhedron_3 Polyhedron; -typedef Polyhedron::Halfedge_handle Halfedge_handle; +#include +#include + +typedef CGAL::Gmpq Number_type; +typedef CGAL::Simple_cartesian Kernel; +typedef CGAL::Polyhedral_cgm Polyhedral_cgm; +typedef CGAL::Polyhedral_cgm_polyhedron_3 + Polyhedron; +typedef Polyhedron::Halfedge_handle Halfedge_handle; +typedef CGAL::Polyhedral_cgm_initializer + Polyhedral_cgm_initializer; +typedef Kernel::Point_3 Point_3; int main() { - Polyhedron p1, p2, p3; - Halfedge_handle h1 = p1.make_tetrahedron(); - Halfedge_handle h2 = p2.make_tetrahedron(); + Point_3 p( 1.0, 0.0, 0.0); + Point_3 q( 0.0, 1.0, 0.0); + Point_3 r( 0.0, 0.0, 1.0); + Point_3 s( 0.0, 0.0, 0.0); - Polyhedral_cgm pcgm1(p1); - Polyhedral_cgm pcgm2(p2); - Polyhedral_cgm pcgm3.minkowski_sum(cgm0, cgm1); - pcgm3.get(p3); - std::cout << p3 << std::endl; + Polyhedron P1, P2; + P1.make_tetrahedron(p, q, r, s); + P2.make_tetrahedron(p, q, r, s); + + Polyhedral_cgm pcgm1; + Polyhedral_cgm_initializer pcgm_initializer1(pcgm1); + pcgm_initializer1(P1); + std::cout << pcgm1.number_of_vertices() << " " + << pcgm1.number_of_edges() << " " + << pcgm1.number_of_facets() + << std::endl; + + Polyhedral_cgm pcgm2; + Polyhedral_cgm_initializer pcgm_initializer2(pcgm2); + pcgm_initializer2(P2); + std::cout << pcgm2.number_of_vertices() << " " + << pcgm2.number_of_edges() << " " + << pcgm2.number_of_facets() + << std::endl; + + Polyhedral_cgm pcgm3; + pcgm3.minkowski_sum(&pcgm1, &pcgm2); + std::cout << pcgm3.number_of_vertices() << " " + << pcgm3.number_of_edges() << " " + << pcgm3.number_of_facets() + << std::endl; + // std::cout << pcgm3 << std::endl; + // pcgm3.get(p3); + // std::cout << p3 << std::endl; }