Navigation
API > API/Runtime > API/Runtime/MeshDescription
This is the class used to access attribute values. It is a proxy object to a TMeshAttributeArraySet<> and should be passed by value. It is valid for as long as the owning FMeshDescription exists.
This is the default implementation which handles simple attributes, i.e. those of a simple type T. There are partial specializations which handle compound attributes below, i.e. those accessed via TArrayView
| Name | TMeshAttributesRef |
| Type | class |
| Header File | /Engine/Source/Runtime/MeshDescription/Public/MeshAttributeArray.h |
| Include Path | #include "MeshAttributeArray.h" |
Syntax
template<typename ElementIDType, typename AttributeType>
class TMeshAttributesRef
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TMeshAttributesRef
(
const TMeshAttributesRef< int32, SrcAttributeType >& InRef |
Implicitly construct a TMeshAttributesRef-to-const from a TMeshAttributesArray | MeshAttributeArray.h | |
TMeshAttributesRef
(
const TMeshAttributesRef< ElementIDType, SrcAttributeType >& InRef |
Implicitly construct a TMeshAttributesRef-to-const from a regular one | MeshAttributeArray.h | |
TMeshAttributesRef
(
const TMeshAttributesRef< int32, AttributeType >& InRef |
Implicitly construct a TMeshAttributesRef from a TMeshAttributesArray | MeshAttributeArray.h | |
TMeshAttributesRef
(
BaseArrayType* InArrayPtr, |
Constructor taking a pointer to a FMeshAttributeArraySetBase | MeshAttributeArray.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ArrayType | TCopyQualifiersFromTo_T< AttributeType, TMeshAttributeArraySet< std::remove_cv_t< AttributeType > > > | MeshAttributeArray.h | |
| BaseArrayType | TCopyQualifiersFromTo_T< AttributeType, FMeshAttributeArraySetBase > | MeshAttributeArray.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ArrayPtr | BaseArrayType * | MeshAttributeArray.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Copy
(
TMeshAttributesRef< ElementIDType, const AttributeType > Src, |
Copies the given attribute array and channel to this channel | MeshAttributeArray.h | |
AttributeType Get
(
int32 ElementIndex, |
MeshAttributeArray.h | ||
AttributeType Get
(
const ElementIDType ElementID, |
Get the element with the given ID and channel | MeshAttributeArray.h | |
TArrayView< AttributeType > GetArrayView
(
int32 ElementIndex, |
MeshAttributeArray.h | ||
AttributeType GetDefaultValue() |
Return default value for this attribute type | MeshAttributeArray.h | |
uint32 GetExtent() |
Get the extent for this attribute type | MeshAttributeArray.h | |
EMeshAttributeFlags GetFlags() |
Get the flags for this attribute array set | MeshAttributeArray.h | |
int32 GetNumChannels() |
Return number of indices this attribute has | MeshAttributeArray.h | |
int32 GetNumElements() |
Get the number of elements in this attribute array | MeshAttributeArray.h | |
int32 GetNumIndices() |
MeshAttributeArray.h | ||
TArrayView< AttributeType > GetRawArray
(
const int32 AttributeChannel |
MeshAttributeArray.h | ||
void InsertChannel
(
const int32 Channel |
Inserts an attribute channel | MeshAttributeArray.h | |
void InsertIndex
(
const int32 Index |
MeshAttributeArray.h | ||
bool IsValid() |
Return whether the reference is valid or not | MeshAttributeArray.h | |
void RemoveChannel
(
const int32 Channel |
Removes an attribute channel | MeshAttributeArray.h | |
void RemoveIndex
(
const int32 Index |
MeshAttributeArray.h | ||
void Set
(
const ElementIDType ElementID, |
Set the element with the given ID and channel to the provided value | MeshAttributeArray.h | |
void Set
(
const ElementIDType ElementID, |
Set the element with the given ID and index 0 to the provided value | MeshAttributeArray.h | |
void Set
(
int32 ElementIndex, |
MeshAttributeArray.h | ||
void Set
(
int32 ElementIndex, |
MeshAttributeArray.h | ||
void SetArrayView
(
int32 ElementIndex, |
MeshAttributeArray.h | ||
void SetArrayView
(
int32 ElementIndex, |
MeshAttributeArray.h | ||
void SetNumChannels
(
const int32 NumChannels |
Sets number of channels this attribute has | MeshAttributeArray.h | |
void SetNumIndices
(
const int32 NumChannels |
MeshAttributeArray.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
AttributeType & operator[]
(
const ElementIDType ElementID |
Access elements from attribute channel 0 | MeshAttributeArray.h | |
AttributeType & operator[]
(
int32 ElementIndex |
MeshAttributeArray.h |