Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
UE::Math::TBoxSphereBounds< T, TExtent > Struct Template Reference

#include <BoxSphereBounds.h>

+ Collaboration diagram for UE::Math::TBoxSphereBounds< T, TExtent >:

Public Types

using FReal = T
 

Public Member Functions

 TBoxSphereBounds ()
 
FORCEINLINE TBoxSphereBounds (EForceInit)
 
 TBoxSphereBounds (const TVector< T > &InOrigin, const TVector< TExtent > &InBoxExtent, TExtent InSphereRadius)
 
 TBoxSphereBounds (const TBox< T > &Box, const TSphere< T > &Sphere)
 
 TBoxSphereBounds (const TBox< T > &Box)
 
 TBoxSphereBounds (const TSphere< T > &Sphere)
 
 TBoxSphereBounds (const TVector< T > *Points, uint32 NumPoints)
 
template<typename TFrom , typename TExtentFrom , TEMPLATE_REQUIRES(!(std::is_same_v< T, TFrom > &&std::is_same_v< TExtent, TExtentFrom >)) >
 TBoxSphereBounds (const TBoxSphereBounds< TFrom, TExtentFrom > &From)
 
bool Serialize (FArchive &Ar)
 
bool SerializeFromMismatchedTag (FName StructTag, FArchive &Ar)
 
FORCEINLINE TBoxSphereBounds< T, TExtentoperator+ (const TBoxSphereBounds< T, TExtent > &Other) const
 
FORCEINLINE bool operator== (const TBoxSphereBounds< T, TExtent > &Other) const
 
FORCEINLINE bool operator!= (const TBoxSphereBounds< T, TExtent > &Other) const
 
FORCEINLINE T ComputeSquaredDistanceFromBoxToPoint (const TVector< T > &Point) const
 
FORCEINLINE TBox< TGetBox () const
 
TVector< TGetBoxExtrema (uint32 Extrema) const
 
FORCEINLINE TSphere< TGetSphere () const
 
FORCEINLINE TBoxSphereBounds< T, TExtentExpandBy (TExtent ExpandAmount) const
 
TBoxSphereBounds< T, TExtentTransformBy (const TMatrix< T > &M) const
 
TBoxSphereBounds< T, TExtentTransformBy (const TTransform< T > &M) const
 
FString ToString () const
 
FORCEINLINE void DiagnosticCheckNaN () const
 
bool ContainsNaN () const
 

Static Public Member Functions

static FORCEINLINE bool SpheresIntersect (const TBoxSphereBounds< T, TExtent > &A, const TBoxSphereBounds< T, TExtent > &B, TExtent Tolerance=UE_KINDA_SMALL_NUMBER)
 
static FORCEINLINE bool BoxesIntersect (const TBoxSphereBounds< T, TExtent > &A, const TBoxSphereBounds< T, TExtent > &B)
 

Public Attributes

TVector< TOrigin
 
TVector< TExtentBoxExtent
 
TExtent SphereRadius
 

Friends

TBoxSphereBounds< T, TExtentUnion (const TBoxSphereBounds< T, TExtent > &A, const TBoxSphereBounds< T, TExtent > &B)
 

Detailed Description

template<typename T, typename TExtent>
struct UE::Math::TBoxSphereBounds< T, TExtent >

Definition at line 23 of file BoxSphereBounds.h.

Member Typedef Documentation

◆ FReal

Definition at line 25 of file BoxSphereBounds.h.

Constructor & Destructor Documentation

◆ TBoxSphereBounds() [1/8]

template<typename T , typename TExtent >
UE::Math::TBoxSphereBounds< T, TExtent >::TBoxSphereBounds ( )
inline

Default constructor.

Definition at line 39 of file BoxSphereBounds.h.

◆ TBoxSphereBounds() [2/8]

template<typename T , typename TExtent >
FORCEINLINE UE::Math::TBoxSphereBounds< T, TExtent >::TBoxSphereBounds ( EForceInit )
inlineexplicit

Creates and initializes a new instance.

Parameters
EForceInitForce Init Enum.

Definition at line 46 of file BoxSphereBounds.h.

◆ TBoxSphereBounds() [3/8]

template<typename T , typename TExtent >
UE::Math::TBoxSphereBounds< T, TExtent >::TBoxSphereBounds ( const TVector< T > & InOrigin,
const TVector< TExtent > & InBoxExtent,
TExtent InSphereRadius )
inline

Creates and initializes a new instance from the specified parameters.

Parameters
InOriginorigin of the bounding box and sphere.
InBoxExtenthalf size of box.
InSphereRadiusradius of the sphere.

Definition at line 61 of file BoxSphereBounds.h.

◆ TBoxSphereBounds() [4/8]

template<typename T , typename TExtent >
UE::Math::TBoxSphereBounds< T, TExtent >::TBoxSphereBounds ( const TBox< T > & Box,
const TSphere< T > & Sphere )
inline

Creates and initializes a new instance from the given Box and Sphere.

Parameters
BoxThe bounding box.
SphereThe bounding sphere.

Definition at line 75 of file BoxSphereBounds.h.

◆ TBoxSphereBounds() [5/8]

template<typename T , typename TExtent >
UE::Math::TBoxSphereBounds< T, TExtent >::TBoxSphereBounds ( const TBox< T > & Box)
inline

Creates and initializes a new instance the given Box.

The sphere radius is taken from the extent of the box.

Parameters
BoxThe bounding box.

Definition at line 93 of file BoxSphereBounds.h.

◆ TBoxSphereBounds() [6/8]

template<typename T , typename TExtent >
UE::Math::TBoxSphereBounds< T, TExtent >::TBoxSphereBounds ( const TSphere< T > & Sphere)
inline

Creates and initializes a new instance for the given sphere.

Definition at line 107 of file BoxSphereBounds.h.

◆ TBoxSphereBounds() [7/8]

template<typename T , typename TExtent >
FORCEINLINE UE::Math::TBoxSphereBounds< T, TExtent >::TBoxSphereBounds ( const TVector< T > * Points,
uint32 NumPoints )

Creates and initializes a new instance from the given set of points.

The sphere radius is taken from the extent of the box.

Parameters
PointsThe points to be considered for the bounding box.
NumPointsNumber of points in the Points array.

Definition at line 353 of file BoxSphereBounds.h.

◆ TBoxSphereBounds() [8/8]

template<typename T , typename TExtent >
template<typename TFrom , typename TExtentFrom , TEMPLATE_REQUIRES(!(std::is_same_v< T, TFrom > &&std::is_same_v< TExtent, TExtentFrom >)) >
UE::Math::TBoxSphereBounds< T, TExtent >::TBoxSphereBounds ( const TBoxSphereBounds< TFrom, TExtentFrom > & From)
inlineexplicit

Definition at line 128 of file BoxSphereBounds.h.

Member Function Documentation

◆ BoxesIntersect()

Test whether the boxes from two BoxSphereBounds intersect/overlap.

Parameters
AFirst BoxSphereBounds to test.
BSecond BoxSphereBounds to test.
Returns
true if boxes intersect, false otherwise.

Definition at line 195 of file BoxSphereBounds.h.

◆ ComputeSquaredDistanceFromBoxToPoint()

template<typename T , typename TExtent >
FORCEINLINE T UE::Math::TBoxSphereBounds< T, TExtent >::ComputeSquaredDistanceFromBoxToPoint ( const TVector< T > & Point) const
inline

Calculates the squared distance from a point to a bounding box

Parameters
PointThe point.
Returns
The distance.

Definition at line 167 of file BoxSphereBounds.h.

◆ ContainsNaN()

template<typename T , typename TExtent >
bool UE::Math::TBoxSphereBounds< T, TExtent >::ContainsNaN ( ) const
inline

Definition at line 303 of file BoxSphereBounds.h.

◆ DiagnosticCheckNaN()

template<typename T , typename TExtent >
FORCEINLINE void UE::Math::TBoxSphereBounds< T, TExtent >::DiagnosticCheckNaN ( ) const
inline

Definition at line 300 of file BoxSphereBounds.h.

◆ ExpandBy()

template<typename T , typename TExtent >
FORCEINLINE TBoxSphereBounds< T, TExtent > UE::Math::TBoxSphereBounds< T, TExtent >::ExpandBy ( TExtent ExpandAmount) const
inline

Increase the size of the box and sphere by a given size.

Parameters
ExpandAmountThe size to increase by.
Returns
A new box with the expanded size.

Definition at line 242 of file BoxSphereBounds.h.

◆ GetBox()

template<typename T , typename TExtent >
FORCEINLINE TBox< T > UE::Math::TBoxSphereBounds< T, TExtent >::GetBox ( ) const
inline

Gets the bounding box.

Returns
The bounding box.

Definition at line 205 of file BoxSphereBounds.h.

◆ GetBoxExtrema()

template<typename T , typename TExtent >
TVector< T > UE::Math::TBoxSphereBounds< T, TExtent >::GetBoxExtrema ( uint32 Extrema) const
inline

Gets the extrema for the bounding box.

Parameters
Extrema1 for positive extrema from the origin, else negative
Returns
The boxes extrema

Definition at line 216 of file BoxSphereBounds.h.

◆ GetSphere()

template<typename T , typename TExtent >
FORCEINLINE TSphere< T > UE::Math::TBoxSphereBounds< T, TExtent >::GetSphere ( ) const
inline

Gets the bounding sphere.

Returns
The bounding sphere.

Definition at line 231 of file BoxSphereBounds.h.

◆ operator!=()

Compare bounding volume this and Other.

Parameters
OtherThe other bounding volume.
Returns
true of they do not match.

Definition at line 406 of file BoxSphereBounds.h.

◆ operator+()

Constructs a bounding volume containing both this and B.

Parameters
OtherThe other bounding volume.
Returns
The combined bounding volume.

Definition at line 381 of file BoxSphereBounds.h.

◆ operator==()

Compare bounding volume this and Other.

Parameters
OtherThe other bounding volume.
Returns
true of they match.

Definition at line 400 of file BoxSphereBounds.h.

◆ Serialize()

Definition at line 412 of file BoxSphereBounds.h.

◆ SerializeFromMismatchedTag()

bool FBoxSphereBounds3d::SerializeFromMismatchedTag ( FName StructTag,
FArchive & Ar )
inline

Definition at line 499 of file BoxSphereBounds.h.

◆ SpheresIntersect()

Test whether the spheres from two BoxSphereBounds intersect/overlap.

Parameters
AFirst BoxSphereBounds to test.
BSecond BoxSphereBounds to test.
ToleranceError tolerance added to test distance.
Returns
true if spheres intersect, false otherwise.

Definition at line 183 of file BoxSphereBounds.h.

◆ ToString()

Get a textual representation of this bounding box.

Returns
Text describing the bounding box.

Definition at line 419 of file BoxSphereBounds.h.

◆ TransformBy() [1/2]

template<typename T , typename TExtent >
TBoxSphereBounds< T, TExtent > UE::Math::TBoxSphereBounds< T, TExtent >::TransformBy ( const TMatrix< T > & M) const

Gets a bounding volume transformed by a matrix.

Parameters
MThe matrix.
Returns
The transformed volume.

Definition at line 425 of file BoxSphereBounds.h.

◆ TransformBy() [2/2]

Gets a bounding volume transformed by a FTransform object.

Parameters
MThe FTransform object.
Returns
The transformed volume.

Definition at line 478 of file BoxSphereBounds.h.

Friends And Related Symbol Documentation

◆ Union

Constructs a bounding volume containing both A and B.

This is a legacy version of the function used to compute primitive bounds, to avoid the need to rebuild lighting after the change.

Definition at line 275 of file BoxSphereBounds.h.

Member Data Documentation

◆ BoxExtent

Holds the extent of the bounding box.

Definition at line 31 of file BoxSphereBounds.h.

◆ Origin

Holds the origin of the bounding box and sphere.

Definition at line 28 of file BoxSphereBounds.h.

◆ SphereRadius

Holds the radius of the bounding sphere.

Definition at line 34 of file BoxSphereBounds.h.


The documentation for this struct was generated from the following files: