TMeshAttributesRef

This is the class used to access attribute values.

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.

Variables

Name Description

Protected variable

ArrayType *

 

ArrayPtr

Constructors

Name Description

Public function

TMeshAttributesRef

(
    ArrayType* InArrayPtr
)

Constructor taking a pointer to a TMeshAttributeArraySet

Public function

TMeshAttributesRef

(
    TMeshAttributesRef< ElementIDType, ...
)

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

Functions

Name Description

Public function

void

 

Copy

(
    TMeshAttributesRef< ElementIDType, ...,
    const int32 DestIndex,
    const int32 SrcIndex
)

Copies the given attribute array and index to this index

Public function Const

AttributeTyp...

 

Get

(
    const ElementIDType ElementID
)

Get the element with the given ID from index 0

Public function Const

AttributeTyp...

 

Get

(
    const ElementIDType ElementID,
    const int32 Index
)

Get the element with the given ID and index

Public function Const

AttributeTyp...

 

GetDefaultValue()

Return default value for this attribute type

Public function Const

EMeshAttribu...

 

GetFlags()

Get the flags for this attribute array set

Public function Const

int32

 

GetNumElements()

Get the number of elements in this attribute array

Public function Const

int32

 

GetNumIndices()

Return number of indices this attribute has

Public function Const

void

 

InsertIndex

(
    const int32 Index
)

Inserts an attribute index

Public function Const

bool

 

IsValid()

Return whether the reference is valid or not

Public function Const

void

 

RemoveIndex

(
    const int32 Index
)

Removes an attribute index

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

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

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

Public function Const

void

 

SetNumIndices

(
    const int32 NumIndices
)

Sets number of indices this attribute has

Operators

Name Description

Public function Const

AttributeTyp...

 

operator[]

(
    const ElementIDType ElementID
)

Access elements from attribute index 0

Typedefs

Name

Description

ArrayType

Type

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss