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

#include <DynamicMeshTriangleAttribute.h>

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

Public Member Functions

 TDynamicMeshTriangleAttribute ()
 
 TDynamicMeshTriangleAttribute (FDynamicMesh3 *ParentMeshIn, bool bAutoInit=true)
 
const FDynamicMesh3GetParentMesh () const
 
FDynamicMesh3GetParentMesh ()
 
virtual FDynamicMeshAttributeBaseMakeNew (FDynamicMesh3 *ParentMeshIn) const override
 
virtual FDynamicMeshAttributeBaseMakeCopy (FDynamicMesh3 *ParentMeshIn) const override
 
void Copy (const TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension > &Copy)
 
virtual FDynamicMeshAttributeBaseMakeCompactCopy (const FCompactMaps &CompactMaps, FDynamicMesh3 *ParentMeshIn) const override
 
void CompactInPlace (const FCompactMaps &CompactMaps)
 
void CompactCopy (const FCompactMaps &CompactMaps, const TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension > &ToCopy)
 
void Initialize (AttribValueType InitialValue=(AttribValueType) 0)
 
void SetNewValue (int NewTriangleID, const AttribValueType *Data)
 
virtual bool CopyThroughMapping (const TDynamicAttributeBase< FDynamicMesh3 > *Source, const FMeshIndexMappings &Mapping) override
 
virtual bool Append (const TDynamicAttributeBase &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 TriangleID, AttribValueType *Data) const
 
template<typename AsType >
void GetValue (int TriangleID, AsType &Data) const
 
void SetValue (int TriangleID, const AttribValueType *Data)
 
template<typename AsType >
void SetValue (int TriangleID, const AsType &Data)
 
void SetScalarValue (int TriangleID, const AttribValueType &SingleValue)
 
void CopyValue (int FromTriangleID, int ToTriangleID)
 
bool IsBorderEdge (int EdgeID, bool bMeshBoundaryIsBorder=true) const
 
virtual TUniquePtr< FDynamicMeshAttributeChangeBaseNewBlankChange () const override
 
void OnSplitEdge (const DynamicMeshInfo::FEdgeSplitInfo &SplitInfo) override
 
void OnFlipEdge (const DynamicMeshInfo::FEdgeFlipInfo &FlipInfo) override
 
void OnCollapseEdge (const DynamicMeshInfo::FEdgeCollapseInfo &CollapseInfo) override
 
void OnPokeTriangle (const DynamicMeshInfo::FPokeTriangleInfo &PokeInfo) override
 
void OnMergeEdges (const DynamicMeshInfo::FMergeEdgesInfo &MergeInfo) override
 
void OnMergeVertices (const DynamicMeshInfo::FMergeVerticesInfo &MergeInfo) override
 
void OnSplitVertex (const DynamicMeshInfo::FVertexSplitInfo &SplitInfo, const TArrayView< const int > &TrianglesToUpdate) override
 
virtual AttribValueType GetDefaultAttributeValue ()
 
void ResizeAttribStoreIfNeeded (int TriangleID)
 
virtual void OnNewTriangle (int TriangleID, bool bInserted) override
 
bool IsSameAs (const TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension > &Other, bool bIgnoreDataLayout) const
 
void Serialize (FArchive &Ar, const FCompactMaps *CompactMaps, bool bUseCompression)
 
virtual SIZE_T GetByteCount () const
 
- Public Member Functions inherited from UE::Geometry::TDynamicAttributeBase< ParentType >
virtual ~TDynamicAttributeBase ()
 
FName GetName () const
 
void SetName (FName NameIn)
 
virtual TDynamicAttributeBaseMakeCopy (ParentType *ParentIn) const =0
 
virtual TDynamicAttributeBaseMakeNew (ParentType *ParentIn) const =0
 
virtual TDynamicAttributeBaseMakeCompactCopy (const FCompactMaps &CompactMaps, ParentType *ParentIn) const
 
virtual void Reparent (ParentType *NewParent)=0
 
