Type Method

nodeWithMDLObject:

Creates a node from the specified Model I/O object.

Declaration

+ (instancetype)nodeWithMDLObject:(MDLObject *)mdlObject;

Parameters

mdlObject

A Model I/O object.

Return Value

A new node object.

Discussion

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 MDLObject class is the most general class in ModelIO, representing any object that can be contained in a scene file, along with the object’s position in the scene and its relationships to other objects. Use this method to import any Model I/O object, creating an equivalent SCNNode object. If the Model I/O object is of a more specific class, SceneKit imports that object as an attachment to the node—for example, using this method to import a MDLMesh object creates a SceneKit node with an attached geometry, and importing a MDLLight object creates a node with an attached light.

See Also

Creating a Node

+ node

Creates and returns a node object.

+ nodeWithGeometry:

Creates and returns a node object with the specified geometry attached.