TMeshAttributesRef

This is the class used to access attribute values.

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 ElementIDType, typename AttributeType>
class TMeshAttributesRef

Remarks

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<T> or TAttributeArray<T>

Constructors

Name Description

Public function

TMeshAttributesRef

(
    TMeshAttributesRef< ElementIDType, ...
)

Implicitly construct a TMeshAttributesRef-to-const from a regular one

Public function

TMeshAttributesRef

(
    TMeshAttributesRef< int32, U > InRe...
)

Implicitly construct a TMeshAttributesRef from a TMeshAttributesArray

Public function

TMeshAttributesRef

(
    TMeshAttributesRef< int32, typename...
)

Implicitly construct a TMeshAttributesRef-to-const from a TMeshAttributesArray

Public function

TMeshAttributesRef

(
    BaseArrayType* InArrayPtr,
    uint32 InExtent
)

Constructor taking a pointer to a FMeshAttributeArraySetBase

Functions

Name Description

Public function

void

 

Copy

(
    TMeshAttributesRef< ElementIDType, ...,
    const int32 DestChannel,
    const int32 SrcChannel
)

Copies the given attribute array and channel to this channel

Public function Const

AttributeTyp...

 

Get

(
    int32 ElementIndex,
    const int32 Channel
)

Public function Const

AttributeTyp...

 

Get

(
    const ElementIDType ElementID,
    const int32 Channel
)

Get the element with the given ID and channel

Public function Const

TArrayView< ...

 

GetArrayView

(
    int32 ElementIndex,
    const int32 Channel
)

Public function Const

AttributeTyp...

 

GetDefaultValue()

Return default value for this attribute type

Public function Const

uint32

 

GetExtent()

Get the extent for this attribute type

Public function Const

EMeshAttribu...

 

GetFlags()

Get the flags for this attribute array set

Public function Const

int32

 

GetNumChannels()

Return number of indices this attribute has

Public function Const

int32

 

GetNumElements()

Get the number of elements in this attribute array

Public function Const

TArrayView< ...

 

GetRawArray

(
    const int32 AttributeChannel
)

Public function Const

void

 

InsertChannel

(
    const int32 Channel
)

Inserts an attribute channel

Public function Const

bool

 

IsValid()

Return whether the reference is valid or not

Public function Const

void

 

RemoveChannel

(
    const int32 Channel
)

Removes an attribute channel

Public function Const

void

 

Set

(
    const ElementIDType ElementID,
    const int32 Channel,
    const AttributeType& Value
)

Set the element with the given ID and channel to the provided value

Public function Const

void

 

Set

(
    const ElementIDType ElementID,
    const AttributeType& Value
)

Set the element with the given ID and index 0 to the provided value

Public function Const

void

 

Set

(
    int32 ElementIndex,
    const AttributeType& Value
)

Public function Const

void

 

Set

(
    int32 ElementIndex,
    const int32 Channel,
    const AttributeType& Value
)

Public function Const

void

 

SetArrayView

(
    int32 ElementIndex,
    const int32 Channel,
    TArrayView< const AttributeType > V...
)

Public function Const

void

 

SetArrayView

(
    int32 ElementIndex,
    TArrayView< const AttributeType > V...
)

Public function Const

void

 

SetNumChannels

(
    const int32 NumChannels
)

Sets number of channels this attribute has

Operators

Name Description

Public function Const

AttributeTyp...

 

operator[]

(
    const ElementIDType ElementID
)

Access elements from attribute channel 0

Public function Const

AttributeTyp...

 

operator[]

(
    int32 ElementIndex
)

Typedefs

Name

Description

ArrayType

BaseArrayType

Deprecated Functions

Name Description

Public function Const

int32

 

GetNumIndices()

Please use GetNumChannels().

Public function Const

void

 

InsertIndex

(
    const int32 Index
)

Please use InsertChannel().

Public function Const

void

 

RemoveIndex

(
    const int32 Index
)

Please use RemoveChannel().

Public function Const

void

 

SetNumIndices

(
    const int32 NumChannels
)

Please use SetNumChannels().