UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType > Class Template Reference

#include <DynamicVertexSkinWeightsAttribute.h>

+ Inheritance diagram for UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >:

Public Types

using FBoneWeights = UE::AnimationCore::FBoneWeights
 
using FBoneWeight = UE::AnimationCore::FBoneWeight
 

Public Member Functions

 TDynamicVertexSkinWeightsAttribute ()=default
 
 TDynamicVertexSkinWeightsAttribute (ParentType *ParentIn, bool bAutoInit=true)
 
virtual ~TDynamicVertexSkinWeightsAttribute ()=default
 
const ParentType * GetParent () const
 
ParentType * GetParent ()
 
TDynamicAttributeBase< ParentType > * MakeNew (ParentType *ParentIn) const override
 
TDynamicAttributeBase< ParentType > * MakeCopy (ParentType *ParentIn) const override
 
void Copy (const TDynamicVertexSkinWeightsAttribute< ParentType > &Copy)
 
TDynamicAttributeBase< ParentType > * MakeCompactCopy (const FCompactMaps &CompactMaps, ParentType *ParentTypeIn) const override
 
void CompactInPlace (const FCompactMaps &CompactMaps) override
 
void CompactCopy (const FCompactMaps &CompactMaps, const TDynamicVertexSkinWeightsAttribute< ParentType > &ToCopy)
 
void Initialize (const FBoneWeights InitialValue={})
 
void SetNewValue (int32 InNewVertexID, const FBoneWeights InBoneWeights)
 
bool ReindexBoneIndicesToSkeleton (const TArray< FName > &FromRefSkeleton, const TArray< FName > &ToRefSkeleton)
 
TSet< int32GetBoundBoneIndices () const
 
bool CopyThroughMapping (const TDynamicAttributeBase< ParentType > *Source, const FMeshIndexMappings &Mapping) override
 
virtual bool Append (const TDynamicAttributeBase< ParentType > &Source, const UE::Geometry::FDynamicMesh3::FAppendInfo &Info) override
 
virtual void AppendDefaulted (const UE::Geometry::FDynamicMesh3::FAppendInfo &Info) override
 
bool CopyOut (int RawID, void *Buffer, int BufferSize) const override
 
bool CopyIn (int RawID, void *Buffer, int BufferSize) override
 
void GetValue (int VertexID, FBoneWeights &Data) const
 
template<typename AsType >
void GetValue (int VertexID, AsType &Data) const
 
template<typename BoneIndexType , typename BoneFloatWeightType >
void GetValue (int VertexID, TArray< BoneIndexType > &OutBones, TArray< BoneFloatWeightType > &OutWeights) const
 
void SetValue (int VertexID, const FBoneWeights &Data)
 
template<typename ContainerAdapter >
void SetValue (int VertexID, const UE::AnimationCore::TBoneWeights< ContainerAdapter > &Data)
 
template<typename BoneIndexType , typename BoneFloatWeightType >
void SetValue (int VertexID, const TArray< BoneIndexType > &InBones, const TArray< BoneFloatWeightType > &InWeights, int32 InNumEntries)
 
void CopyValue (int FromVertexID, int ToVertexID)
 
void OnSplitEdge (const FDynamicMesh3::FEdgeSplitInfo &SplitInfo) override
 
void OnFlipEdge (const FDynamicMesh3::FEdgeFlipInfo &FlipInfo) override
 
void OnCollapseEdge (const FDynamicMesh3::FEdgeCollapseInfo &CollapseInfo) override
 
void ResizeAttribStoreIfNeeded (int VertexID)
 
void OnNewVertex (int VertexID, bool bInserted) override
 
void OnPokeTriangle (const FDynamicMesh3::FPokeTriangleInfo &PokeInfo) override
 
void OnMergeEdges (const FDynamicMesh3::FMergeEdgesInfo &MergeInfo) override
 
void OnMergeVertices (const FDynamicMesh3::FMergeVerticesInfo &MergeInfo) override
 
void OnSplitVertex (const FDynamicMesh3::FVertexSplitInfo &SplitInfo, const TArrayView< const int > &TrianglesToUpdate) override
 
TUniquePtr< TDynamicAttributeChangeBase< ParentType > > NewBlankChange () const override
 
bool CheckValidity (bool bAllowNonmanifold, EValidityCheckFailMode FailMode) const override
 
void Serialize (FArchive &Ar, const FCompactMaps *CompactMaps, bool bUseCompression)
 
virtual SIZE_T GetByteCount () const override
 
- Public Member Functions inherited from UE::Geometry::TDynamicAttributeBase< ParentType >
virtual ~TDynamicAttributeBase ()
 
FName GetName () const
 
void SetName (FName NameIn)
 
virtual void OnRemoveVertex (int VertexID)
 
virtual void OnNewTriangle (int TriangleID, bool bInserted)
 
virtual void OnRemoveTriangle (int TriangleID)
 
virtual void OnReverseTriOrientation (int TriangleID)
 
void Serialize (FArchive &Ar)
 

Protected Member Functions

void SetBoneWeightsFromLerp (int SetAttribute, int AttributeA, int AttributeB, double Alpha)
 
void SetBoneWeightsFromBary (int SetAttribute, int AttributeA, int AttributeB, int AttributeC, const FVector3d &BaryCoords)
 
- Protected Member Functions inherited from UE::Geometry::TDynamicAttributeBase< ParentType >
virtual void CopyParentClassData (const TDynamicAttributeBase< ParentType > &Other)
 

Protected Attributes

ParentType * Parent = nullptr
 
TDynamicVector< FBoneWeightsVertexBoneWeights
 
- Protected Attributes inherited from UE::Geometry::TDynamicAttributeBase< ParentType >
FName Name = FName()
 

Friends

class FDynamicMeshAttributeSet
 

Detailed Description

template<typename ParentType>
class UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >

Forward declarations

TDynamicVertexAttribute provides per-vertex storage of bone weights (skin weights)

Member Typedef Documentation

◆ FBoneWeight

template<typename ParentType >
using UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::FBoneWeight = UE::AnimationCore::FBoneWeight

◆ FBoneWeights

template<typename ParentType >
using UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::FBoneWeights = UE::AnimationCore::FBoneWeights

Constructor & Destructor Documentation

◆ TDynamicVertexSkinWeightsAttribute() [1/2]

template<typename ParentType >
UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::TDynamicVertexSkinWeightsAttribute ( )
default

Create an empty overlay

◆ TDynamicVertexSkinWeightsAttribute() [2/2]

template<typename ParentType >
UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::TDynamicVertexSkinWeightsAttribute ( ParentType *  ParentIn,
bool  bAutoInit = true 
)
inline

Create an attribute for the given parent

◆ ~TDynamicVertexSkinWeightsAttribute()

Member Function Documentation

◆ Append()

template<typename ParentType >
virtual bool UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::Append ( const TDynamicAttributeBase< ParentType > &  Source,
const UE::Geometry::FDynamicMesh3::FAppendInfo AppendInfo 
)
inlineoverridevirtual

Add elements from the Source attribute, using the AppendInfo to determine the range to copy.

Returns
true if the append succeeded, false otherwise (e.g. false if the data from the source attribute was not compatible and the CopyOut failed to copy across)

Implements UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ AppendDefaulted()

template<typename ParentType >
virtual void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::AppendDefaulted ( const UE::Geometry::FDynamicMesh3::FAppendInfo AppendInfo)
inlineoverridevirtual

Add default-valued elements, using the AppendInfo to determine the range to add. Called when appending from a mesh that does not have this attribute.

Implements UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ CheckValidity()

template<typename ParentType >
bool UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::CheckValidity ( bool  bAllowNonmanifold,
EValidityCheckFailMode  FailMode 
) const
inlineoverridevirtual

Check validity of attribute

Parameters
bAllowNonmanifoldAccept non-manifold topology as valid. Note that this should almost always be true for attributes; non-manifold overlays are generally valid.
FailModeDesired behavior if mesh is found invalid

Reimplemented from UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ CompactCopy()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::CompactCopy ( const FCompactMaps CompactMaps,
const TDynamicVertexSkinWeightsAttribute< ParentType > &  ToCopy 
)
inline

◆ CompactInPlace()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::CompactInPlace ( const FCompactMaps CompactMaps)
inlineoverridevirtual

Compact the attribute in place

Implements UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ Copy()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::Copy ( const TDynamicVertexSkinWeightsAttribute< ParentType > &  Copy)
inline

Set this overlay to contain the same arrays as the copy overlay

◆ CopyIn()

template<typename ParentType >
bool UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::CopyIn ( int  RawID,
void Buffer,
int  BufferSize 
)
inlineoverridevirtual

Generic function to copy data in to an attribute; it's up to the derived class to map RawID to chunks of attribute data

Implements UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ CopyOut()

template<typename ParentType >
bool UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::CopyOut ( int  RawID,
void Buffer,
int  BufferSize 
) const
inlineoverridevirtual

Generic function to copy data out of an attribute; it's up to the derived class to map RawID to chunks of attribute data

Implements UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ CopyThroughMapping()

template<typename ParentType >
bool UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::CopyThroughMapping ( const TDynamicAttributeBase< ParentType > *  Source,
const FMeshIndexMappings Mapping 
)
inlineoverridevirtual

Copy data from a different attribute to this one, using the mesh index mapping to determine the correspondence

Parameters
Sourcecopy attribute data from this source
Mappingthe correspondence from Source's parent to this attribute's parent
Returns
true if the copy succeeded, false otherwise (e.g. false if the data from the source attribute was not compatible and the CopyOut failed to copy across)

Implements UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ CopyValue()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::CopyValue ( int  FromVertexID,
int  ToVertexID 
)
inline

Copy the attribute value at FromVertexID to ToVertexID

◆ GetBoundBoneIndices()

template<typename ParentType >
TSet< int32 > UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::GetBoundBoneIndices ( ) const
inline

Returns a list of all unique bone indices that are used by this skin weight attribute.

Returns
A unique list of bone indices used by all bone weights across all vertices.

◆ GetByteCount()

template<typename ParentType >
virtual SIZE_T UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::GetByteCount ( ) const
inlineoverridevirtual

◆ GetParent() [1/2]

template<typename ParentType >
ParentType * UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::GetParent ( )
inline
Returns
the parent for this attribute

◆ GetParent() [2/2]

template<typename ParentType >
const ParentType * UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::GetParent ( ) const
inline
Returns
the parent for this attribute

◆ GetValue() [1/3]

template<typename ParentType >
template<typename AsType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::GetValue ( int  VertexID,
AsType &  Data 
) const
inline

Get the element at a given index

◆ GetValue() [2/3]

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::GetValue ( int  VertexID,
FBoneWeights Data 
) const
inline

Get the element at a given index

◆ GetValue() [3/3]

template<typename ParentType >
template<typename BoneIndexType , typename BoneFloatWeightType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::GetValue ( int  VertexID,
TArray< BoneIndexType > &  OutBones,
TArray< BoneFloatWeightType > &  OutWeights 
) const
inline

Get the element at a given index via a pair of bone index and weight arrays. The number of influences is equal to the array size.

◆ Initialize()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::Initialize ( const FBoneWeights  InitialValue = {})
inline

Initialize the attribute values to the given max vertex ID

◆ MakeCompactCopy()

template<typename ParentType >
TDynamicAttributeBase< ParentType > * UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::MakeCompactCopy ( const FCompactMaps CompactMaps,
ParentType *  ParentIn 
) const
inlineoverridevirtual

Allocate a new compact copy of the attribute layer, optionally with a different parent. Default implementation does a full copy and then compacts it, usually derived class will want to override this with a more efficient direct compact copy implementation

Reimplemented from UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ MakeCopy()

template<typename ParentType >
TDynamicAttributeBase< ParentType > * UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::MakeCopy ( ParentType *  ParentIn) const
inlineoverridevirtual

Allocate a new copy of the attribute layer, optionally with a different parent

Implements UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ MakeNew()

template<typename ParentType >
TDynamicAttributeBase< ParentType > * UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::MakeNew ( ParentType *  ParentIn) const
inlineoverridevirtual

Allocate a new empty instance of the same type of attribute layer

Implements UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ NewBlankChange()

template<typename ParentType >
TUniquePtr< TDynamicAttributeChangeBase< ParentType > > UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::NewBlankChange ( ) const
inlineoverridevirtual

◆ OnCollapseEdge()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::OnCollapseEdge ( const FDynamicMesh3::FEdgeCollapseInfo CollapseInfo)
inlineoverridevirtual

Update the overlay to reflect an edge collapse in the parent

Reimplemented from UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ OnFlipEdge()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::OnFlipEdge ( const FDynamicMesh3::FEdgeFlipInfo FlipInfo)
inlineoverridevirtual

Update the overlay to reflect an edge flip in the parent

Reimplemented from UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ OnMergeEdges()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::OnMergeEdges ( const FDynamicMesh3::FMergeEdgesInfo MergeInfo)
inlineoverridevirtual

Update the overlay to reflect an edge merge in the parent

Reimplemented from UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ OnMergeVertices()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::OnMergeVertices ( const FDynamicMesh3::FMergeVerticesInfo MergeInfo)
inlineoverridevirtual

Update the overlay to reflect a vertex merge in the parent

Reimplemented from UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ OnNewVertex()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::OnNewVertex ( int  VertexID,
bool  bInserted 
)
inlineoverridevirtual

◆ OnPokeTriangle()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::OnPokeTriangle ( const FDynamicMesh3::FPokeTriangleInfo PokeInfo)
inlineoverridevirtual

Update the overlay to reflect a face poke in the parent

Reimplemented from UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ OnSplitEdge()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::OnSplitEdge ( const FDynamicMesh3::FEdgeSplitInfo SplitInfo)
inlineoverridevirtual

Update the overlay to reflect an edge split in the parent

Reimplemented from UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ OnSplitVertex()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::OnSplitVertex ( const FDynamicMesh3::FVertexSplitInfo SplitInfo,
const TArrayView< const int > &  TrianglesToUpdate 
)
inlineoverridevirtual

Update the overlay to reflect a vertex split in the parent

Reimplemented from UE::Geometry::TDynamicAttributeBase< ParentType >.

◆ ReindexBoneIndicesToSkeleton()

template<typename ParentType >
bool UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::ReindexBoneIndicesToSkeleton ( const TArray< FName > &  FromRefSkeleton,
const TArray< FName > &  ToRefSkeleton 
)
inline

Re-index bone indices of the skin weights from one reference skeleton (represented by an array of bone names) to another.

Parameters
FromRefSkeletonThe reference skeleton that the current skin weights are indexed against.
ToRefSkeletonThe new reference skeleton that should be used to reindex the weights.
Returns
true on success, false otherwise
Note
Reasons for failure are:
  • bone index of one of the bone weights is larger than the number of bones in FromRefSkeleton, meaning the weights most likely were not computed with respect to the FromRefSkeleton.
  • one of the bone weights references a bone in FromRefSkeleton that doesn't exist in ToRefSkeleton.
  • ToRefSkeleton contains duplicates.
FromRefSkeleton can contain bones that are not present in ToRefSkeleton as long as those bones are not referenced by any of the weights.

◆ ResizeAttribStoreIfNeeded()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::ResizeAttribStoreIfNeeded ( int  VertexID)
inline

◆ Serialize()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::Serialize ( FArchive Ar,
const FCompactMaps CompactMaps,
bool  bUseCompression 
)
inline

◆ SetBoneWeightsFromBary()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::SetBoneWeightsFromBary ( int  SetAttribute,
int  AttributeA,
int  AttributeB,
int  AttributeC,
const FVector3d BaryCoords 
)
inlineprotected

Set the value at an Attribute to be a barycentric interpolation of three other Attributes. If one of the barycentric coordinates is nearly one (within UE_SMALL_NUMBER tolerance) then simply copy over the value of the corresponding Attribute.

◆ SetBoneWeightsFromLerp()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::SetBoneWeightsFromLerp ( int  SetAttribute,
int  AttributeA,
int  AttributeB,
double  Alpha 
)
inlineprotected

Set the value at an Attribute to be a linear interpolation of two other Attributes

◆ SetNewValue()

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::SetNewValue ( int32  InNewVertexID,
const FBoneWeights  InBoneWeights 
)
inline

◆ SetValue() [1/3]

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::SetValue ( int  VertexID,
const FBoneWeights Data 
)
inline

Set the element at a given index

◆ SetValue() [2/3]

template<typename ParentType >
template<typename BoneIndexType , typename BoneFloatWeightType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::SetValue ( int  VertexID,
const TArray< BoneIndexType > &  InBones,
const TArray< BoneFloatWeightType > &  InWeights,
int32  InNumEntries 
)
inline

Set the element at a given index

◆ SetValue() [3/3]

template<typename ParentType >
void UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::SetValue ( int  VertexID,
const UE::AnimationCore::TBoneWeights< ContainerAdapter > &  Data 
)
inline

Set the element at a given index

Friends And Related Symbol Documentation

◆ FDynamicMeshAttributeSet

template<typename ParentType >
friend class FDynamicMeshAttributeSet
friend

Member Data Documentation

◆ Parent

template<typename ParentType >
ParentType* UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::Parent = nullptr
protected

The parent object (e.g. mesh, point set) this attribute belongs to

◆ VertexBoneWeights

template<typename ParentType >
TDynamicVector<FBoneWeights> UE::Geometry::TDynamicVertexSkinWeightsAttribute< ParentType >::VertexBoneWeights
protected

List of per-vertex bone weights values


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