#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
#include <CGAL/Surface_mesh_default_triangulation_3.h>
#include <CGAL/Surface_mesh_default_criteria_3.h>
#include <CGAL/Complex_2_in_triangulation_3.h>
#include <CGAL/IO/Complex_2_in_triangulation_3_file_writer.h>
#include <fstream>
#include <CGAL/make_surface_mesh.h>
#include <CGAL/Gray_level_image_3.h>
#include <CGAL/Implicit_surface_3.h>
typedef CGAL::Complex_2_in_triangulation_3<Tr> C2t3;
typedef Tr::Geom_traits GT;
int main() {
Tr tr;
C2t3 c2t3 (tr);
GT::Point_3 bounding_sphere_center(122., 102., 117.);
GT::FT bounding_sphere_squared_radius = 200.*200.*2.;
GT::Sphere_3 bounding_sphere(bounding_sphere_center,
bounding_sphere_squared_radius);
Surface_3 surface(image, bounding_sphere, 1e-5);
5.,
5.);
std::ofstream out("out.off");
std::cout << "Final number of points: " << tr.number_of_vertices() << "\n";
}
A 3D gray image is a tri-dimensional array that associates a scalar value to each triple of integer ...
Definition: Gray_level_image_3.h:38
The class Implicit_surface_3 implements a surface described as the zero level set of a function .
Definition: Implicit_surface_3.h:39
The class Surface_mesh_default_criteria_3 implements the most commonly used combination of meshing cr...
Definition: Surface_mesh_default_criteria_3.h:36
The class Surface_mesh_default_triangulation_3 is a model of the concept SurfaceMeshTriangulation_3,...
Definition: Surface_mesh_default_triangulation_3.h:20
The concept Surface_3 describes the types of surfaces to be meshed. The surface types are required to...
Definition: Surface_3.h:21
bool output_surface_facets_to_off(std::ostream &os, const SurfaceMeshComplex_2InTriangulation_3 &c2t3, int options=Surface_mesher::IO_ORIENT_SURFACE)
writes a manifold or non-manifold surface reconstructed by make_surface_mesh() in the OFF file format...
void make_surface_mesh(SurfaceMeshC2T3 &c2t3, Surface surface, FacetsCriteria criteria, Tag tag, int initial_number_of_points=20)
In the first overloaded version of of make_surface_mesh(), the surface type is given as template para...
std::string data_file_path(const std::string &filename)