From 936a9122b44575c948e59c443c37a13bbc9d01c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9l=C3=A8ne=20Amanita?= Date: Mon, 17 Jul 2023 20:57:33 +0100 Subject: [PATCH] Clarify Aabb, can be used not as a component, what is it more generally, and how it is not used only for frustum culling --- crates/bevy_render/src/primitives/mod.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/crates/bevy_render/src/primitives/mod.rs b/crates/bevy_render/src/primitives/mod.rs index d8b3518eea063..caebc3824e16c 100644 --- a/crates/bevy_render/src/primitives/mod.rs +++ b/crates/bevy_render/src/primitives/mod.rs @@ -3,14 +3,17 @@ use bevy_math::{Mat4, Vec3, Vec3A, Vec4, Vec4Swizzles}; use bevy_reflect::Reflect; use bevy_utils::HashMap; -/// An axis-aligned bounding box. +/// An axis-aligned bounding box, defined by: +/// - a center, +/// - the distances from the center to each faces along the axis, +/// the faces are orthogonal to the axis. /// -/// It represents a box covering the local space occupied by the entity, with faces -/// orthogonal to the local axis. +/// It is typically used as a component on an entity to represent the local space +/// occupied by this entity, with faces orthogonal to its local axis. /// -/// It is typically used as a component on an entity during "frustum culling", -/// a process to determine if the entity should be rendered by a [`Camera`] -/// entity if it intersects with its [`Frustum`]. +/// This component is notably used during "frustum culling", a process to determine +/// if the entity should be rendered by a [`Camera`] entity if its bounding box +/// with its [`Frustum`]. /// /// It will be added automatically by the systems in [`CalculateBounds`] to entities that: /// - could be subject to frustum culling, for example with a [`Handle`]