virtual bool CopyThroughMapping (const TDynamicAttributeBase *Source, const FMeshIndexMappings &Mapping)=0
 
virtual void OnNewVertex (int VertexID, bool bInserted)
 
virtual void OnRemoveVertex (int VertexID)
 
virtual void OnRemoveTriangle (int TriangleID)
 
virtual void OnReverseTriOrientation (int TriangleID)
 
virtual bool CheckValidity (bool bAllowNonmanifold, EValidityCheckFailMode FailMode) const
 
void Serialize (FArchive &Ar)
 

Protected Types

using Super = FDynamicMeshAttributeBase
 

Protected Attributes

FDynamicMesh3ParentMesh
 
TDynamicVector< AttribValueTypeAttribValues
 
- Protected Attributes inherited from UE::Geometry::TDynamicAttributeBase< ParentType >
FName Name = FName()
 

Friends

class FDynamicMesh3
 
class FDynamicMeshAttributeSet
 
FArchiveoperator<< (FArchive &Ar, TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension > &Attr)
 

Additional Inherited Members

- Protected Member Functions inherited from UE::Geometry::TDynamicAttributeBase< ParentType >
virtual void CopyParentClassData (const TDynamicAttributeBase< ParentType > &Other)
 

Detailed Description

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

TDynamicMeshTriangleAttribute is an add-on to a FDynamicMesh3 that allows for per-triangle storage of an attribute value.

The FDynamicMesh3 mesh topology operations (eg split/flip/collapse edge, poke face, etc) can be mirrored to the overlay via OnSplitEdge(), etc.

Member Typedef Documentation

◆ Super

Constructor & Destructor Documentation

◆ TDynamicMeshTriangleAttribute() [1/2]

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

Create an empty overlay

◆ TDynamicMeshTriangleAttribute() [2/2]

template<typename AttribValueType , int AttribDimension>
UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::TDynamicMeshTriangleAttribute ( FDynamicMesh3 ParentMeshIn,
bool  bAutoInit = true 
)
inline

Create an overlay for the given parent mesh

Member Function Documentation

◆ Append()

template<typename AttribValueType , int AttribDimension>
virtual bool UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::Append ( const TDynamicAttributeBase 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>
virtual void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::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 >.

◆ CompactCopy()

template<typename AttribValueType , int AttribDimension>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::CompactCopy ( const FCompactMaps CompactMaps,
const TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension > &  ToCopy 
)
inline

◆ CompactInPlace()

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

Compact the attribute in place

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

◆ Copy()

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

◆ CopyIn()

template<typename AttribValueType , int AttribDimension>
virtual bool UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::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>
virtual bool UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::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>
virtual bool UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::CopyThroughMapping ( const TDynamicAttributeBase< FDynamicMesh3 > *  Source,
const FMeshIndexMappings Mapping 
)
inlineoverridevirtual

◆ CopyValue()

template<typename AttribValueType , int AttribDimension>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::CopyValue ( int  FromTriangleID,
int  ToTriangleID 
)
inline

Copy the attribute value at FromTriangleID to ToTriangleID

◆ GetByteCount()

◆ GetDefaultAttributeValue()

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

◆ GetParentMesh() [1/2]

Returns
the parent mesh for this overlay

◆ GetParentMesh() [2/2]

template<typename AttribValueType , int AttribDimension>
const FDynamicMesh3 * UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::GetParentMesh ( ) const
inline
Returns
the parent mesh for this overlay

◆ GetValue() [1/2]

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

Get the element at a given index

◆ GetValue() [2/2]

template<typename AttribValueType , int AttribDimension>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::GetValue ( int  TriangleID,
AttribValueType Data 
) const
inline

Get the element at a given index

◆ Initialize()

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

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

◆ IsBorderEdge()

template<typename AttribValueType , int AttribDimension>
bool UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::IsBorderEdge ( int  EdgeID,
bool  bMeshBoundaryIsBorder = true 
) const
inline

Returns true if the parent-mesh edge is a "Seam" in this overlay

◆ IsSameAs()

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

Returns true if this AttributeSet is the same as Other.

◆ MakeCompactCopy()

template<typename AttribValueType , int AttribDimension>
virtual FDynamicMeshAttributeBase * UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::MakeCompactCopy ( const FCompactMaps CompactMaps,
FDynamicMesh3 ParentMeshIn 
) const
inlineoverridevirtual

◆ MakeCopy()

template<typename AttribValueType , int AttribDimension>
virtual FDynamicMeshAttributeBase * UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::MakeCopy ( FDynamicMesh3 ParentMeshIn) const
inlineoverridevirtual

◆ MakeNew()

template<typename AttribValueType , int AttribDimension>
virtual FDynamicMeshAttributeBase * UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::MakeNew ( FDynamicMesh3 ParentMeshIn) const
inlineoverridevirtual

◆ NewBlankChange()

◆ OnCollapseEdge()

template<typename AttribValueType , int AttribDimension>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::OnCollapseEdge ( const DynamicMeshInfo::FEdgeCollapseInfo CollapseInfo)
inlineoverridevirtual

Update the overlay to reflect an edge collapse in the parent mesh

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

◆ OnFlipEdge()

template<typename AttribValueType , int AttribDimension>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::OnFlipEdge ( const DynamicMeshInfo::FEdgeFlipInfo FlipInfo)
inlineoverridevirtual

Update the overlay to reflect an edge flip in the parent mesh

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

◆ OnMergeEdges()

template<typename AttribValueType , int AttribDimension>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::OnMergeEdges ( const DynamicMeshInfo::FMergeEdgesInfo MergeInfo)
inlineoverridevirtual

Update the overlay to reflect an edge merge in the parent mesh

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

◆ OnMergeVertices()

template<typename AttribValueType , int AttribDimension>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::OnMergeVertices ( const DynamicMeshInfo::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 >.

◆ OnNewTriangle()

template<typename AttribValueType , int AttribDimension>
virtual void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::OnNewTriangle ( int  TriangleID,
bool  bInserted 
)
inlineoverridevirtual

◆ OnPokeTriangle()

template<typename AttribValueType , int AttribDimension>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::OnPokeTriangle ( const DynamicMeshInfo::FPokeTriangleInfo PokeInfo)
inlineoverridevirtual

Update the overlay to reflect a face poke in the parent mesh

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

◆ OnSplitEdge()

template<typename AttribValueType , int AttribDimension>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::OnSplitEdge ( const DynamicMeshInfo::FEdgeSplitInfo SplitInfo)
inlineoverridevirtual

Update the overlay to reflect an edge split in the parent mesh

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

◆ OnSplitVertex()

template<typename AttribValueType , int AttribDimension>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::OnSplitVertex ( const DynamicMeshInfo::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>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::ResizeAttribStoreIfNeeded ( int  TriangleID)
inline

◆ Serialize()

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

◆ SetNewValue()

template<typename AttribValueType , int AttribDimension>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::SetNewValue ( int  NewTriangleID,
const AttribValueType Data 
)
inline

◆ SetScalarValue()

template<typename AttribValueType , int AttribDimension>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::SetScalarValue ( int  TriangleID,
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>
template<typename AsType >
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::SetValue ( int  TriangleID,
const AsType &  Data 
)
inline

Set the element at a given index

◆ SetValue() [2/2]

template<typename AttribValueType , int AttribDimension>
void UE::Geometry::TDynamicMeshTriangleAttribute< AttribValueType, AttribDimension >::SetValue ( int  TriangleID,
const AttribValueType Data 
)
inline

Set the element at a given index

Friends And Related Symbol Documentation

◆ FDynamicMesh3

template<typename AttribValueType , int AttribDimension>
friend class FDynamicMesh3
friend

◆ FDynamicMeshAttributeSet

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

◆ operator<<

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

Serialization operator for TDynamicMeshTriangleAttribute.

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

Member Data Documentation

◆ AttribValues

List of per-triangle attribute values

◆ ParentMesh

The parent mesh this overlay belongs to


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