#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Surface_mesh.h>
#include <CGAL/Extreme_points_traits_adapter_3.h>
#include <CGAL/convex_hull_3.h>
#include <CGAL/Convex_hull_3/distance.h>
#include <CGAL/Convex_hull_3/do_intersect.h>
#include <CGAL/Convex_hull_hierarchy.h>
#include <CGAL/boost/graph/IO/polygon_mesh_io.h>
#include <CGAL/IO/polygon_soup_io.h>
#include <vector>
#include <fstream>
typedef K::Point_3 Point_3;
typedef Mesh::Property_map<Mesh::Vertex_index, Point_3> PointMap;
int main(int argc, char* argv[])
{
Mesh sm1, sm2;
{
std::cerr<< "Cannot open " << f1 <<std::endl;
return 1;
}
{
std::cerr<< "Cannot open " << f2 <<std::endl;
return 1;
}
CGAL::parameters::point_map(sm1.points()),
CGAL::parameters::point_map(sm2.points()));
Convex_hull_hierarchy hsm1(sm1);
Convex_hull_hierarchy hsm2(sm2);
std::cout << "do convex hulls intersect? " << std::boolalpha << res << "\n";
return 0;
}
bool read_polygon_mesh(const std::string &fname, Graph &g, const NamedParameters &np=parameters::default_values())
bool do_intersect(const Convex1 &ch1, const Convex2 &ch2, const NamedParameters_1 &np1=parameters::default_values(), const NamedParameters_2 &np2=parameters::default_values())
checks if the convex hulls intersect or not.
Definition: do_intersect.h:324
std::string data_file_path(const std::string &filename)
This class stores a convex hull in a data structure optimized for fast intersection tests.
Definition: Convex_hull_hierarchy.h:63