#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/Polygon_mesh_processing/corefinement.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <array>
#include <iostream>
#include <string>
#include <tuple>
int main(int argc, char* argv[])
{
Mesh mesh1, mesh2;
{
std::cerr << "Invalid input." << std::endl;
return 1;
}
Mesh out_union, out_intersection;
std::array<boost::optional<Mesh*>, 4> output;
output[PMP::Corefinement::UNION] = &out_union;
output[PMP::Corefinement::INTERSECTION] = &out_intersection;
std::array<bool, 4> res =
mesh1, mesh2,
output,
std::make_tuple(
params::vertex_point_map(get(boost::vertex_point, out_union)),
params::vertex_point_map(get(boost::vertex_point, out_intersection)),
);
if (res[PMP::Corefinement::UNION])
{
std::cout << "Union was successfully computed\n";
}
else
std::cout << "Union could not be computed\n";
if (res[PMP::Corefinement::INTERSECTION])
{
std::cout << "Intersection was successfully computed\n";
}
else
std::cout << "Intersection could not be computed\n";
return 0;
}