TMeshAttributeArrayBase

This defines the container used to hold mesh element attributes of a particular name and index.

Choose your operating system:

Windows

macOS

Linux

References

Module

MeshDescription

Header

/Engine/Source/Runtime/MeshDescription/Public/MeshAttributeArray.h

Include

#include "MeshAttributeArray.h"

Syntax

template<typename AttributeType>
class TMeshAttributeArrayBase

Remarks

This defines the container used to hold mesh element attributes of a particular name and index. It is a simple TArray, so that all attributes are packed contiguously for each element ID.

that the container may grow arbitrarily as new elements are inserted, but it will never be shrunk as elements are removed. The only operations that will shrink the container are Initialize() and Remap().

Variables

Name Description

Protected variable

TArray< Attribu...

 

Container

The actual container, represented by a regular array

Protected variable

uint32

 

Extent

Number of array elements in this attribute type

Constructors

Name Description

Public function

TMeshAttributeArrayBase

(
    uint32 InExtent
)

Functions

Name Description

Public function Const

const Attrib...

 

GetElementBase

(
    const int32 Index
)

Public function

AttributeTyp...

 

GetElementBase

(
    const int32 Index
)

Public function Const

uint32

 

GetExtent()

Public function Const

uint32

 

GetHash

(
    uint32 Crc
)

Public function

void

 

Initialize

(
    const int32 ElementCount,
    const AttributeType& Default
)

Initializes the array to the given size with the default value

Public function

void

 

Insert

(
    const int32 Index,
    const AttributeType& Default
)

Expands the array if necessary so that the passed element index is valid.

Public function Const

int32

 

Num()

Return size of container

Public function

void

 

Remap

(
    const TSparseArray< int32 >& Index...,
    const AttributeType& Default
)

Remaps elements according to the passed remapping table

Public function

void

 

SetNum

(
    const int32 ElementCount,
    const AttributeType& Default
)

Public function

void

 

SetToDefault

(
    const int32 Index,
    const AttributeType& Default
)

Fills the index with the default value

Deprecated Functions

Name Description

Public function Const

const Attrib...

 

GetData()

This method will be removed.

Public function Const

const Attrib...

 

operator[]

(
    const int32 Index
)

Please use GetElementBase() instead.

Public function

AttributeTyp...

 

operator[]

(
    const int32 Index
)

Please use GetElementBase() instead.