\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.10.1 - 3D Surface Subdivision Methods
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Subdivision_method_3/DooSabin_subdivision.cpp
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Subdivision_method_3.h>
#include <iostream>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/IO/Polyhedron_iostream.h>
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
using namespace std;
using namespace CGAL;
int main(int argc, char **argv) {
if (argc != 2) {
cout << "Usage: DooSabin_subdivision d < filename" << endl;
cout << " d: the depth of the subdivision (0 < d < 10)" << endl;
cout << " filename: the input mesh (.off)" << endl;
return 0;
}
int d = argv[1][0] - '0';
Polyhedron P;
cin >> P; // read the .off
cout << P; // write the .off
return 0;
}