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


convenience init(mdlMesh: MDLMesh)



A Model I/O mesh object.

Return Value

A new geometry object.


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 MDLMesh class is a generic description of a 3D object, with vertex buffers corresponding to SceneKit geometry sources, and submeshes corresponding to SceneKit geometry elements. Because Model I/O associates materials with a mesh through its submeshes, importing a MDLMesh object imports the materials assigned to its submeshes to the corresponding locations in the SceneKit geometry’s materials array.

See Also

Creating a Geometry Object

init(sources: [SCNGeometrySource], elements: [SCNGeometryElement]?)

Creates a new geometry built from the specified geometry sources and elements.