Navigation
API > API/Runtime > API/Runtime/Core > API/Runtime/Core/FMath
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool SphereAABBIntersection
(
const UE::Math::TSphere< FReal >& Sphere, |
Converts a sphere into a point plus radius squared for the test above | Math/UnrealMathUtility.h | |
static bool SphereAABBIntersection
(
const UE::Math::TVector< FReal >& SphereCenter, |
Performs a sphere vs box intersection test using Arvo's algorithm: | Math/UnrealMathUtility.h |
SphereAABBIntersection(const UE::Math::TSphere< FReal > &, const UE::Math::TBox< FReal > &)
Description
Converts a sphere into a point plus radius squared for the test above
| Name | SphereAABBIntersection |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
| Include Path | #include "Math/UnrealMathUtility.h" |
| Source | /Engine/Source/Runtime/Core/Public/Math/Box.h |
template<typename FReal>
static bool SphereAABBIntersection
(
const UE::Math::TSphere < FReal > & Sphere,
const UE::Math::TBox < FReal > & AABB
)
SphereAABBIntersection(const UE::Math::TVector< FReal > &, const FReal, const UE::Math::TBox< FReal > &)
Description
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
| Name | SphereAABBIntersection |
| Type | function |
| Header File | /Engine/Source/Runtime/Core/Public/Math/UnrealMathUtility.h |
| Include Path | #include "Math/UnrealMathUtility.h" |
| Source | /Engine/Source/Runtime/Core/Public/Math/Box.h |
template<typename FReal>
static bool SphereAABBIntersection
(
const UE::Math::TVector < FReal > & SphereCenter,
const FReal RadiusSquared,
const UE::Math::TBox < FReal > & AABB
)
Whether the sphere/box intersect or not.
Parameters
| Name | Remarks |
|---|---|
| SphereCenter | the center of the sphere being tested against the AABB |
| RadiusSquared | the size of the sphere being tested |
| AABB | the box being tested against |