Module |
|
Header |
/Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
Include |
#include "Math/UnrealMathUtility.h" |
Source |
/Engine/Source/Runtime/Core/Public/Math/Box.h |
Performs a sphere vs box intersection test using Arvo's algorithm:
for each i in (x, y, z) if (SphereCenter(i) < BoxMin(i)) d2 += (SphereCenter(i) - BoxMin(i)) 2 else if (SphereCenter(i) > BoxMax(i)) d2 += (SphereCenter(i) - BoxMax(i)) 2
Whether the sphere/box intersect or not.
Parameter |
Description |
---|---|
Sphere |
the center of the sphere being tested against the AABB |
RadiusSquared |
the size of the sphere being tested |
AABB |
the box being tested against |