Creates a geometry element from the specified Model I/O submesh object.


convenience init(mdlSubmesh mdlSubMesh: MDLSubmesh)



A Model I/O submesh object.

Return Value

A new geometry element.


The Model I/O framework provides universal support for import, export, description, and processing of several 3D asset file formats and related resources. (For details, see Model I/O.) The MDLSubmesh class is a generic description of an index buffer to be used in rendering a 3D object, along with an assigned material.

In SceneKit, materials are assigned to a geometry rather than to its elements, so importing a submesh as a geometry element does not import its material assignment. To import a Model I/O mesh along with its materials, use the SCNGeometry init(mdlMesh:) method.

See Also

Creating a Geometry Element

init<IndexType>(indices: [IndexType], primitiveType: SCNGeometryPrimitiveType)

Creates a geometry element from the specified array of index values.