From ceb8bb0a09ddeb599aa12b8468e60dee9d5b8d8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Tue, 22 Sep 2020 17:40:52 +0200 Subject: [PATCH 1/2] Disable warnings when compiling Newton --- thirdparty/build/newton.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/thirdparty/build/newton.lua b/thirdparty/build/newton.lua index d9f9d4d20..9c9b93bb4 100644 --- a/thirdparty/build/newton.lua +++ b/thirdparty/build/newton.lua @@ -10,6 +10,7 @@ LIBRARY.OsDefines.Windows = { } LIBRARY.Language = "C++" +LIBRARY.DisableWarnings = true -- Newton has many warnings we can't really fix LIBRARY.Files = { "../thirdparty/include/newton/**.h", From 602de2e772aa72b56644b07e8c0be6c74e2d3ed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Leclercq?= Date: Tue, 22 Sep 2020 17:40:57 +0200 Subject: [PATCH 2/2] Update Ray.cpp --- tests/Engine/Math/Ray.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/Engine/Math/Ray.cpp b/tests/Engine/Math/Ray.cpp index 286a358c2..df1151f6d 100644 --- a/tests/Engine/Math/Ray.cpp +++ b/tests/Engine/Math/Ray.cpp @@ -32,22 +32,22 @@ SCENARIO("Ray", "[MATH][RAY]") float tmpClosest; float tmpFurthest; - CHECK(ray.Intersect(Nz::Boxf(-0.5f, 1.f, -0.5f, 1.f, 1.f, 1.f), &tmpClosest, &tmpFurthest)); - REQUIRE(ray.GetPoint(tmpClosest) == Nz::Vector3f::UnitY()); - REQUIRE(ray.GetPoint(tmpFurthest) == (Nz::Vector3f::UnitY() * 2.f)); - CHECK(!ray.Intersect(Nz::Boxf(-10.f, 1.f, -10.f, 1.f, 1.f, 1.f), &tmpClosest, &tmpFurthest)); + REQUIRE(ray.Intersect(Nz::Boxf(-0.5f, 1.f, -0.5f, 1.f, 1.f, 1.f), &tmpClosest, &tmpFurthest)); + CHECK(ray.GetPoint(tmpClosest) == Nz::Vector3f::UnitY()); + CHECK(ray.GetPoint(tmpFurthest) == (Nz::Vector3f::UnitY() * 2.f)); + REQUIRE(!ray.Intersect(Nz::Boxf(-10.f, 1.f, -10.f, 1.f, 1.f, 1.f), &tmpClosest, &tmpFurthest)); } THEN("For the Nz::Plane collision's") { - float tmpHit; + float tmpHit = -1.f; - CHECK(ray.Intersect(Nz::Planef(Nz::Vector3f::UnitY(), 1.f), &tmpHit)); - REQUIRE(ray.GetPoint(tmpHit) == Nz::Vector3f::UnitY()); - CHECK(ray.Intersect(Nz::Planef::XZ(), &tmpHit)); - REQUIRE(ray.GetPoint(tmpHit) == Nz::Vector3f::Zero()); - CHECK(ray.Intersect(Nz::Planef(Nz::Vector3f::UnitY(), 2.f), &tmpHit)); - REQUIRE(ray.GetPoint(tmpHit) == 2.f * Nz::Vector3f::UnitY()); + REQUIRE(ray.Intersect(Nz::Planef(Nz::Vector3f::UnitY(), 1.f), &tmpHit)); + CHECK(ray.GetPoint(tmpHit) == Nz::Vector3f::UnitY()); + REQUIRE(ray.Intersect(Nz::Planef::XZ(), &tmpHit)); + CHECK(ray.GetPoint(tmpHit) == Nz::Vector3f::Zero()); + REQUIRE(ray.Intersect(Nz::Planef(Nz::Vector3f::UnitY(), 2.f), &tmpHit)); + CHECK(ray.GetPoint(tmpHit) == 2.f * Nz::Vector3f::UnitY()); CHECK(!ray.Intersect(Nz::Planef(Nz::Vector3f::UnitX(), 1.f))); }