Merge branch 'master' into nazara-next
This commit is contained in:
commit
267bd74a97
|
|
@ -32,22 +32,22 @@ SCENARIO("Ray", "[MATH][RAY]")
|
||||||
float tmpClosest;
|
float tmpClosest;
|
||||||
float tmpFurthest;
|
float tmpFurthest;
|
||||||
|
|
||||||
CHECK(ray.Intersect(Nz::Boxf(-0.5f, 1.f, -0.5f, 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));
|
||||||
REQUIRE(ray.GetPoint(tmpClosest) == Nz::Vector3f::UnitY());
|
CHECK(ray.GetPoint(tmpClosest) == Nz::Vector3f::UnitY());
|
||||||
REQUIRE(ray.GetPoint(tmpFurthest) == (Nz::Vector3f::UnitY() * 2.f));
|
CHECK(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(-10.f, 1.f, -10.f, 1.f, 1.f, 1.f), &tmpClosest, &tmpFurthest));
|
||||||
}
|
}
|
||||||
|
|
||||||
THEN("For the Nz::Plane collision's")
|
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.Intersect(Nz::Planef(Nz::Vector3f::UnitY(), 1.f), &tmpHit));
|
||||||
REQUIRE(ray.GetPoint(tmpHit) == Nz::Vector3f::UnitY());
|
CHECK(ray.GetPoint(tmpHit) == Nz::Vector3f::UnitY());
|
||||||
CHECK(ray.Intersect(Nz::Planef::XZ(), &tmpHit));
|
REQUIRE(ray.Intersect(Nz::Planef::XZ(), &tmpHit));
|
||||||
REQUIRE(ray.GetPoint(tmpHit) == Nz::Vector3f::Zero());
|
CHECK(ray.GetPoint(tmpHit) == Nz::Vector3f::Zero());
|
||||||
CHECK(ray.Intersect(Nz::Planef(Nz::Vector3f::UnitY(), 2.f), &tmpHit));
|
REQUIRE(ray.Intersect(Nz::Planef(Nz::Vector3f::UnitY(), 2.f), &tmpHit));
|
||||||
REQUIRE(ray.GetPoint(tmpHit) == 2.f * Nz::Vector3f::UnitY());
|
CHECK(ray.GetPoint(tmpHit) == 2.f * Nz::Vector3f::UnitY());
|
||||||
|
|
||||||
CHECK(!ray.Intersect(Nz::Planef(Nz::Vector3f::UnitX(), 1.f)));
|
CHECK(!ray.Intersect(Nz::Planef(Nz::Vector3f::UnitX(), 1.f)));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ LIBRARY.OsDefines.Windows = {
|
||||||
}
|
}
|
||||||
|
|
||||||
LIBRARY.Language = "C++"
|
LIBRARY.Language = "C++"
|
||||||
|
LIBRARY.DisableWarnings = true -- Newton has many warnings we can't really fix
|
||||||
|
|
||||||
LIBRARY.Files = {
|
LIBRARY.Files = {
|
||||||
"../thirdparty/include/newton/**.h",
|
"../thirdparty/include/newton/**.h",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue