Merge branch 'development' into cmake/SPEC-7179
This commit is contained in:
@@ -130,7 +130,11 @@ namespace AZ
|
||||
//So for each plane, we can test compare the center-to-plane distance to this interval to see which side of the plane the AABB is on.
|
||||
//The AABB is not overlapping if it is fully behind any of the planes, otherwise it is overlapping.
|
||||
const Vector3 center = aabb.GetCenter();
|
||||
const Vector3 extents = 0.5f * aabb.GetExtents();
|
||||
|
||||
//If the AABB contains FLT_MAX at either (or both) extremes, it would be easy to overflow here by using "0.5f * GetExtents()"
|
||||
//or "0.5f * (GetMax() - GetMin())". By separating into two separate multiplies before the subtraction, we can ensure
|
||||
//that we don't overflow.
|
||||
const Vector3 extents = (0.5f * aabb.GetMax()) - (0.5f * aabb.GetMin());
|
||||
|
||||
for (Frustum::PlaneId planeId = Frustum::PlaneId::Near; planeId < Frustum::PlaneId::MAX; ++planeId)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user