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

#include <Sphere.h>

Public Types

using FReal = T
 

Public Member Functions

 TSphere ()
 
 TSphere (int32)
 
 TSphere (TVector< T > InV, T InW)
 
FORCEINLINE TSphere (EForceInit)
 
 TSphere (const TVector< T > *Points, int32 Count)
 
 TSphere (const TSphere< T > *Spheres, int32 Count)
 
template<typename FArg , TEMPLATE_REQUIRES(!std::is_same_v< T, FArg >) >
 TSphere (const TSphere< FArg > &From)
 
bool Equals (const TSphere< T > &Sphere, T Tolerance=UE_KINDA_SMALL_NUMBER) const
 
bool operator== (const TSphere< T > &Other) const
 
bool operator!= (const TSphere< T > &Other) const
 
TSphere< Toperator+ (const TSphere< T > &Other) const
 
TSphere< T > & operator+= (const TSphere< T > &Other)
 
bool IsInside (const TSphere< T > &Other, T Tolerance=UE_KINDA_SMALL_NUMBER) const
 
bool IsInside (const FVector &In, T Tolerance=UE_KINDA_SMALL_NUMBER) const
 
FORCEINLINE bool Intersects (const TSphere< T > &Other, T Tolerance=UE_KINDA_SMALL_NUMBER) const
 
TSphere< TTransformBy (const TMatrix< T > &M) const
 
TSphere< TTransformBy (const FTransform &M) const
 
T GetVolume () const
 
FString ToString () const
 
bool Serialize (FArchive &Ar)
 
bool SerializeFromMismatchedTag (FName StructTag, FArchive &Ar)
 
 TSphere (const TVector< float > *Points, int32 Count)
 
 TSphere (const TVector< double > *Points, int32 Count)
 
 TSphere (const TSphere< float > *Spheres, int32 Count)
 
 TSphere (const TSphere< double > *Spheres, int32 Count)
 

Public Attributes

TVector< TCenter
 
T W
 

Detailed Description

template<typename T>
struct UE::Math::TSphere< T >

Definition at line 28 of file Sphere.h.

Member Typedef Documentation

◆ FReal

template<typename T >
using UE::Math::TSphere< T >::FReal = T

Definition at line 31 of file Sphere.h.

Constructor & Destructor Documentation

◆ TSphere() [1/11]

template<typename T >
UE::Math::TSphere< T >::TSphere ( )
inline

Default constructor (no initialization).

Definition at line 41 of file Sphere.h.

◆ TSphere() [2/11]

template<typename T >
UE::Math::TSphere< T >::TSphere ( int32 )
inline

Creates and initializes a new sphere.

Parameters
int32Passing int32 sets up zeroed sphere.

Definition at line 48 of file Sphere.h.

◆ TSphere() [3/11]

template<typename T >
UE::Math::TSphere< T >::TSphere ( TVector< T > InV,
T InW )
inline

Creates and initializes a new sphere with the specified parameters.

Parameters
InVCenter of sphere.
InWRadius of sphere.

Definition at line 59 of file Sphere.h.

◆ TSphere() [4/11]

template<typename T >
FORCEINLINE UE::Math::TSphere< T >::TSphere ( EForceInit )
inlineexplicit

Constructor.

Parameters
EForceInitForce Init Enum.

Definition at line 69 of file Sphere.h.

◆ TSphere() [5/11]

template<typename T >
UE::Math::TSphere< T >::TSphere ( const TVector< T > * Points,
int32 Count )

Constructor.

Parameters
PointsPointer to list of points this sphere must contain.
CountHow many points are in the list.

◆ TSphere() [6/11]

template<typename T >
UE::Math::TSphere< T >::TSphere ( const TSphere< T > * Spheres,
int32 Count )

Constructor.

Parameters
SpheresPointer to list of spheres this sphere must contain.
CountHow many points are in the list.

◆ TSphere() [7/11]

template<typename T >
template<typename FArg , TEMPLATE_REQUIRES(!std::is_same_v< T, FArg >) >
UE::Math::TSphere< T >::TSphere ( const TSphere< FArg > & From)
inlineexplicit

Definition at line 93 of file Sphere.h.

◆ TSphere() [8/11]

UE::Math::TSphere< float >::TSphere ( const TVector< float > * Points,
int32 Count )

◆ TSphere() [9/11]

UE::Math::TSphere< double >::TSphere ( const TVector< double > * Points,
int32 Count )

◆ TSphere() [10/11]

UE::Math::TSphere< float >::TSphere ( const TSphere< float > * Spheres,
int32 Count )

◆ TSphere() [11/11]

UE::Math::TSphere< double >::TSphere ( const TSphere< double > * Spheres,
int32 Count )

