mirror of https://github.com/CGAL/cgal
epeck support, fixed bug with infinity value
This commit is contained in:
parent
dc9e958503
commit
63db510aef
|
|
@ -17,7 +17,7 @@ using SCK = CGAL::Simple_cartesian<double>;
|
||||||
using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel;
|
using EPICK = CGAL::Exact_predicates_inexact_constructions_kernel;
|
||||||
using EPECK = CGAL::Exact_predicates_exact_constructions_kernel;
|
using EPECK = CGAL::Exact_predicates_exact_constructions_kernel;
|
||||||
|
|
||||||
using Kernel = EPECK;
|
using Kernel = EPICK;
|
||||||
using FT = typename Kernel::FT;
|
using FT = typename Kernel::FT;
|
||||||
using Point_3 = typename Kernel::Point_3;
|
using Point_3 = typename Kernel::Point_3;
|
||||||
using Vector_3 = typename Kernel::Vector_3;
|
using Vector_3 = typename Kernel::Vector_3;
|
||||||
|
|
@ -682,7 +682,7 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
// test_one_versus_another(apprx_hd, naive_hd);
|
// test_one_versus_another(apprx_hd, naive_hd);
|
||||||
// test_one_versus_another(naive_hd, bound_hd);
|
// test_one_versus_another(naive_hd, bound_hd);
|
||||||
// test_one_versus_another(bound_hd, apprx_hd);
|
test_one_versus_another(bound_hd, apprx_hd);
|
||||||
|
|
||||||
// --- Compare on real meshes.
|
// --- Compare on real meshes.
|
||||||
|
|
||||||
|
|
@ -691,14 +691,14 @@ int main(int argc, char** argv) {
|
||||||
|
|
||||||
// test_real_meshes(filepath1, filepath2, apprx_hd, naive_hd);
|
// test_real_meshes(filepath1, filepath2, apprx_hd, naive_hd);
|
||||||
// test_real_meshes(filepath1, filepath2, naive_hd, bound_hd);
|
// test_real_meshes(filepath1, filepath2, naive_hd, bound_hd);
|
||||||
// test_real_meshes(filepath1, filepath2, bound_hd, apprx_hd);
|
test_real_meshes(filepath1, filepath2, bound_hd, apprx_hd);
|
||||||
|
|
||||||
// --- Compare timings.
|
// --- Compare timings.
|
||||||
|
|
||||||
filepath = (argc > 1 ? argv[1] : "data/blobby-remeshed.off");
|
filepath = (argc > 1 ? argv[1] : "data/blobby-remeshed.off");
|
||||||
// test_timings(filepath, apprx_hd);
|
// test_timings(filepath, apprx_hd);
|
||||||
// test_timings(filepath, naive_hd);
|
// test_timings(filepath, naive_hd);
|
||||||
// test_timings(filepath, bound_hd);
|
test_timings(filepath, bound_hd);
|
||||||
|
|
||||||
// ------------------------------------------------------------------------ //
|
// ------------------------------------------------------------------------ //
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -1477,10 +1477,10 @@ double bounded_error_Hausdorff_impl(
|
||||||
tm2_tree.traits(), tm2, vpm2,
|
tm2_tree.traits(), tm2, vpm2,
|
||||||
triangle_bounds.first,
|
triangle_bounds.first,
|
||||||
triangle_bounds.second,
|
triangle_bounds.second,
|
||||||
std::numeric_limits<FT>::infinity(),
|
infinity_value<FT>(),
|
||||||
std::numeric_limits<FT>::infinity(),
|
infinity_value<FT>(),
|
||||||
std::numeric_limits<FT>::infinity(),
|
infinity_value<FT>(),
|
||||||
std::numeric_limits<FT>::infinity()
|
infinity_value<FT>()
|
||||||
);
|
);
|
||||||
tm2_tree.traversal_with_priority(sub_triangles[i], traversal_traits_tm2);
|
tm2_tree.traversal_with_priority(sub_triangles[i], traversal_traits_tm2);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,12 @@
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
// Infinity.
|
||||||
|
template<typename FT>
|
||||||
|
static FT infinity_value() {
|
||||||
|
return FT(1000000000000);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @struct Candidate_triangle
|
* @struct Candidate_triangle
|
||||||
*/
|
*/
|
||||||
|
|
@ -275,12 +281,12 @@ namespace CGAL {
|
||||||
Hausdorff_primitive_traits_tm2<Tree_traits, Triangle_3, Kernel, TriangleMesh, VPM2>
|
Hausdorff_primitive_traits_tm2<Tree_traits, Triangle_3, Kernel, TriangleMesh, VPM2>
|
||||||
traversal_traits_tm2(
|
traversal_traits_tm2(
|
||||||
m_tm2_tree.traits(), m_tm2, m_vpm2,
|
m_tm2_tree.traits(), m_tm2, m_vpm2,
|
||||||
(h_upper == FT(0)) ? std::numeric_limits<FT>::infinity() : h_upper, // Only pass current global bounds if they have been established yet
|
(h_upper == FT(0)) ? infinity_value<FT>() : h_upper, // Only pass current global bounds if they have been established yet
|
||||||
std::numeric_limits<FT>::infinity(),
|
infinity_value<FT>(),
|
||||||
std::numeric_limits<FT>::infinity(),
|
infinity_value<FT>(),
|
||||||
std::numeric_limits<FT>::infinity(),
|
infinity_value<FT>(),
|
||||||
std::numeric_limits<FT>::infinity(),
|
infinity_value<FT>(),
|
||||||
std::numeric_limits<FT>::infinity()
|
infinity_value<FT>()
|
||||||
);
|
);
|
||||||
m_tm2_tree.traversal_with_priority(candidate_triangle, traversal_traits_tm2);
|
m_tm2_tree.traversal_with_priority(candidate_triangle, traversal_traits_tm2);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue