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

#include <DynamicVertexAttribute.h>

+ Inheritance diagram for UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >:

Public Member Functions

 TDynamicVertexAttribute ()
 
 TDynamicVertexAttribute (ParentType *ParentIn, bool bAutoInit=true)
 
virtual ~TDynamicVertexAttribute ()
 
const ParentType * GetParent () const
 
ParentType * GetParent ()
 
virtual TDynamicAttributeBase< ParentType > * MakeNew (ParentType *ParentIn) const override
 
virtual TDynamicAttributeBase< ParentType > * MakeCopy (ParentType *ParentIn) const override
 
void Copy (const TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType > &Copy)
 
virtual TDynamicAttributeBase< ParentType > * MakeCompactCopy (const FCompactMaps &CompactMaps, ParentType *ParentTypeIn) const override
 
void CompactInPlace (const FCompactMaps &CompactMaps)
 
void CompactCopy (const FCompactMaps &CompactMaps, const TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType > &ToCopy)
 
void Initialize (AttribValueType InitialValue=(AttribValueType) 0)
 
void SetNewValue (int NewVertexID, const AttribValueType *Data)
 
virtual 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
 
virtual bool CopyOut (int RawID, void *Buffer, int BufferSize) const override
 
virtual bool CopyIn (int RawID, void *Buffer, int BufferSize) override
 
void GetValue (int VertexID, AttribValueType *Data) const
 
template<typename AsType >
void GetValue (int VertexID, AsType &Data) const
 
void SetValue (int VertexID, const AttribValueType *Data)
 
template<typename AsType >
void SetValue (int VertexID, const AsType &Data)
 
void SetScalarValue (int32 VertexID, const AttribValueType &SingleValue)
 
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
 
virtual AttribValueType GetDefaultAttributeValue ()
 
void ResizeAttribStoreIfNeeded (int VertexID)
 
virtual 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
 
virtual TUniquePtr< TDynamicAttributeChangeBase< ParentType > > NewBlankChange () const override
 
virtual bool CheckValidity (bool bAllowNonmanifold, EValidityCheckFailMode FailMode) const override
 
bool IsSameAs (const TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType > &Other, bool bIgnoreDataLayout) const
 
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 Types

using Super = TDynamicAttributeBase< ParentType >
 

Protected Member Functions

virtual void SetAttributeFromLerp (int SetAttribute, int AttributeA, int AttributeB, double Alpha)
 
virtual void SetAttributeFromBary (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
 
TDynamicVector< AttribValueTypeAttribValues
 
- Protected Attributes inherited from UE::Geometry::TDynamicAttributeBase< ParentType >
FName Name = FName()
 

Friends

class FDynamicMeshAttributeSet
 
FArchiveoperator<< (FArchive &Ar, TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType > &Attr)
 

Detailed Description

template<typename AttribValueType, int AttribDimension, typename ParentType>
class UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >

TDynamicVertexAttribute provides per-vertex storage of an attribute value

Member Typedef Documentation

◆ Super

template<typename AttribValueType , int AttribDimension, typename ParentType >
using UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::Super = TDynamicAttributeBase<ParentType>
protected

Constructor & Destructor Documentation

◆ TDynamicVertexAttribute() [1/2]

template<typename AttribValueType , int AttribDimension, typename ParentType >
UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::TDynamicVertexAttribute ( )
inline

Create an empty overlay

◆ TDynamicVertexAttribute() [2/2]

template<typename AttribValueType , int AttribDimension, typename ParentType >
UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::TDynamicVertexAttribute ( ParentType *  ParentIn,
bool  bAutoInit = true 
)
inline

Create an attribute for the given parent

◆ ~TDynamicVertexAttribute()

template<typename AttribValueType , int AttribDimension, typename ParentType >
virtual UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::~TDynamicVertexAttribute ( )
inlinevirtual

Member Function Documentation

◆ Append()

template<typename AttribValueType , int AttribDimension, typename ParentType >
virtual bool UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
virtual void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
virtual bool UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::CompactCopy ( const FCompactMaps CompactMaps,
const TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType > &  ToCopy 
)
inline

◆ CompactInPlace()

template<typename AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::CompactInPlace ( const FCompactMaps CompactMaps)
inlinevirtual

Compact the attribute in place

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

◆ Copy()

template<typename AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::Copy ( const TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType > &  Copy)
inline

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

◆ CopyIn()

template<typename AttribValueType , int AttribDimension, typename ParentType >
virtual bool UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
virtual bool UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
virtual bool UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::CopyValue ( int  FromVertexID,
int  ToVertexID 
)
inline

Copy the attribute value at FromVertexID to ToVertexID

◆ GetByteCount()

template<typename AttribValueType , int AttribDimension, typename ParentType >
virtual SIZE_T UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::GetByteCount ( ) const
inlineoverridevirtual

◆ GetDefaultAttributeValue()

template<typename AttribValueType , int AttribDimension, typename ParentType >
virtual AttribValueType UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::GetDefaultAttributeValue ( )
inlinevirtual

◆ GetParent() [1/2]

template<typename AttribValueType , int AttribDimension, typename ParentType >
ParentType * UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::GetParent ( )
inline
Returns
the parent for this attribute

◆ GetParent() [2/2]

template<typename AttribValueType , int AttribDimension, typename ParentType >
const ParentType * UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::GetParent ( ) const
inline
Returns
the parent for this attribute

◆ GetValue() [1/2]

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

Get the element at a given index. For scalar access, use GetValue<T*const>(&Value) for a Value of type T.

◆ GetValue() [2/2]

template<typename AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::GetValue ( int  VertexID,
AttribValueType Data 
) const
inline

Get the element at a given index

◆ Initialize()

template<typename AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::Initialize ( AttribValueType  InitialValue = (AttribValueType)0)
inline

Initialize the attribute values with InitialValue, and resize to the parent mesh's max vertex ID

◆ IsSameAs()

template<typename AttribValueType , int AttribDimension, typename ParentType >
bool UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::IsSameAs ( const TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType > &  Other,
bool  bIgnoreDataLayout 
) const
inline

Returns true if this AttributeSet is the same as Other.

Parameters
bIgnoreDataLayoutIgnore gaps and padding in the data layout, i.e. the exact index is irrelevant as long as valid entries are equal in value and in the same order.

◆ MakeCompactCopy()

template<typename AttribValueType , int AttribDimension, typename ParentType >
virtual TDynamicAttributeBase< ParentType > * UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
virtual TDynamicAttributeBase< ParentType > * UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
virtual TDynamicAttributeBase< ParentType > * UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
virtual TUniquePtr< TDynamicAttributeChangeBase< ParentType > > UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::NewBlankChange ( ) const
inlineoverridevirtual

◆ OnCollapseEdge()

template<typename AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::OnMergeVertices ( const FDynamicMesh3::FMergeVerticesInfo MergeInfo)
inlineoverridevirtual

Update to reflect a vertex merge that does not resolve as a collapse or edge merge (i.e. a vertex merge that resolves as bowtie creation).

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

◆ OnNewVertex()

template<typename AttribValueType , int AttribDimension, typename ParentType >
virtual void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::OnNewVertex ( int  VertexID,
bool  bInserted 
)
inlineoverridevirtual

◆ OnPokeTriangle()

template<typename AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, 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 >.

◆ ResizeAttribStoreIfNeeded()

template<typename AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::ResizeAttribStoreIfNeeded ( int  VertexID)
inline

◆ Serialize()

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

Serialize to and from an archive.

Parameters
ArArchive to serialize with.
CompactMapsIf this is not a null pointer, the mesh serialization compacted the vertex and/or triangle data using the provided mapping.
bUseCompressionUse compression for serializing bulk data.

◆ SetAttributeFromBary()

template<typename AttribValueType , int AttribDimension, typename ParentType >
virtual void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::SetAttributeFromBary ( int  SetAttribute,
int  AttributeA,
int  AttributeB,
int  AttributeC,
const FVector3d BaryCoords 
)
inlineprotectedvirtual

Set the value at an Attribute to be a barycentric interpolation of three other Attributes

◆ SetAttributeFromLerp()

template<typename AttribValueType , int AttribDimension, typename ParentType >
virtual void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::SetAttributeFromLerp ( int  SetAttribute,
int  AttributeA,
int  AttributeB,
double  Alpha 
)
inlineprotectedvirtual

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

◆ SetNewValue()

template<typename AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::SetNewValue ( int  NewVertexID,
const AttribValueType Data 
)
inline

◆ SetScalarValue()

template<typename AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::SetScalarValue ( int32  VertexID,
const AttribValueType SingleValue 
)
inline

Set the element at a given index with a scalar value (the same value for each dimension)

◆ SetValue() [1/2]

template<typename AttribValueType , int AttribDimension, typename ParentType >
template<typename AsType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::SetValue ( int  VertexID,
const AsType &  Data 
)
inline

Set the element at a given index

◆ SetValue() [2/2]

template<typename AttribValueType , int AttribDimension, typename ParentType >
void UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::SetValue ( int  VertexID,
const AttribValueType Data 
)
inline

Set the element at a given index

Friends And Related Symbol Documentation

◆ FDynamicMeshAttributeSet

template<typename AttribValueType , int AttribDimension, typename ParentType >
friend class FDynamicMeshAttributeSet
friend

◆ operator<<

template<typename AttribValueType , int AttribDimension, typename ParentType >
FArchive & operator<< ( FArchive Ar,
TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType > &  Attr 
)
friend

Serialization operator for TDynamicVertexAttribute.

Parameters
ArArchive to serialize with.
AttrVertex attribute to serialize.
Returns
Passing down serializing archive.

Member Data Documentation

◆ AttribValues

template<typename AttribValueType , int AttribDimension, typename ParentType >
TDynamicVector<AttribValueType> UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::AttribValues
protected

List of per-vertex attribute values

◆ Parent

template<typename AttribValueType , int AttribDimension, typename ParentType >
ParentType* UE::Geometry::TDynamicVertexAttribute< AttribValueType, AttribDimension, ParentType >::Parent
protected

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


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