CGAL 6.1.1 - dD Frechet Distance

Loading...
Searching...
No Matches
Frechet_distance/Frechet_distance_d_2.cpp
#include <CGAL/Epick_d.h>
#include <CGAL/Frechet_distance.h>
#include <CGAL/Frechet_distance_traits_d.h>
#include <CGAL/IO/WKT.h>
#include <ostream>
#include <fstream>
using Kernel = CGAL::Epick_d<CGAL::Dimension_tag<2>>;
using Traits = CGAL::Frechet_distance_traits_d<Kernel>;
using Point = Kernel::Point_d;
int main(int argc, char* argv[])
{
std::vector<Point> polylineA, polylineB;
{
std::ifstream in((argc > 1) ? argv[1] : CGAL::data_file_path("wkt/LetterA.wkt"));
//CGAL::IO::read_linestring_WKT(in, polylineA);
}
{
std::ifstream in((argc > 1) ? argv[2] : CGAL::data_file_path("wkt/LetterAbis.wkt"));
//CGAL::IO::read_linestring_WKT(in, polylineB);
}
bool res = CGAL::is_Frechet_distance_larger(polylineA, polylineB, 0.001);
std::cout << std::boolalpha << res << std::endl;
return 0;
}
CGAL::Frechet_distance_traits_d
Definition: Frechet_distance_traits_d.h:34
CGAL::is_Frechet_distance_larger
bool is_Frechet_distance_larger(const PointRange &polyline1, const PointRange &polyline2, const double distance_bound, const NamedParameters &np=parameters::default_values())
determines if the Frechet distance between two polylines is larger than a given distance bound.
Definition: Frechet_distance.h:112
Kernel
CGAL::Epick_d