Member Function Documentation

◆ Equals()

template<typename T >
bool UE::Math::TSphere< T >::Equals ( const TSphere< T > & Sphere,
T Tolerance = UE_KINDA_SMALL_NUMBER ) const
inline

Check whether two spheres are the same within specified tolerance.

Parameters
SphereThe other sphere.
ToleranceError Tolerance.
Returns
true if spheres are equal within specified tolerance, otherwise false.

Definition at line 102 of file Sphere.h.

◆ GetVolume()

template<typename T >
T UE::Math::TSphere< T >::GetVolume ( ) const
inline

Get volume of the current sphere

Returns
Volume (in Unreal units).

Definition at line 209 of file Sphere.h.

◆ Intersects()

template<typename T >
FORCEINLINE bool UE::Math::TSphere< T >::Intersects ( const TSphere< T > & Other,
T Tolerance = UE_KINDA_SMALL_NUMBER ) const
inline

Test whether this sphere intersects another.

Parameters
OtherThe other sphere.
ToleranceError tolerance.
Returns
true if spheres intersect, false otherwise.

Definition at line 183 of file Sphere.h.

◆ IsInside() [1/2]

template<typename T >
bool UE::Math::TSphere< T >::IsInside ( const FVector & In,
T Tolerance = UE_KINDA_SMALL_NUMBER ) const
inline

Checks whether the given location is inside this sphere.

Parameters
InThe location to test for inside the bounding volume.
Returns
true if location is inside this volume.

Definition at line 171 of file Sphere.h.

◆ IsInside() [2/2]

template<typename T >
bool UE::Math::TSphere< T >::IsInside ( const TSphere< T > & Other,
T Tolerance = UE_KINDA_SMALL_NUMBER ) const
inline

Check whether sphere is inside of another.

Parameters
OtherThe other sphere.
ToleranceError Tolerance.
Returns
true if sphere is inside another, otherwise false.

Definition at line 155 of file Sphere.h.

◆ operator!=()

template<typename T >
bool UE::Math::TSphere< T >::operator!= ( const TSphere< T > & Other) const
inline

Compares two spheres for inequality.

Parameters
OtherThe other sphere to compare with.
Returns
true if the spheres are not equal, false otherwise.

Definition at line 124 of file Sphere.h.

◆ operator+()

template<typename T >
TSphere< T > UE::Math::TSphere< T >::operator+ ( const TSphere< T > & Other) const
inline

Gets the result of addition to this bounding volume.

Parameters
OtherThe other volume to add to this.
Returns
A new bounding volume.

Definition at line 135 of file Sphere.h.

◆ operator+=()

template<typename T >
TSphere< T > & UE::Math::TSphere< T >::operator+= ( const TSphere< T > & Other)

Adds to this sphere to include a new bounding volume.

Parameters
Otherthe bounding volume to increase the bounding volume to.
Returns
Reference to this bounding volume after resizing to include the other bounding volume.

Definition at line 307 of file Sphere.h.

◆ operator==()

template<typename T >
bool UE::Math::TSphere< T >::operator== ( const TSphere< T > & Other) const
inline

Compares two spheres for equality.

Parameters
OtherThe other sphere to compare with.
Returns
true if the spheres are equal, false otherwise.

Definition at line 113 of file Sphere.h.

◆ Serialize()

template<typename T >
bool UE::Math::TSphere< T >::Serialize ( FArchive & Ar)
inline

Definition at line 225 of file Sphere.h.

◆ SerializeFromMismatchedTag()

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

Definition at line 370 of file Sphere.h.

◆ ToString()

template<typename T >
FString UE::Math::TSphere< T >::ToString ( ) const
inline

Get a textual representation of the sphere.

Returns
Text describing the sphere.

Definition at line 219 of file Sphere.h.

◆ TransformBy() [1/2]

template<typename T >
TSphere< T > UE::Math::TSphere< T >::TransformBy ( const FTransform & M) const

Get result of Transforming sphere with Transform.

Parameters
MTransform information.
Returns
Result of transformation.

Definition at line 296 of file Sphere.h.

◆ TransformBy() [2/2]

template<typename T >
TSphere< T > UE::Math::TSphere< T >::TransformBy ( const TMatrix< T > & M) const

Get result of Transforming sphere by Matrix.

Parameters
MMatrix to transform by.
Returns
Result of transformation.

Definition at line 278 of file Sphere.h.

Member Data Documentation

◆ Center

template<typename T >
TVector<T> UE::Math::TSphere< T >::Center

The sphere's center point.

Definition at line 34 of file Sphere.h.

◆ W

template<typename T >
T UE::Math::TSphere< T >::W

The sphere's radius.

Definition at line 37 of file Sphere.h.


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