MCPcopy Create free account
hub / github.com/IppClub/Dora-SSR / intersect

Method intersect

Source/Support/Geometry.cpp:542–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

540}
541
542bool Frustum::intersect(const AABB& aabb) const {
543 for (const auto& plane : planes) {
544 auto p = aabb.min;
545 if (plane.normal.x >= 0) p.x = aabb.max.x;
546 if (plane.normal.y >= 0) p.y = aabb.max.y;
547 if (plane.normal.z >= 0) p.z = aabb.max.z;
548 auto result = ktm::dot(*r_cast<const ktm::fvec3*>(&plane.normal), *r_cast<const ktm::fvec3*>(&p));
549 if (result + plane.distance < 0) {
550 return false;
551 }
552 }
553 return true;
554}
555
556NS_DORA_END

Callers 1

isInFrustumMethod · 0.45

Calls 1

dotClass · 0.50

Tested by

no test coverage detected