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

#include <SolverBodyContainer.h>

Public Types

using FSolverBodyArray = Private::TChaosChunkedArray< FSolverBody, BodyArrayChunkSize >
 

Public Member Functions

 FSolverBodyContainer ()
 
void Reset (int MaxBodies)
 
int Num () const
 
int Max () const
 
FGeometryParticleHandleGetParticle (const int32 Index) const
 
const FSolverBodyGetSolverBody (const int32 Index) const
 
FSolverBodyGetSolverBody (const int32 Index)
 
FSolverBodyFindOrAdd (FGenericParticleHandle InParticle)
 
void GatherInput (const FReal Dt, const int32 BeginIndex, const int32 EndIndex)
 
void ScatterOutput (const int32 BeginIndex, const int32 EndIndex)
 
void SetImplicitVelocities (FReal Dt)
 
void ApplyCorrections ()
 
void UpdateRotationDependentState ()
 
void Lock ()
 
void CopyTo (FSolverBodyContainer &Dest)
 

Detailed Description

The SolverBodies for a set of particles.

Each IslandGroup owns a SolverBodyContainer containing the data required for solving the constraints in the group's islands. Constraints will hold pointers to SolverBodies in the Island's SolverBodyContainer. ConstraintSolvers read and write to their SolverBodies and do not access particles directly.

SolverBodies are created at the start of the constraint solving phase, and destroyed at the end. They are stored in a semi-contiguous (chunked) array in roughly the order that they are accessed for cache efficiency. Pointers to SolverBodies are persistent for the duration of the tick, but no longer.

Note
This container holds all the state of bodies in an island. Dynamics will only appear in one island, but kinematics are in multiple and so their state will be duplicated in each island. This is ok - we do not write to the state of any kinematic bodies in the constraint solvers. We also assume that the number of kinematics is small compared to the number of dynamics. If this is commonly untrue we may want to consider having a separate (global) container of kinematic solver bodies.

Member Typedef Documentation

◆ FSolverBodyArray

Constructor & Destructor Documentation

◆ FSolverBodyContainer()

Chaos::FSolverBodyContainer::FSolverBodyContainer ( )
inline

Member Function Documentation

◆ ApplyCorrections()

void Chaos::FSolverBodyContainer::ApplyCorrections ( )

◆ CopyTo()

void Chaos::FSolverBodyContainer::CopyTo ( FSolverBodyContainer Dest)
inline

◆ FindOrAdd()

FSolverBody * Chaos::FSolverBodyContainer::FindOrAdd ( FGenericParticleHandle  InParticle)

◆ GatherInput()

void Chaos::FSolverBodyContainer::GatherInput ( const FReal  Dt,
const int32  BeginIndex,
const int32  EndIndex 
)

◆ GetParticle()

FGeometryParticleHandle * Chaos::FSolverBodyContainer::GetParticle ( const int32  Index) const
inline

◆ GetSolverBody() [1/2]

FSolverBody & Chaos::FSolverBodyContainer::GetSolverBody ( const int32  Index)
inline

◆ GetSolverBody() [2/2]

const FSolverBody & Chaos::FSolverBodyContainer::GetSolverBody ( const int32  Index) const
inline

◆ Lock()

void Chaos::FSolverBodyContainer::Lock ( )
inline

◆ Max()

int Chaos::FSolverBodyContainer::Max ( ) const
inline

◆ Num()

int Chaos::FSolverBodyContainer::Num ( ) const
inline

◆ Reset()

void Chaos::FSolverBodyContainer::Reset ( int  MaxBodies)
inline

◆ ScatterOutput()

void Chaos::FSolverBodyContainer::ScatterOutput ( const int32  BeginIndex,
const int32  EndIndex 
)

◆ SetImplicitVelocities()

void Chaos::FSolverBodyContainer::SetImplicitVelocities ( FReal  Dt)

◆ UpdateRotationDependentState()

void Chaos::FSolverBodyContainer::UpdateRotationDependentState ( )

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