A container for index buffer data and material information to be used in rendering all or part of a 3D object.
SDKs
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- Model I/O
Declaration
class MDLSubmesh : NSObject
A container for index buffer data and material information to be used in rendering all or part of a 3D object.
SDKs
Framework
class MDLSubmesh : NSObject
init(index Buffer: MDLMesh Buffer, index Count: Int, index Type: MDLIndex Bit Depth, geometry Type: MDLGeometry Type, material: MDLMaterial?)
Initializes a submesh with an index buffer and the specified properties.
init(name: String, index Buffer: MDLMesh Buffer, index Count: Int, index Type: MDLIndex Bit Depth, geometry Type: MDLGeometry Type, material: MDLMaterial?)
Initializes a named submesh with an index buffer and the specified properties.
init(name: String, index Buffer: MDLMesh Buffer, index Count: Int, index Type: MDLIndex Bit Depth, geometry Type: MDLGeometry Type, material: MDLMaterial?, topology: MDLSubmesh Topology?)
Initializes a named submesh with a specific topology.
init?(mdl Submesh: MDLSubmesh, index Type: MDLIndex Bit Depth, geometry Type: MDLGeometry Type)
Initializes a submesh by copying or converting another submesh.
var index Buffer: MDLMesh Buffer
An object that provides index data for the submesh.
var index Count: Int
The number of indices in the submesh’s index buffer.
var index Type: MDLIndex Bit Depth
The data type for each element in the submesh’s index buffer.
var geometry Type: MDLGeometry Type
The type of geometric primitives described by the submesh’s index buffer.
var topology: MDLSubmesh Topology?
A description of how the non-uniform layout of the submesh’s index buffer defines the shape of the mesh.
var material: MDLMaterial?
An object that describes the intended surface appearance of the submesh for rendering.
var name: String
A descriptive name for the submesh.
init(scn Geometry Element: SCNGeometry Element, buffer Allocator: MDLMesh Buffer Allocator?)
Creates a submesh from the specified SceneKit geometry element, using the specified allocator.
init(scn Geometry Element: SCNGeometry Element)
Creates a submesh from the specified SceneKit geometry element.
enum MDLIndex Bit Depth
Options for the size of integer data in a submesh’s index buffer, used by the index
property.
enum MDLGeometry Type
Types of geometric primitives for rendering a submesh, used by the geometry
property.
class MDLAsset
An indexed container for 3D objects and associated information, such as transform hierarchies, meshes, cameras, and lights.
class MDLObject
The base class for objects that are part of a 3D asset, including meshes, cameras, and lights.
class MDLTransform
A description of the local coordinate space transformations for a 3D object.
class MDLMesh
A container for vertex buffer data to be used in rendering a 3D object.
class MDLSubmesh Topology
A description of how a submesh's index buffer data is arranged and how that arrangement should be used to produce the submesh's intended 3D shape.
protocol MDLNamed
The common interface for Model I/O objects that expose a human-readable name.