UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Chaos::FParticleCollisions Class Reference

Knows about all the collisions detectors associated with a particular particle. Used when particles are destroyed to remove perisstent collisions from the system, or when Islands are woken to restore the collisions. More...

#include <ParticleCollisions.h>

Public Types

using FContainerType = TArray< TPair< uint64, FParticlePairMidPhase * > >
 

Public Member Functions

CHAOS_API FParticleCollisions ()
 
CHAOS_API ~FParticleCollisions ()
 
int32 Num () const
 
void Reset ()
 Clear the list of midphases. Only for use in shutdown.
 
CHAOS_API void AddMidPhase (FGeometryParticleHandle *InParticle, FParticlePairMidPhase *InMidPhase)
 Add a mid phase to the list We are passing the particle and midphase here rather than just the key because we store a cookie on the midphase that we want to retrieve, and it has one cookie per particle. This could probably be cleaned up a bit...
 
CHAOS_API void RemoveMidPhase (FGeometryParticleHandle *InParticle, FParticlePairMidPhase *InMidPhase)
 Remove a mid phase.
 
FParticlePairMidPhaseGetMidPhase (const int32 InIndex)
 Get a midphase by its index.
 
FParticlePairMidPhaseFindMidPhase (const uint64 InKey)
 Find the mid phase with the matching key.
 
template<typename TLambda >
ECollisionVisitorResult VisitMidPhases (const TLambda &Lambda)
 Visit all of the midphases on the particle and call the specified function.
 
template<typename TLambda >
ECollisionVisitorResult VisitConstMidPhases (const TLambda &Lambda) const
 Visit all of the midphases on the particle and call the specified function.
 
template<typename TLambda >
ECollisionVisitorResult VisitCollisions (const TLambda &Visitor, const ECollisionVisitorFlags VisitFlags=ECollisionVisitorFlags::VisitDefault)
 Visit all the collisions on this particle.
 
template<typename TLambda >
ECollisionVisitorResult VisitConstCollisions (const TLambda &Visitor, const ECollisionVisitorFlags VisitFlags=ECollisionVisitorFlags::VisitDefault) const
 Visit all the collisions on this particle.
 

Detailed Description

Knows about all the collisions detectors associated with a particular particle. Used when particles are destroyed to remove perisstent collisions from the system, or when Islands are woken to restore the collisions.

Member Typedef Documentation

◆ FContainerType

Constructor & Destructor Documentation

◆ FParticleCollisions()

Chaos::FParticleCollisions::FParticleCollisions ( )

◆ ~FParticleCollisions()

Chaos::FParticleCollisions::~FParticleCollisions ( )

Member Function Documentation

◆ AddMidPhase()

void Chaos::FParticleCollisions::AddMidPhase ( FGeometryParticleHandle InParticle,
FParticlePairMidPhase InMidPhase 
)

Add a mid phase to the list We are passing the particle and midphase here rather than just the key because we store a cookie on the midphase that we want to retrieve, and it has one cookie per particle. This could probably be cleaned up a bit...

◆ FindMidPhase()

FParticlePairMidPhase * Chaos::FParticleCollisions::FindMidPhase ( const uint64  InKey)
inline

Find the mid phase with the matching key.

Parameters
InKeyThe internal key from a FCollisionParticlePairKey

◆ GetMidPhase()

FParticlePairMidPhase * Chaos::FParticleCollisions::GetMidPhase ( const int32  InIndex)
inline

Get a midphase by its index.

◆ Num()

int32 Chaos::FParticleCollisions::Num ( ) const
inline

◆ RemoveMidPhase()

void Chaos::FParticleCollisions::RemoveMidPhase ( FGeometryParticleHandle InParticle,
FParticlePairMidPhase InMidPhase 
)

Remove a mid phase.

◆ Reset()

void Chaos::FParticleCollisions::Reset ( )
inline

Clear the list of midphases. Only for use in shutdown.

◆ VisitCollisions()

template<typename TLambda >
ECollisionVisitorResult Chaos::FParticleCollisions::VisitCollisions ( const TLambda Visitor,
const ECollisionVisitorFlags  VisitFlags = ECollisionVisitorFlags::VisitDefault 
)
inline

Visit all the collisions on this particle.

Template Parameters
TLambdavisitor type with signature void(FPBDCollisionConstraint&)
Note
do not delete constraint from the lambda. You may disable them though.

◆ VisitConstCollisions()

template<typename TLambda >
ECollisionVisitorResult Chaos::FParticleCollisions::VisitConstCollisions ( const TLambda Visitor,
const ECollisionVisitorFlags  VisitFlags = ECollisionVisitorFlags::VisitDefault 
) const
inline

Visit all the collisions on this particle.

Template Parameters
TLambdavisitor type with signature void(const FPBDCollisionConstraint&)
Note
do not delete constraint from the lambda. You may disable them though.

◆ VisitConstMidPhases()

template<typename TLambda >
ECollisionVisitorResult Chaos::FParticleCollisions::VisitConstMidPhases ( const TLambda Lambda) const
inline

Visit all of the midphases on the particle and call the specified function.

Template Parameters
TLambdavisitor type with signature void(const FParticlePairMidPhase&)
Note
Do not call RemoveMidPhase from the visitor

◆ VisitMidPhases()

template<typename TLambda >
ECollisionVisitorResult Chaos::FParticleCollisions::VisitMidPhases ( const TLambda Lambda)
inline

Visit all of the midphases on the particle and call the specified function.

Template Parameters
TLambdavisitor type with signature ECollisionVisitorResult(FParticlePairMidPhase&)
Note
Do not call RemoveMidPhase from the visitor

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