UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Chaos::TSphere< T, d > Class Template Reference

#include <Sphere.h>

+ Inheritance diagram for Chaos::TSphere< T, d >:

Public Member Functions

 TSphere (const TVector< T, d > &InCenter, const T InRadius)
 
 TSphere (const TSphere< T, d > &Other)
 
 TSphere (TSphere< T, d > &&Other)
 
TSphereoperator= (TSphere< T, d > &&InSteal)
 
virtual ~TSphere ()
 
virtual FReal GetRadius () const override
 
virtual FRealSingle GetRadiusf () const override
 
virtualPhiWithNormal (const TVector< T, d > &InSamplePoint, TVector< T, d > &OutNormal) const override
 
bool Intersects (const TSphere< T, d > &Other) const
 
TVector< T, d > FindClosestPoint (const TVector< T, d > &StartPoint, const T Thickness=(T) 0) const
 
virtual bool Raycast (const TVector< T, d > &StartPoint, const TVector< T, d > &Dir, const T Length, const T Thickness, T &OutTime, TVector< T, d > &OutPosition, TVector< T, d > &OutNormal, int32 &OutFaceIndex) const override
 
virtual Pair< TVector< T, d >, boolFindClosestIntersectionImp (const TVector< T, d > &StartPoint, const TVector< T, d > &EndPoint, const T Thickness) const override
 
TVector< T, d > Support (const TVector< T, d > &Direction, const T Thickness, int32 &VertexIndex) const
 
FORCEINLINE const TVector< T, d > SupportCore (const TVector< T, d > &Direction, const FReal InMargin, FReal *OutSupportDelta, int32 &VertexIndex) const
 
FORCEINLINE VectorRegister4Float SupportCoreSimd (const VectorRegister4Float &Direction, const FReal InMargin) const
 
FORCEINLINE TVector< T, d > SupportCoreScaled (const TVector< T, d > &Direction, const FReal InMargin, const TVector< T, d > &Scale, FReal *OutSupportDelta, int32 &VertexIndex) const
 
virtual const TAABB< T, d > BoundingBox () const override
 
virtual FAABB3 CalculateTransformedBounds (const FRigidTransform3 &Transform) const override
 
GetArea () const
 
GetVolume () const
 
const TVector< T, d > GetCenter () const
 
const FVec3fGetCenterf () const
 
const TVector< T, d > GetCenterOfMass () const
 
const FVec3fGetCenterOfMassf () const
 
virtual FString ToString () const override
 
FORCEINLINE void SerializeImp (FArchive &Ar)
 
virtual void Serialize (FChaosArchive &Ar) override
 
virtual void Serialize (FArchive &Ar) override
 
TArray< TVector< T, d > > ComputeLocalSamplePoints (const int NumPoints) const
 
TArray< TVector< T, d > > ComputeLocalSamplePoints (const T PointsPerUnitArea, const int32 MinPoints=0, const int32 MaxPoints=1000) const
 
TArray< TVector< T, d > > ComputeSamplePoints (const int NumPoints) const
 
TArray< TVector< T, d > > ComputeSamplePoints (const T PointsPerUnitArea, const int32 MinPoints=0, const int32 MaxPoints=1000) const
 
PMatrix< T, d, d > GetInertiaTensor (const T InMass, const bool bInThinShell=false) const
 
TRotation< T, d > GetRotationOfMass () const
 
virtual uint32 GetTypeHash () const override
 
virtual Chaos::FImplicitObjectPtr CopyGeometry () const override
 
virtual Chaos::FImplicitObjectPtr CopyGeometryWithScale (const FVec3 &Scale) const override
 
virtual FName GetTypeName () const
 
- Public Member Functions inherited from Chaos::FImplicitObject
CHAOS_API FImplicitObject (int32 Flags, EImplicitObjectType InType=ImplicitObjectType::Unknown)
 
 FImplicitObject (const FImplicitObject &)=delete
 
 FImplicitObject (FImplicitObject &&)=delete
 
virtual CHAOS_API ~FImplicitObject () override
 
template<typename TargetType >
bool IsA () const
 
template<typename TargetType >
const TargetType * AsA () const
 
template<typename TargetType >
TargetType * AsA ()
 
template<typename TargetType >
const TargetType * AsAChecked () const
 
template<typename TargetType >
TargetType * AsAChecked ()
 
template<class T_DERIVED >
T_DERIVEDGetObject ()
 
template<class T_DERIVED >
const T_DERIVEDGetObject () const
 
template<class T_DERIVED >
const T_DERIVEDGetObjectChecked () const
 
template<class T_DERIVED >
T_DERIVEDGetObjectChecked ()
 
virtual EImplicitObjectType GetNestedType () const
 
CHAOS_API EImplicitObjectType GetType () const
 
CHAOS_API EImplicitObjectType GetCollisionType () const
 
void SetCollisionType (EImplicitObjectType InCollisionType)
 
virtual FReal GetMargin () const
 
virtual FRealSingle GetMarginf () const
 
virtual CHAOS_API bool IsValidGeometry () const
 
virtual Chaos::FImplicitObjectPtr DeepCopyGeometry () const
 
virtual Chaos::FImplicitObjectPtr DeepCopyGeometryWithScale (const FVec3 &Scale) const
 
virtual FImplicitObjectDuplicate () const
 
virtual TUniquePtr< FImplicitObjectCopy () const
 
virtual TUniquePtr< FImplicitObjectCopyWithScale (const FVec3 &Scale) const
 
virtual TUniquePtr< FImplicitObjectDeepCopy () const
 
virtual TUniquePtr< FImplicitObjectDeepCopyWithScale (const FVec3 &Scale) const
 
CHAOS_API bool IsUnderlyingUnion () const
 
CHAOS_API bool IsUnderlyingMesh () const
 
CHAOS_API FReal SignedDistance (const FVec3 &x) const
 
CHAOS_API FVec3 Normal (const FVec3 &x) const
 
virtual FReal PhiWithNormal (const FVec3 &x, FVec3 &Normal) const =0
 
virtual FReal PhiWithNormalScaled (const FVec3 &Pos, const FVec3 &Scale, FVec3 &Normal) const
 
bool HasBoundingBox () const
 
bool IsConvex () const
 
void SetConvex (const bool Convex=true)
 
void SetDoCollide (const bool Collide)
 
bool GetDoCollide () const
 
CHAOS_API void Track (TSerializablePtr< FImplicitObject > This, const FString &DebugInfo)
 
virtual bool IsPerformanceWarning () const
 
virtual FString PerformanceWarningAndSimplifaction ()
 
CHAOS_API Pair< FVec3, boolFindDeepestIntersection (const FImplicitObject *Other, const FBVHParticles *Particles, const FMatrix33 &OtherToLocalTransform, const FReal Thickness) const
 
CHAOS_API Pair< FVec3, boolFindDeepestIntersection (const FImplicitObject *Other, const FParticles *Particles, const FMatrix33 &OtherToLocalTransform, const FReal Thickness) const
 
CHAOS_API Pair< FVec3, boolFindClosestIntersection (const FVec3 &StartPoint, const FVec3 &EndPoint, const FReal Thickness) const
 
virtual bool Raycast (const FVec3 &StartPoint, const FVec3 &Dir, const FReal Length, const FReal Thickness, FReal &OutTime, FVec3 &OutPosition, FVec3 &OutNormal, int32 &OutFaceIndex) const
 
virtual int32 FindMostOpposingFace (const FVec3 &Position, const FVec3 &UnitDir, int32 HintFaceIndex, FReal SearchDist) const
 
virtual int32 FindMostOpposingFaceScaled (const FVec3 &Position, const FVec3 &UnitDir, int32 HintFaceIndex, FReal SearchDist, const FVec3 &Scale) const
 
virtual int32 FindClosestFaceAndVertices (const FVec3 &Position, TArray< FVec3 > &FaceVertices, FReal SearchDist=0.01f) const
 
virtual FVec3 FindGeometryOpposingNormal (const FVec3 &DenormDir, int32 FaceIndex, const FVec3 &OriginalNormal) const
 
virtual bool Overlap (const FVec3 &Point, const FReal Thickness) const
 
virtual void AccumulateAllImplicitObjects (TArray< Pair< const FImplicitObject *, FRigidTransform3 > > &Out, const FRigidTransform3 &ParentTM) const
 
virtual void AccumulateAllSerializableImplicitObjects (TArray< Pair< TSerializablePtr< FImplicitObject >, FRigidTransform3 > > &Out, const FRigidTransform3 &ParentTM, TSerializablePtr< FImplicitObject > This) const
 
virtual CHAOS_API void FindAllIntersectingObjects (TArray< Pair< const FImplicitObject *, FRigidTransform3 > > &Out, const FAABB3 &LocalBounds) const
 
CHAOS_API void SerializeImp (FArchive &Ar)
 
virtual uint16 GetMaterialIndex (uint32 HintIndex) const
 
