iOS C++ Unit Tests Bazel target & running on CI (#1534)

This commit is contained in:
Bart Louwers
2023-08-22 21:52:20 +02:00
committed by GitHub
parent e16995ec33
commit 32d65850c9
21 changed files with 308 additions and 155 deletions

View File

@@ -213,13 +213,15 @@ IntersectionResult Frustum::intersects(const AABB& aabb) const {
bool fullyInside = true;
const auto epsilon = 1e-10;
for (const vec4& plane : planes) {
size_t pointsInside = 0;
pointsInside += vec4Dot(plane, aabbPoints[0]) >= 0.0;
pointsInside += vec4Dot(plane, aabbPoints[1]) >= 0.0;
pointsInside += vec4Dot(plane, aabbPoints[2]) >= 0.0;
pointsInside += vec4Dot(plane, aabbPoints[3]) >= 0.0;
pointsInside += vec4Dot(plane, aabbPoints[0]) >= -epsilon;
pointsInside += vec4Dot(plane, aabbPoints[1]) >= -epsilon;
pointsInside += vec4Dot(plane, aabbPoints[2]) >= -epsilon;
pointsInside += vec4Dot(plane, aabbPoints[3]) >= -epsilon;
if (!pointsInside) {
// Separating axis found, no intersection