mirror of https://github.com/CGAL/cgal
Fix performances of Triangulation_2 with EPEC
There was a performance degradation between CGAL-3.7 and CGAL-3.8, when Triangulation_2 is used with EPEC. This patch fixes the issue. Using a functor that is specialized for EPEC, in inexact_orientation, to_double is not called on p.x() but on p.approx().x().
This commit is contained in:
parent
b62bebb796
commit
0e3de8807e
|
|
@ -46,6 +46,7 @@
|
|||
#include <boost/random/variate_generator.hpp>
|
||||
|
||||
#ifndef CGAL_NO_STRUCTURAL_FILTERING
|
||||
#include <CGAL/internal/Static_filters/tools.h>
|
||||
#include <CGAL/Triangulation_structural_filtering_traits.h>
|
||||
#include <CGAL/determinant.h>
|
||||
#endif // no CGAL_NO_STRUCTURAL_FILTERING
|
||||
|
|
@ -3011,9 +3012,15 @@ Triangulation_2<Gt, Tds>::
|
|||
inexact_orientation(const Point &p, const Point &q,
|
||||
const Point &r) const
|
||||
{
|
||||
const double px = to_double(p.x()); const double py = to_double(p.y());
|
||||
const double qx = to_double(q.x()); const double qy = to_double(q.y());
|
||||
const double rx = to_double(r.x()); const double ry = to_double(r.y());
|
||||
// So that this code works well with Laxy_kernel
|
||||
internal::Static_filters_predicates::Get_approx<Point> get_approx;
|
||||
|
||||
const double px = to_double(get_approx(p).x());
|
||||
const double py = to_double(get_approx(p).y());
|
||||
const double qx = to_double(get_approx(q).x());
|
||||
const double qy = to_double(get_approx(q).y());
|
||||
const double rx = to_double(get_approx(r).x());
|
||||
const double ry = to_double(get_approx(r).y());
|
||||
|
||||
const double pqx = qx - px;
|
||||
const double pqy = qy - py;
|
||||
|
|
|
|||
Loading…
Reference in New Issue