int32 CountObjectsInHierarchy () const
 
int32 CountLeafObjectsInHierarchy () const
 
void VisitOverlappingLeafObjects (const FAABB3 &LocalBounds, const FImplicitHierarchyVisitor &Visitor) const
 
void VisitLeafObjects (const FImplicitHierarchyVisitor &Visitor) const
 
void VisitObjects (const FImplicitHierarchyVisitorBool &Visitor) const
 
bool IsOverlappingBounds (const FAABB3 &LocalBounds) const
 
virtual int32 CountObjectsInHierarchyImpl () const
 
virtual int32 CountLeafObjectsInHierarchyImpl () const
 
virtual void VisitOverlappingLeafObjectsImpl (const FAABB3 &LocalBounds, const FRigidTransform3 &ObjectTransform, const int32 RootObjectIndex, int32 &ObjectIndex, int32 &LeafObjectIndex, const FImplicitHierarchyVisitor &VisitorFunc) const
 
virtual void VisitLeafObjectsImpl (const FRigidTransform3 &ObjectTransform, const int32 RootObjectIndex, int32 &ObjectIndex, int32 &LeafObjectIndex, const FImplicitHierarchyVisitor &VisitorFunc) const
 
virtual bool VisitObjectsImpl (const FRigidTransform3 &ObjectTransform, const int32 RootObjectIndex, int32 &ObjectIndex, int32 &LeafObjectIndex, const FImplicitHierarchyVisitorBool &VisitorFunc) const
 
virtual bool IsOverlappingBoundsImpl (const FAABB3 &LocalBounds) const
 
- Public Member Functions inherited from Chaos::FChaosRefCountedObject
 FChaosRefCountedObject ()
 
virtual ~FChaosRefCountedObject ()
 
 FChaosRefCountedObject (const FChaosRefCountedObject &Rhs)=delete
 
FChaosRefCountedObjectoperator= (const FChaosRefCountedObject &Rhs)=delete
 
uint32 AddRef () const
 
uint32 Release () const
 
uint32 GetRefCount () const
 
void MakePersistent () const
 

Static Public Member Functions

static constexpr EImplicitObjectType StaticType ()
 
staticGetArea (const T InRadius)
 
staticGetVolume (const T InRadius)
 
static PMatrix< T, d, d > GetInertiaTensor (const T InMass, const T InRadius, const bool bInThinShell=false)
 
static CHAOS_API const FName GetTypeName (const EImplicitObjectType InType)
 
- Static Public Member Functions inherited from Chaos::FImplicitObject
static CHAOS_API FImplicitObjectSerializationFactory (FChaosArchive &Ar, FImplicitObject *Obj)
 
static int32 GetOffsetOfType ()
 
static int32 GetOffsetOfMargin ()
 
static constexpr EImplicitObjectType StaticType ()
 
static CHAOS_API FArchiveSerializeLegacyHelper (FArchive &Ar, TUniquePtr< FImplicitObject > &Value)
 
static CHAOS_API const FName GetTypeName (const EImplicitObjectType InType)
 

Additional Inherited Members

- Public Types inherited from Chaos::FImplicitObject
using TType = FReal
 
- Static Public Attributes inherited from Chaos::FImplicitObject
static constexpr int D = 3
 
- Protected Member Functions inherited from Chaos::FImplicitObject
void SetMargin (FReal InMargin)
 
void SetMargin (FRealSingle InMargin)
 
- Static Protected Member Functions inherited from Chaos::FImplicitObject
static FVec3 ScaleNormalizedHelper (const FVec3 &Normal, const FVec3 &Scale)
 
static FVec3 GetOuterScaledNormal (const FVec3 &InnerNormal, const FVec3 &Scale)
 
static FVec3 GetInnerUnscaledNormal (const FVec3 &OuterNormal, const FVec3 &Scale)
 
- Protected Attributes inherited from Chaos::FImplicitObject
FRealSingle Margin
 
bool bIsConvex
 
bool bDoCollide
 
bool bHasBoundingBox
 
bool bIsTracked
 
EImplicitObjectType Type
 
EImplicitObjectType CollisionType
 

Constructor & Destructor Documentation

◆ TSphere() [1/3]

template<class T , int d>
Chaos::TSphere< T, d >::TSphere ( const TVector< T, d > &  InCenter,
const T  InRadius 
)
inline

◆ TSphere() [2/3]

template<class T , int d>
Chaos::TSphere< T, d >::TSphere ( const TSphere< T, d > &  Other)
inline

◆ TSphere() [3/3]

template<class T , int d>
Chaos::TSphere< T, d >::TSphere ( TSphere< T, d > &&  Other)
inline

◆ ~TSphere()

template<class T , int d>
virtual Chaos::TSphere< T, d >::~TSphere ( )
inlinevirtual

Member Function Documentation

◆ BoundingBox()

template<class T , int d>
virtual const TAABB< T, d > Chaos::TSphere< T, d >::BoundingBox ( ) const
inlineoverridevirtual

Reimplemented from Chaos::FImplicitObject.

◆ CalculateTransformedBounds()

template<class T , int d>
virtual FAABB3 Chaos::TSphere< T, d >::CalculateTransformedBounds ( const FRigidTransform3 Transform) const
inlineoverridevirtual

Reimplemented from Chaos::FImplicitObject.

◆ ComputeLocalSamplePoints() [1/2]

template<class T , int d>
TArray< TVector< T, d > > Chaos::TSphere< T, d >::ComputeLocalSamplePoints ( const int  NumPoints) const
inline

Returns sample points centered about the origin.

◆ ComputeLocalSamplePoints() [2/2]

template<class T , int d>
TArray< TVector< T, d > > Chaos::TSphere< T, d >::ComputeLocalSamplePoints ( const T  PointsPerUnitArea,
const int32  MinPoints = 0,
const int32  MaxPoints = 1000 
) const
inline

◆ ComputeSamplePoints() [1/2]

template<class T , int d>
TArray< TVector< T, d > > Chaos::TSphere< T, d >::ComputeSamplePoints ( const int  NumPoints) const
inline

Returns sample points at the current location of the sphere.

◆ ComputeSamplePoints() [2/2]

template<class T , int d>
TArray< TVector< T, d > > Chaos::TSphere< T, d >::ComputeSamplePoints ( const T  PointsPerUnitArea,
const int32  MinPoints = 0,
const int32  MaxPoints = 1000 
) const
inline

◆ CopyGeometry()

template<class T , int d>
virtual Chaos::FImplicitObjectPtr Chaos::TSphere< T, d >::CopyGeometry ( ) const
inlineoverridevirtual

Reimplemented from Chaos::FImplicitObject.

◆ CopyGeometryWithScale()

template<class T , int d>
virtual Chaos::FImplicitObjectPtr Chaos::TSphere< T, d >::CopyGeometryWithScale ( const FVec3 Scale) const
inlineoverridevirtual

Reimplemented from Chaos::FImplicitObject.

◆ FindClosestIntersectionImp()

template<class T , int d>
virtual Pair< TVector< T, d >, bool > Chaos::TSphere< T, d >::FindClosestIntersectionImp ( const TVector< T, d > &  StartPoint,
const TVector< T, d > &  EndPoint,
const T  Thickness 
) const
inlineoverridevirtual

◆ FindClosestPoint()

template<class T , int d>
TVector< T, d > Chaos::TSphere< T, d >::FindClosestPoint ( const TVector< T, d > &  StartPoint,
const T  Thickness = (T)0 
) const
inline

◆ GetArea() [1/2]

template<class T , int d>
T Chaos::TSphere< T, d >::GetArea ( ) const
inline

◆ GetArea() [2/2]

template<class T , int d>
static T Chaos::TSphere< T, d >::GetArea ( const T  InRadius)
inlinestatic

◆ GetCenter()

template<class T , int d>
const TVector< T, d > Chaos::TSphere< T, d >::GetCenter ( ) const
inline

◆ GetCenterf()

template<class T , int d>
const FVec3f & Chaos::TSphere< T, d >::GetCenterf ( ) const
inline

◆ GetCenterOfMass()

template<class T , int d>
const TVector< T, d > Chaos::TSphere< T, d >::GetCenterOfMass ( ) const
inline

◆ GetCenterOfMassf()

template<class T , int d>
const FVec3f & Chaos::TSphere< T, d >::GetCenterOfMassf ( ) const
inline

◆ GetInertiaTensor() [1/2]

template<class T , int d>
PMatrix< T, d, d > Chaos::TSphere< T, d >::GetInertiaTensor ( const T  InMass,
const bool  bInThinShell = false 
) const
inline

◆ GetInertiaTensor() [2/2]

template<class T , int d>
static PMatrix< T, d, d > Chaos::TSphere< T, d >::GetInertiaTensor ( const T  InMass,
const T  InRadius,
const bool  bInThinShell = false 
)
inlinestatic

