Fix to previous commit to allow building without WITH_GMP.

This commit is contained in:
Howard Trickey
2020-08-28 11:43:56 -04:00
parent 9e09b5c418
commit 4749bd2277
3 changed files with 6 additions and 0 deletions

View File

@@ -146,6 +146,7 @@ double3 double3::cross_poly(Span<double3> poly)
return n;
}
#ifdef WITH_GMP
mpq3 mpq3::cross_poly(Span<mpq3> poly)
{
/* Newell's Method. */
@@ -189,5 +190,6 @@ uint64_t mpq3::hash() const
uint64_t hashz = hash_mpq_class(this->z);
return hashx ^ (hashy * 33) ^ (hashz * 33 * 37);
}
#endif
} // namespace blender

View File

@@ -15,6 +15,7 @@
#include "BLI_mpq3.hh"
#include "BLI_vector.hh"
#ifdef WITH_GMP
namespace blender::meshintersect::tests {
constexpr bool DO_OBJ = false;
@@ -906,3 +907,4 @@ TEST(boolean_polymesh, CubePlane)
}
} // namespace blender::meshintersect::tests
#endif

View File

@@ -18,6 +18,7 @@
#define DO_REGULAR_TESTS 1
#define DO_PERF_TESTS 0
#ifdef WITH_GMP
namespace blender::meshintersect::tests {
constexpr bool DO_OBJ = false;
@@ -1070,3 +1071,4 @@ TEST(mesh_intersect_perf, SphereGrid)
#endif
} // namespace blender::meshintersect::tests
#endif