mirror of
https://github.com/bevyengine/bevy
synced 2024-12-18 17:13:10 +00:00
206f4f7f5f
# Objective - Fixes: #15663 ## Solution - Add an `is_forward_plane` method to `Aabb`, and a `contains_aabb` method to `Frustum`. ## Test - I have created a frustum with an offset along with three unit tests to evaluate the `contains_aabb` algorithm. ## Explanation for the Test Cases - To facilitate the code review, I will explain how the frustum is created. Initially, we create a frustum without any offset and then create a cuboid that is just contained within it. <img width="714" alt="image" src="https://github.com/user-attachments/assets/a9ac53a2-f8a3-4e09-b20b-4ee71b27a099"> - Secondly, we move the cuboid by 2 units along both the x-axis and the y-axis to make it more general. ## Reference - [Frustum Culling](https://learnopengl.com/Guest-Articles/2021/Scene/Frustum-Culling#) - [AABB Plane intersection](https://gdbooks.gitbooks.io/3dcollisions/content/Chapter2/static_aabb_plane.html) --------- Co-authored-by: IQuick 143 <IQuick143cz@gmail.com> |
||
---|---|---|
.. | ||
macros | ||
src | ||
Cargo.toml | ||
README.md |