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

#include <PBDWeightMap.h>

+ Inheritance diagram for Chaos::Softs::FPBDWeightMap:

Public Member Functions

 FPBDWeightMap (const FSolverVec2 &InWeightedValue, const TConstArrayView< FRealSingle > &Multipliers=TConstArrayView< FRealSingle >(), int32 ParticleCount=0, int32 TableSize=16)
 
template<int32 Valence>
 FPBDWeightMap (const FSolverVec2 &InWeightedValue, const TConstArrayView< FRealSingle > &Multipliers=TConstArrayView< FRealSingle >(), const TConstArrayView< TVector< int32, Valence > > &Constraints=TConstArrayView< TVector< int32, Valence > >(), int32 ParticleOffset=INDEX_NONE, int32 ParticleCount=0, int32 TableSize=16, typename TEnableIf< Valence >=2 &&Valence<=4 >::Type *=nullptr)
 
virtual ~FPBDWeightMap ()=default
 
 FPBDWeightMap (const FPBDWeightMap &)=default
 
 FPBDWeightMap (FPBDWeightMap &&)=default
 
FPBDWeightMapoperator= (const FPBDWeightMap &)=default
 
FPBDWeightMapoperator= (FPBDWeightMap &&)=default
 
int32 Num () const
 
bool HasWeightMap () const
 
void SetWeightedValue (const FSolverVec2 &InWeightedValue)
 
const FSolverVec2GetWeightedValue () const
 
void ApplyValues (bool *bOutUpdated=nullptr)
 
FSolverReal operator[] (int32 Index) const
 
FSolverReal GetLow () const
 
FSolverReal GetHigh () const
 
 operator FSolverReal () const
 
FSolverReal GetValue (int32 Index) const
 
TConstArrayView< uint8GetIndices () const
 
TConstArrayView< FSolverRealGetTable () const
 
void ReorderIndices (const TArray< int32 > &OrigToReorderedIndices)
 

Protected Member Functions

template<typename FunctorType >
void ApplyValues (FunctorType &&MappingFunction, bool *bOutUpdated=nullptr)
 

Protected Attributes

TArray< uint8Indices
 
TArray< FSolverRealTable
 
FSolverVec2 WeightedValue
 
bool bIsDirty = true
 

Detailed Description

Weight map class for managing real time update to the weight map and low/high value ranges

Constructor & Destructor Documentation

◆ FPBDWeightMap() [1/4]

Chaos::Softs::FPBDWeightMap::FPBDWeightMap ( const FSolverVec2 InWeightedValue,
const TConstArrayView< FRealSingle > &  Multipliers = TConstArrayView<FRealSingle>(),
int32  ParticleCount = 0,
int32  TableSize = 16 
)
inline

Weightmap particle constructor.

◆ FPBDWeightMap() [2/4]

template<int32 Valence>
Chaos::Softs::FPBDWeightMap::FPBDWeightMap ( const FSolverVec2 InWeightedValue,
const TConstArrayView< FRealSingle > &  Multipliers = TConstArrayView<FRealSingle>(),
const TConstArrayView< TVector< int32, Valence > > &  Constraints = TConstArrayView<TVector<int32Valence>>(),
int32  ParticleOffset = INDEX_NONE,
int32  ParticleCount = 0,
int32  TableSize = 16,
typename TEnableIf< Valence = 2 && Valence <= 4,
::Type *  = nullptr 
)
inline

Weightmap constraint constructor.

◆ ~FPBDWeightMap()

virtual Chaos::Softs::FPBDWeightMap::~FPBDWeightMap ( )
virtualdefault

◆ FPBDWeightMap() [3/4]

Chaos::Softs::FPBDWeightMap::FPBDWeightMap ( const FPBDWeightMap )
default

◆ FPBDWeightMap() [4/4]

Chaos::Softs::FPBDWeightMap::FPBDWeightMap ( FPBDWeightMap &&  )
default

Member Function Documentation

◆ ApplyValues() [1/2]

void Chaos::Softs::FPBDWeightMap::ApplyValues ( bool bOutUpdated = nullptr)
inline

Update the weight map table with the current simulation parameters.

◆ ApplyValues() [2/2]

template<typename FunctorType >
void Chaos::Softs::FPBDWeightMap::ApplyValues ( FunctorType &&  MappingFunction,
bool bOutUpdated = nullptr 
)
inlineprotected

◆ GetHigh()

FSolverReal Chaos::Softs::FPBDWeightMap::GetHigh ( ) const
inline

Return the exponential value at the High weight.

◆ GetIndices()

TConstArrayView< uint8 > Chaos::Softs::FPBDWeightMap::GetIndices ( ) const
inline

Return the particles/constraints indices to the stiffness table as a read only array.

◆ GetLow()

FSolverReal Chaos::Softs::FPBDWeightMap::GetLow ( ) const
inline

Return the exponential value at the Low weight.

◆ GetTable()

TConstArrayView< FSolverReal > Chaos::Softs::FPBDWeightMap::GetTable ( ) const
inline

Return the table of stiffnesses as a read only array.

◆ GetValue()

FSolverReal Chaos::Softs::FPBDWeightMap::GetValue ( int32  Index) const
inline

◆ GetWeightedValue()

const FSolverVec2 & Chaos::Softs::FPBDWeightMap::GetWeightedValue ( ) const
inline

Return the low and high values set for this weight map. Both values will always be between 0 and 1 due to having been clamped in SetWeightedValue.

◆ HasWeightMap()

bool Chaos::Softs::FPBDWeightMap::HasWeightMap ( ) const
inline

Return whether this object contains weight map values.

◆ Num()

int32 Chaos::Softs::FPBDWeightMap::Num ( ) const
inline

Return the number of values stored in the weight map.

◆ operator FSolverReal()

Chaos::Softs::FPBDWeightMap::operator FSolverReal ( ) const
inlineexplicit

Return the exponential stiffness value when the weight map is not used.

◆ operator=() [1/2]

FPBDWeightMap & Chaos::Softs::FPBDWeightMap::operator= ( const FPBDWeightMap )
default

◆ operator=() [2/2]

FPBDWeightMap & Chaos::Softs::FPBDWeightMap::operator= ( FPBDWeightMap &&  )
default

◆ operator[]()

FSolverReal Chaos::Softs::FPBDWeightMap::operator[] ( int32  Index) const
inline

Lookup for the exponential weighted value at the specified weight map index. This function will assert if it is called with a non zero index on an empty weight map.

◆ ReorderIndices()

void Chaos::Softs::FPBDWeightMap::ReorderIndices ( const TArray< int32 > &  OrigToReorderedIndices)
inline

Reorder Indices based on Constraint reordering.

◆ SetWeightedValue()

void Chaos::Softs::FPBDWeightMap::SetWeightedValue ( const FSolverVec2 InWeightedValue)
inline

Set the low and high values of the weight map. The weight map table only gets updated after ApplyValues is called. Low and high values are clamped between [0,1]

Member Data Documentation

◆ bIsDirty

bool Chaos::Softs::FPBDWeightMap::bIsDirty = true
protected

◆ Indices

TArray<uint8> Chaos::Softs::FPBDWeightMap::Indices
protected

◆ Table

TArray<FSolverReal> Chaos::Softs::FPBDWeightMap::Table
protected

◆ WeightedValue

FSolverVec2 Chaos::Softs::FPBDWeightMap::WeightedValue
protected

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