#include <iostream>
#include <fstream>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/Surface_mesh_approximation/approximate_triangle_mesh.h>
#include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h>
#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
#include <CGAL/Polygon_mesh_processing/orientation.h>
int main()
{
Mesh mesh;
std::ifstream file("data/bear.off");
file >> mesh;
std::vector<Kernel::Point_3> anchors;
std::vector<std::array<std::size_t, 3> > triangles;
max_number_of_proxies(200).
number_of_iterations(30).
anchors(std::back_inserter(anchors)).
triangles(std::back_inserter(triangles)));
std::cout << "#anchor vertices: " << anchors.size() << std::endl;
std::cout << "#triangles: " << triangles.size() << std::endl;
if (is_manifold) {
std::cout << "oriented, 2-manifold output." << std::endl;
Mesh output;
std::ofstream out("dump.off");
out << output;
out.close();
}
return EXIT_SUCCESS;
}