◆ GetRadius()

template<class T , int d>
virtual FReal Chaos::TSphere< T, d >::GetRadius ( ) const
inlineoverridevirtual

Reimplemented from Chaos::FImplicitObject.

◆ GetRadiusf()

template<class T , int d>
virtual FRealSingle Chaos::TSphere< T, d >::GetRadiusf ( ) const
inlineoverridevirtual

Reimplemented from Chaos::FImplicitObject.

◆ GetRotationOfMass()

template<class T , int d>
TRotation< T, d > Chaos::TSphere< T, d >::GetRotationOfMass ( ) const
inline

◆ GetTypeHash()

template<class T , int d>
virtual uint32 Chaos::TSphere< T, d >::GetTypeHash ( ) const
inlineoverridevirtual

◆ GetTypeName() [1/2]

template<class T , int d>
virtual FName Chaos::FImplicitObject::GetTypeName ( ) const
inlinevirtual

Reimplemented from Chaos::FImplicitObject.

◆ GetTypeName() [2/2]

template<class T , int d>
const FName Chaos::FImplicitObject::GetTypeName ( const EImplicitObjectType  InType)
static

◆ GetVolume() [1/2]

template<class T , int d>
T Chaos::TSphere< T, d >::GetVolume ( ) const
inline

◆ GetVolume() [2/2]

template<class T , int d>
static T Chaos::TSphere< T, d >::GetVolume ( const T  InRadius)
inlinestatic

◆ Intersects()

template<class T , int d>
bool Chaos::TSphere< T, d >::Intersects ( const TSphere< T, d > &  Other) const
inline

◆ operator=()

template<class T , int d>
TSphere & Chaos::TSphere< T, d >::operator= ( TSphere< T, d > &&  InSteal)
inline

◆ PhiWithNormal()

template<class T , int d>
virtual T Chaos::TSphere< T, d >::PhiWithNormal ( const TVector< T, d > &  InSamplePoint,
TVector< T, d > &  OutNormal 
) const
inlineoverridevirtual

◆ Raycast()

template<class T , int d>
virtual bool Chaos::TSphere< T, d >::Raycast ( const TVector< T, d > &  StartPoint,
const TVector< T, d > &  Dir,
const T  Length,
const T  Thickness,
T &  OutTime,
TVector< T, d > &  OutPosition,
TVector< T, d > &  OutNormal,
int32 OutFaceIndex 
) const
inlineoverridevirtual

◆ Serialize() [1/2]

template<class T , int d>
virtual void Chaos::TSphere< T, d >::Serialize ( FArchive Ar)
inlineoverridevirtual

Reimplemented from Chaos::FImplicitObject.

◆ Serialize() [2/2]

template<class T , int d>
virtual void Chaos::TSphere< T, d >::Serialize ( FChaosArchive Ar)
inlineoverridevirtual

Reimplemented from Chaos::FImplicitObject.

◆ SerializeImp()

template<class T , int d>
FORCEINLINE void Chaos::TSphere< T, d >::SerializeImp ( FArchive Ar)
inline

◆ StaticType()

template<class T , int d>
static constexpr EImplicitObjectType Chaos::TSphere< T, d >::StaticType ( )
inlinestaticconstexpr

◆ Support()

template<class T , int d>
TVector< T, d > Chaos::TSphere< T, d >::Support ( const TVector< T, d > &  Direction,
const T  Thickness,
int32 VertexIndex 
) const
inline

◆ SupportCore()

template<class T , int d>
FORCEINLINE const TVector< T, d > Chaos::TSphere< T, d >::SupportCore ( const TVector< T, d > &  Direction,
const FReal  InMargin,
FReal OutSupportDelta,
int32 VertexIndex 
) const
inline

◆ SupportCoreScaled()

template<class T , int d>
FORCEINLINE TVector< T, d > Chaos::TSphere< T, d >::SupportCoreScaled ( const TVector< T, d > &  Direction,
const FReal  InMargin,
const TVector< T, d > &  Scale,
FReal OutSupportDelta,
int32 VertexIndex 
) const
inline

◆ SupportCoreSimd()

template<class T , int d>
FORCEINLINE VectorRegister4Float Chaos::TSphere< T, d >::SupportCoreSimd ( const VectorRegister4Float Direction,
const FReal  InMargin 
) const
inline

◆ ToString()

template<class T , int d>
virtual FString Chaos::TSphere< T, d >::ToString ( ) const
inlineoverridevirtual

Reimplemented from Chaos::FImplicitObject.


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