UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::AnimationCore::FBoneWeights Class Reference

A simple container for per-vertex influence of bones and their weights. More...

#include <BoneWeights.h>

Public Types

using RangedForConstIteratorType = BoneWeightArrayT::RangedForConstIteratorType
 

Public Member Functions

 FBoneWeights ()=default
 
bool operator== (const FBoneWeights &InBoneWeight) const
 
bool operator!= (const FBoneWeights &InBoneWeight) const
 
bool SetBoneWeight (FBoneWeight InBoneWeight, const FBoneWeightsSettings &InSettings={})
 
bool SetBoneWeight (FBoneIndexType InBone, float InWeight, const FBoneWeightsSettings &InSettings={})
 
bool RemoveBoneWeight (FBoneIndexType InBone, const FBoneWeightsSettings &InSettings={})
 
void Renormalize (const FBoneWeightsSettings &InSettings={})
 
RangedForConstIteratorType begin () const
 
RangedForConstIteratorType end () const
 
int32 Num () const
 
const FBoneWeightoperator[] (int32 Index) const
 
TArrayView< const FBoneWeightToArrayView () const
 
int32 FindWeightIndexByBone (FBoneIndexType InBoneIndex) const
 
void Serialize (FArchive &InArchive)
 
int32 GetTypeHash () const
 
FString ToString () const
 

Static Public Member Functions

static FBoneWeights Create (const FBoneIndexType InBones[MaxInlineBoneWeightCount], const uint16 InWeights[MaxInlineBoneWeightCount], const FBoneWeightsSettings &InSettings={})
 
static FBoneWeights Create (const FBoneIndexType *InBones, const float *InWeights, int32 NumEntries, const FBoneWeightsSettings &InSettings={})
 
static FBoneWeights Create (TArrayView< const FBoneWeight > BoneWeights, const FBoneWeightsSettings &InSettings={})
 
template<typename OtherContainerAdapter >
static FBoneWeights Create (TBoneWeights< OtherContainerAdapter > InBoneWeights, const FBoneWeightsSettings &InSettings={})
 
static FBoneWeights Blend (const FBoneWeights &InA, const FBoneWeights &InB, float InBias, const FBoneWeightsSettings &InSettings={})
 
static FBoneWeights Blend (const FBoneWeights &InA, const FBoneWeights &InB, const FBoneWeights &InC, float InBaryX, float InBaryY, float InBaryZ, const FBoneWeightsSettings &InSettings={})
 

Friends

uint32 GetTypeHash (const FBoneWeights &InBoneWeights)
 

Detailed Description

A simple container for per-vertex influence of bones and their weights.

Member Typedef Documentation

◆ RangedForConstIteratorType

Constructor & Destructor Documentation

◆ FBoneWeights()

UE::AnimationCore::FBoneWeights::FBoneWeights ( )
default

Member Function Documentation

◆ begin()

RangedForConstIteratorType UE::AnimationCore::FBoneWeights::begin ( ) const
inline

◆ Blend() [1/2]

FBoneWeights UE::AnimationCore::FBoneWeights::Blend ( const FBoneWeights InA,
const FBoneWeights InB,
const FBoneWeights InC,
float  InBaryX,
float  InBaryY,
float  InBaryZ,
const FBoneWeightsSettings InSettings = {} 
)
inlinestatic

Blend three bone weights via barycentric coordinates using the given settings. Considers the influence from all of the bones. Coordinates should sum to one.

◆ Blend() [2/2]

FBoneWeights UE::AnimationCore::FBoneWeights::Blend ( const FBoneWeights InA,
const FBoneWeights InB,
float  InBias,
const FBoneWeightsSettings InSettings = {} 
)
inlinestatic

Blend two bone weights together, making sure to add in every influence from both, using the given settings. The bias value should lie on the [0,1] interval. Values outside that range may give unwanted results.

◆ Create() [1/4]

FBoneWeights UE::AnimationCore::FBoneWeights::Create ( const FBoneIndexType InBones,
const float InWeights,
int32  NumEntries,
const FBoneWeightsSettings InSettings = {} 
)
inlinestatic

A helper to create a FBoneWeights container from separated bone index and weight arrays. The size of the two arrays must be the same – otherwise the behavior is undefined.

◆ Create() [2/4]

FBoneWeights UE::AnimationCore::FBoneWeights::Create ( const FBoneIndexType  InBones[MaxInlineBoneWeightCount],
const uint16  InWeights[MaxInlineBoneWeightCount],
const FBoneWeightsSettings InSettings = {} 
)
inlinestatic

A helper to create a FBoneWeights container from FSoftSkinVertex data structure.

◆ Create() [3/4]

FBoneWeights UE::AnimationCore::FBoneWeights::Create ( TArrayView< const FBoneWeight BoneWeights,
const FBoneWeightsSettings InSettings = {} 
)
inlinestatic

A helper to create FBoneWeights container from a TArray of FBoneWeight objects.

◆ Create() [4/4]

static FBoneWeights UE::AnimationCore::FBoneWeights::Create ( TBoneWeights< OtherContainerAdapter InBoneWeights,
const FBoneWeightsSettings InSettings = {} 
)
inlinestatic

A helper to create FBoneWeights container from a TBoneWeights derivative object

◆ end()

RangedForConstIteratorType UE::AnimationCore::FBoneWeights::end ( ) const
inline

◆ FindWeightIndexByBone()

int32 UE::AnimationCore::FBoneWeights::FindWeightIndexByBone ( FBoneIndexType  InBoneIndex) const
inline

Find the bone weight corresponding to the given bone index. If a bone weight with this bone index does not exist it, a value of INDEX_NONE is returned.

◆ GetTypeHash()

int32 UE::AnimationCore::FBoneWeights::GetTypeHash ( ) const
inline

◆ Num()

int32 UE::AnimationCore::FBoneWeights::Num ( ) const
inline

Return the number of bone weights in this container.

Returns
The number of bone weights.

◆ operator!=()

bool UE::AnimationCore::FBoneWeights::operator!= ( const FBoneWeights InBoneWeight) const
inline

Returns true if this container's values are equal to the other container's values.

Note
Only equality comparison are supported. Relational comparisons are meaningless.

◆ operator==()

bool UE::AnimationCore::FBoneWeights::operator== ( const FBoneWeights InBoneWeight) const
inline

Returns true if all of this container's values and count are equal to the other container's values and count.

Note
Only equality comparison are supported. Relational comparisons are meaningless.

◆ operator[]()

const FBoneWeight & UE::AnimationCore::FBoneWeights::operator[] ( int32  Index) const
inline

Return the weight at index Index. Using an index value less than zero – or equal to or greater than the result of Num() – is an undefined operation.

Parameters
IndexThe index of the desired bone weight value.
Returns
The bone weight value for that index, or undefined if outside the valid range.

◆ RemoveBoneWeight()

bool UE::AnimationCore::FBoneWeights::RemoveBoneWeight ( FBoneIndexType  InBone,
const FBoneWeightsSettings InSettings = {} 
)
inline

Removes a specific bone from the list of weights, re-normalizing and pruning bones, if needed.

◆ Renormalize()

void UE::AnimationCore::FBoneWeights::Renormalize ( const FBoneWeightsSettings InSettings = {})
inline

Force normalization of weights. This is useful if a set of operations were performed with no normalization, for efficiency, and normalization is needed post-operation.

◆ Serialize()

void UE::AnimationCore::FBoneWeights::Serialize ( FArchive InArchive)
inline

◆ SetBoneWeight() [1/2]

bool UE::AnimationCore::FBoneWeights::SetBoneWeight ( FBoneIndexType  InBone,
float  InWeight,
const FBoneWeightsSettings InSettings = {} 
)
inline

◆ SetBoneWeight() [2/2]

bool UE::AnimationCore::FBoneWeights::SetBoneWeight ( FBoneWeight  InBoneWeight,
const FBoneWeightsSettings InSettings = {} 
)
inline

Set a new bone weight. If an existing weight exists with the same bone index, it's weight value is replaced with the weight value of the given entry. Otherwise a new index is added. In both cases the new entry is subject to the given settings, which may influence what the entry's final weight value is and whether it gets thrown away for not passing the threshold value. If the weight was successfully incorporated, then this function returns true. Otherwise it returns false.

◆ ToArrayView()

TArrayView< const FBoneWeight > UE::AnimationCore::FBoneWeights::ToArrayView ( ) const
inline

Returns the FBoneWeight list as an array view

◆ ToString()

FString UE::AnimationCore::FBoneWeights::ToString ( ) const
inline

Friends And Related Symbol Documentation

◆ GetTypeHash

uint32 GetTypeHash ( const FBoneWeights InBoneWeights)
friend

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