fix frustum culling

This commit is contained in:
Moritz Zwerger 2023-11-10 22:02:17 +01:00
parent d0fb324fe3
commit c03e3c1fbf
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -186,8 +186,8 @@ class Frustum(
fun containsAABB(aabb: AABB): Boolean {
val offset = camera.offset.offset
return containsRegion(
(aabb.min.x - offset.x).toFloat(), (aabb.min.y - offset.x).toFloat(), (aabb.min.z - offset.x).toFloat(),
(aabb.max.x - offset.x).toFloat(), (aabb.max.x - offset.x).toFloat(), (aabb.max.x - offset.x).toFloat(),
(aabb.min.x - offset.x).toFloat(), (aabb.min.y - offset.y).toFloat(), (aabb.min.z - offset.z).toFloat(),
(aabb.max.x - offset.x).toFloat(), (aabb.max.y - offset.y).toFloat(), (aabb.max.z - offset.z).toFloat(),
)
}