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

#include <BoneWeights.h>

Public Member Functions

bool operator== (const FBoneWeight &InBoneWeight) const
 
bool operator!= (const FBoneWeight &InBoneWeight) const
 
 FBoneWeight ()=default
 
 FBoneWeight (FBoneIndexType InBoneIndex, uint8 InWeight)
 
 FBoneWeight (FBoneIndexType InBoneIndex, uint16 InRawWeight)
 
 FBoneWeight (FBoneIndexType InBoneIndex, float InWeight)
 
void SetBoneIndex (FBoneIndexType InBoneIndex)
 
FBoneIndexType GetBoneIndex () const
 
void SetWeight (float InWeight)
 
float GetWeight () const
 
void SetRawWeight (const uint16 InRawWeight)
 
uint16 GetRawWeight () const
 
void Serialize (FArchive &InArchive)
 
uint32 GetTypeHash () const
 
FString ToString () const
 
int32 ToInt32 () const
 

Static Public Member Functions

static constexpr uint16 GetMaxRawWeight ()
 
static bool DescSortByWeightPredicate (const FBoneWeight &A, const FBoneWeight &B)
 
static FBoneWeight FromInt32 (int32 InBoneWeight)
 

Constructor & Destructor Documentation

◆ FBoneWeight() [1/4]

UE::AnimationCore::FBoneWeight::FBoneWeight ( )
default

Default constructor. NOTE: The values are uninitialized.

◆ FBoneWeight() [2/4]

UE::AnimationCore::FBoneWeight::FBoneWeight ( FBoneIndexType  InBoneIndex,
uint8  InWeight 
)
inlineexplicit

A constructor for old-style bone weights where the weight was stored as an unsigned eight bit integer.

◆ FBoneWeight() [3/4]

UE::AnimationCore::FBoneWeight::FBoneWeight ( FBoneIndexType  InBoneIndex,
uint16  InRawWeight 
)
inlineexplicit

A constructor for bone weights where the weight is stored as an unsigned sixteen bit integer. This is the natural storage format for this container.

◆ FBoneWeight() [4/4]

UE::AnimationCore::FBoneWeight::FBoneWeight ( FBoneIndexType  InBoneIndex,
float  InWeight 
)
inlineexplicit

A constructor for bone weights which converts the weight from a float value in the [0-1] range. Values outside of that range are clamped to the range.

Member Function Documentation

◆ DescSortByWeightPredicate()

static bool UE::AnimationCore::FBoneWeight::DescSortByWeightPredicate ( const FBoneWeight A,
const FBoneWeight B 
)
inlinestatic

A standard predicate we use for sorting by weight, in a descending order of weights

◆ FromInt32()

static FBoneWeight UE::AnimationCore::FBoneWeight::FromInt32 ( int32  InBoneWeight)
inlinestatic

Converts an int32 to an FBoneWeight object and returns it.

◆ GetBoneIndex()

FBoneIndexType UE::AnimationCore::FBoneWeight::GetBoneIndex ( ) const
inline

Returns the bone stored index.

◆ GetMaxRawWeight()

static constexpr uint16 UE::AnimationCore::FBoneWeight::GetMaxRawWeight ( )
inlinestaticconstexpr

The maximum raw weight value for a bone influence.

◆ GetRawWeight()

uint16 UE::AnimationCore::FBoneWeight::GetRawWeight ( ) const
inline

Returns the stored weight in the container's raw format, avoiding floating point conversion.

◆ GetTypeHash()

uint32 UE::AnimationCore::FBoneWeight::GetTypeHash ( ) const
inline

Returns a hash value from the bone weight values

◆ GetWeight()

float UE::AnimationCore::FBoneWeight::GetWeight ( ) const
inline

Returns the stored weight value as a float in the [0-1] range.

◆ operator!=()

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

Returns true if this object's bone weight values are not equal to the other container's values.

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

◆ operator==()

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

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

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

◆ Serialize()

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

◆ SetBoneIndex()

void UE::AnimationCore::FBoneWeight::SetBoneIndex ( FBoneIndexType  InBoneIndex)
inline

Set the bone stored index.

◆ SetRawWeight()

void UE::AnimationCore::FBoneWeight::SetRawWeight ( const uint16  InRawWeight)
inline

Set the stored weight in the raw format. This avoids any floating point conversion.

◆ SetWeight()

void UE::AnimationCore::FBoneWeight::SetWeight ( float  InWeight)
inline

Set stored weight as a float. Values outside the [0-1] range are clamped to that range. Undefined float values will result in an undefined weight.

◆ ToInt32()

int32 UE::AnimationCore::FBoneWeight::ToInt32 ( ) const
inline

Returns the contents of this object as an int32.

◆ ToString()

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

A helper function to return a human-readable version of the bone weight.


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