Creates a submesh from the specified SceneKit geometry element, using the specified allocator.
- iOS 10.0+
- macOS 10.12+
- tvOS 10.0+
A SceneKit geometry element.
An object responsible for allocating submesh index data. If
nil, Model I/O uses an internal allocator object.
A new submesh object.
SceneKit is a high-level framework for modeling, animating, and displaying 3D scenes. (For details, see SceneKit.) The
SCNGeometry objects describes only the index data for a 3D object; geometry elements are contained in
SCNGeometry objects that manage both the vertex data that a geometry element refers to and the material assignments for rendering each geometry element.
allocator parameter controls vertex data allocation for the submesh. For example, to use the MetalKit framework for loading vertex data into GPU buffers for rendering using Metal, pass a
MTKMesh object. By specifying an allocator, you can ensure that mesh data is copied a minimal number of times between being read from a file and being loaded into GPU memory for rendering.