#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <CGAL/approximate_convex_decomposition.h>
#include <iostream>
#include <string>
#include <vector>
using Point = K::Point_3;
using Convex_hull = std::pair<std::vector<Point>, std::vector<std::array<unsigned int, 3> > >;
using Mesh = CGAL::Surface_mesh<Point>;
int main(int argc, char* argv[])
{
std::cout << filename << std::endl;
Mesh mesh;
if(!PMP::IO::read_polygon_mesh(filename, mesh)) {
std::cerr << "Invalid input." << std::endl;
return 1;
}
std::vector<Convex_hull> convex_volumes;
convex_volumes.reserve(9);
CGAL::parameters::maximum_depth(10)
.volume_error(0.1)
.maximum_number_of_convex_volumes(9)
.split_at_concavity(true)
.refitting(true)
.maximum_number_of_voxels(1000000)
for (std::size_t i = 0;i<convex_volumes.size();i++) {
const Convex_hull& ch = convex_volumes[i];
}
return 0;
}
bool write_polygon_soup(const std::string &fname, const PointRange &points, const PolygonRange &polygons, const NamedParameters &np=parameters::default_values())
std::size_t approximate_convex_decomposition(const FaceGraph &tmesh, OutputIterator out_volumes, const NamedParameters &np=parameters::default_values())
approximates the closed input mesh by a number of convex volumes.
Definition: approximate_convex_decomposition.h:1940
std::string data_file_path(const std::string &filename)