One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

LowLevelMesh.Attribute

struct · iOS 18.0+ · SDK 27.1

struct Attribute

An object that determines how to store vertex attribute data in memory and map it to RealityKit shader attributes.

Members (9)

get · iOS 18.0+

layoutIndex

TypeScript
get layoutIndex(): Promise<number>
Swift declaration
var layoutIndex: Int

The index of the layout that contains this attribute. The index refers to an entry in ``LowLevelMesh/Descriptor-swift.struct/vertexLayouts``.

set · iOS 18.0+

layoutIndex

TypeScript
setLayoutIndex(value: number): Promise<void>
Swift declaration
var layoutIndex: Int

The index of the layout that contains this attribute. The index refers to an entry in ``LowLevelMesh/Descriptor-swift.struct/vertexLayouts``.

get · iOS 18.0+

format

TypeScript
get format(): Promise<_Metal_MTLVertexFormat>
Swift declaration
var format: MTLVertexFormat

The format of the vertex attribute. When reading from a geometry modifier or surface shader, the value converts to its runtime representation using Metal's standard rules. For details about Metal's standard rules, see <doc://com.apple.documentation/documentation/metal/mtlvertexattributedescriptor/1516081-format>.

set · iOS 18.0+

format

TypeScript
setFormat(value: _Metal_MTLVertexFormat): Promise<void>
Swift declaration
var format: MTLVertexFormat

The format of the vertex attribute. When reading from a geometry modifier or surface shader, the value converts to its runtime representation using Metal's standard rules. For details about Metal's standard rules, see <doc://com.apple.documentation/documentation/metal/mtlvertexattributedescriptor/1516081-format>.

get · iOS 18.0+

offset

TypeScript
get offset(): Promise<number>
Swift declaration
var offset: Int

The location of an attribute in vertex data, determined by the byte offset from the start of the vertex data.

set · iOS 18.0+

offset

TypeScript
setOffset(value: number): Promise<void>
Swift declaration
var offset: Int

The location of an attribute in vertex data, determined by the byte offset from the start of the vertex data.

init · iOS 18.0+

init

TypeScript
static init(semantic: LowLevelMesh_VertexSemantic, format: _Metal_MTLVertexFormat, layoutIndex: number, offset: number): Promise<LowLevelMesh_Attribute>
Swift declaration
init(semantic: LowLevelMesh.VertexSemantic, format: MTLVertexFormat, layoutIndex: Int = 0, offset: Int)

Creates an attribute for a low-level mesh.

get · iOS 18.0+

semantic

TypeScript
get semantic(): Promise<LowLevelMesh_VertexSemantic>
Swift declaration
var semantic: LowLevelMesh.VertexSemantic

The semantic of the vertex attribute, which describes how you want RealityKit to interpret the attribute. RealityKit consults the vertex semantic when interpreting the data in your ``LowLevelMesh``. For example, an attribute with the semantic value of ``LowLevelMesh/VertexSemantic/position`` uses to determine the position of a vertex.

set · iOS 18.0+

semantic

TypeScript
setSemantic(value: LowLevelMesh_VertexSemantic): Promise<void>
Swift declaration
var semantic: LowLevelMesh.VertexSemantic

The semantic of the vertex attribute, which describes how you want RealityKit to interpret the attribute. RealityKit consults the vertex semantic when interpreting the data in your ``LowLevelMesh``. For example, an attribute with the semantic value of ``LowLevelMesh/VertexSemantic/position`` uses to determine the position of a vertex.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →