1 #include <CGAL/Simple_cartesian.h>
2 #include <CGAL/Polyhedron_3.h>
3 #include <iostream>
4
5 typedef CGAL::Simple_cartesian<double> Kernel;
6 typedef Kernel::Point_3 Point_3;
7 typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
8 typedef Polyhedron::Vertex_iterator Vertex_iterator;
9
main()10 int main() {
11 Point_3 p( 1.0, 0.0, 0.0);
12 Point_3 q( 0.0, 1.0, 0.0);
13 Point_3 r( 0.0, 0.0, 1.0);
14 Point_3 s( 0.0, 0.0, 0.0);
15
16 Polyhedron P;
17 P.make_tetrahedron( p, q, r, s);
18 CGAL::IO::set_ascii_mode( std::cout);
19 for ( Vertex_iterator v = P.vertices_begin(); v != P.vertices_end(); ++v)
20 std::cout << v->point() << std::endl;
21 return 0;
22 }
23