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

#include <PBDFlatWeightMap.h>

Public Member Functions

 FPBDFlatWeightMap (const FSolverVec2 &InWeightedValue, const TConstArrayView< FRealSingle > &Multipliers=TConstArrayView< FRealSingle >(), int32 ParticleCount=0, const FSolverVec2 &MultiplierClampRange=FSolverVec2(0., 1.))
 
 FPBDFlatWeightMap (const FSolverVec2 &InWeightedValue, TArray< FRealSingle > &&Multipliers)
 
template<int32 Valence>
 FPBDFlatWeightMap (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, typename TEnableIf< Valence >=2 &&Valence<=4 >::Type *=nullptr)
 
 ~FPBDFlatWeightMap ()=default
 
 FPBDFlatWeightMap (const FPBDFlatWeightMap &)=default
 
 FPBDFlatWeightMap (FPBDFlatWeightMap &&)=default
 
FPBDFlatWeightMapoperator= (const FPBDFlatWeightMap &)=default
 
FPBDFlatWeightMapoperator= (FPBDFlatWeightMap &&)=default
 
int32 Num () const
 
bool HasWeightMap () const
 
void SetWeightedValue (const FSolverVec2 &InWeightedValue)
 
const FSolverVec2GetOffsetRange () const
 
FSolverReal operator[] (int32 Index) const
 
FSolverReal GetLow () const
 
FSolverReal GetHigh () const
 
 operator FSolverReal () const
 
TConstArrayView< FSolverRealGetMapValues () const
 
FSolverReal GetValue (int32 Index) const
 
void ReorderIndicesAndShrink (const TArray< int32 > &OrigToReorderedIndices, int32 NewNum)
 
void ReorderIndices (const TArray< int32 > &OrigToReorderedIndices)
 

Detailed Description

Simple weight map just converting from per particle to per constraint values. Also holds low/high values, but these are multiplied against the map each time the operator[] is called.

Constructor & Destructor Documentation

◆ FPBDFlatWeightMap() [1/5]

Chaos::Softs::FPBDFlatWeightMap::FPBDFlatWeightMap ( const FSolverVec2 InWeightedValue,
const TConstArrayView< FRealSingle > &  Multipliers = TConstArrayView<FRealSingle>(),
int32  ParticleCount = 0,
const FSolverVec2 MultiplierClampRange = FSolverVec2(0., 1.) 
)
inlineexplicit

Weightmap particle constructor.

◆ FPBDFlatWeightMap() [2/5]

Chaos::Softs::FPBDFlatWeightMap::FPBDFlatWeightMap ( const FSolverVec2 InWeightedValue,
TArray< FRealSingle > &&  Multipliers 
)
inline

◆ FPBDFlatWeightMap() [3/5]

template<int32 Valence>
Chaos::Softs::FPBDFlatWeightMap::FPBDFlatWeightMap ( 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,
typename TEnableIf< Valence = 2 && Valence <= 4,
::Type *  = nullptr 
)
inlineexplicit

Weightmap constraint constructor.

◆ ~FPBDFlatWeightMap()

Chaos::Softs::FPBDFlatWeightMap::~FPBDFlatWeightMap ( )
default

◆ FPBDFlatWeightMap() [4/5]

Chaos::Softs::FPBDFlatWeightMap::FPBDFlatWeightMap ( const FPBDFlatWeightMap )
default

◆ FPBDFlatWeightMap() [5/5]

Chaos::Softs::FPBDFlatWeightMap::FPBDFlatWeightMap ( FPBDFlatWeightMap &&  )
default

Member Function Documentation

◆ GetHigh()

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

Return the value at the High weight.

◆ GetLow()

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

Return the value at the Low weight.

◆ GetMapValues()

TConstArrayView< FSolverReal > Chaos::Softs::FPBDFlatWeightMap::GetMapValues ( ) const
inline

Return the table of stiffnesses as a read only array.

◆ GetOffsetRange()

const FSolverVec2 & Chaos::Softs::FPBDFlatWeightMap::GetOffsetRange ( ) const
inline

Return the values set for this map as an Offset and Range (Low = OffsetRange[0], High = OffsetRange[0] + OffsetRange[1])

◆ GetValue()

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

◆ HasWeightMap()

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

Return whether this object contains weight map values.

◆ Num()

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

Return the number of values stored in the weight map.

◆ operator FSolverReal()

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

Return the value when the weight map is not used.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ operator[]()

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

Lookup for the 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::FPBDFlatWeightMap::ReorderIndices ( const TArray< int32 > &  OrigToReorderedIndices)
inline

◆ ReorderIndicesAndShrink()

void Chaos::Softs::FPBDFlatWeightMap::ReorderIndicesAndShrink ( const TArray< int32 > &  OrigToReorderedIndices,
int32  NewNum 
)
inline

Reorder Indices based on Constraint reordering.

◆ SetWeightedValue()

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

Set the low and high values of the weight map.


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