|
inlineconstexpr |
Calculate the surface area of the AABB.
This function computes the surface area of the Axis-Aligned Bounding Box (AABB). The surface area is calculated using the formula:
Surface Area = 2 * (width * height + height * depth + depth * width)
Since the size represents half-extents, the actual dimensions of the AABB are:
Therefore, the surface area is computed as:
Surface Area = 2 * ((size.X * 2) * (size.Y * 2) + (size.Y * 2) * (size.Z * 2) + (size.Z * 2) * (size.X * 2)) = (size.X * size.Y + size.Y * size.Z + size.Z * size.X) * 2