aur/isnormal.patch
2023-01-05 20:38:43 +00:00

32 lines
1.5 KiB
Diff

From f160515dd0b706d2034fe0641c00f58b2e63335d Mon Sep 17 00:00:00 2001
From: Povilas Kanapickas <povilas@radix.lt>
Date: Sat, 17 Sep 2022 22:01:58 +0300
Subject: [PATCH] [fuseCut] Pick isnormal() from std namespace
This fixes compile error due to isnormal() being not available in the
global namespace.
---
src/aliceVision/fuseCut/DelaunayGraphCut.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/aliceVision/fuseCut/DelaunayGraphCut.cpp b/src/aliceVision/fuseCut/DelaunayGraphCut.cpp
index 95e705fbf..38b8f9305 100644
--- a/src/aliceVision/fuseCut/DelaunayGraphCut.cpp
+++ b/src/aliceVision/fuseCut/DelaunayGraphCut.cpp
@@ -29,6 +29,7 @@
#include <boost/filesystem.hpp>
#include <boost/filesystem/operations.hpp>
+#include <cmath>
#include <random>
#include <stdexcept>
@@ -1629,7 +1630,7 @@ DelaunayGraphCut::GeometryIntersection DelaunayGraphCut::rayIntersectTriangle(co
Point3d tempIntersectPt;
const Point2d triangleUv = getLineTriangleIntersectBarycCoords(&tempIntersectPt, A, B, C, &originPt, &DirVec);
- if (!isnormal(tempIntersectPt.x) || !isnormal(tempIntersectPt.y) || !isnormal(tempIntersectPt.z))
+ if (!std::isnormal(tempIntersectPt.x) || !std::isnormal(tempIntersectPt.y) || !std::isnormal(tempIntersectPt.z))
{
// This is not suppose to happen in real life, we log a warning instead of raising an exeption if we face a border case
// ALICEVISION_LOG_WARNING("Invalid/notNormal intersection point found during rayIntersectTriangle.");