#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/Polygon_mesh_processing/distance.h>
#include <CGAL/Polygon_mesh_processing/IO/polygon_mesh_io.h>
#include <CGAL/Point_set_3.h>
#include <iostream>
#include <string>
#include <vector>
typedef K::Point_3 Point;
typedef CGAL::Point_set_3<Point> Point_set;
typedef boost::graph_traits<Mesh>::vertex_descriptor vertex_descriptor;
typedef boost::graph_traits<Mesh>::face_descriptor face_descriptor;
namespace PMP = CGAL::Polygon_mesh_processing;
int main(int argc, char* argv[])
{
Mesh mesh;
if(!PMP::IO::read_polygon_mesh(filename, mesh))
{
std::cerr << "Invalid input." << std::endl;
return 1;
}
const int points_per_face = (argc > 2) ? std::stoi(argv[2]) : 10;
std::vector<Point> points;
std::back_inserter(points),
CGAL::parameters::number_of_points_per_face(points_per_face));
Point_set point_set;
point_set.point_back_inserter());
std::cout << point_set.number_of_points() << std::endl;
return 0;
}
PointOutputIterator sample_triangle_mesh(const TriangleMesh &tm, PointOutputIterator out, const NamedParameters &np=parameters::default_values())
generates points on tm and outputs them to out; the sampling method is selected using named parameter...
Definition: distance.h:902
std::string data_file_path(const std::string &filename)