Type Method

lightWithSCNLight:

Creates a light object from the specified SceneKit light object.

Declaration

+ (instancetype)lightWithSCNLight:(SCNLight *)scnLight;

Parameters

light

A SceneKit camera object.

Return Value

A camera object.

Discussion

SceneKit is a high-level framework for modeling, animating, and displaying 3D scenes. (For details, see SceneKit.) The SCNLight class describes a light source in a scene, using a subset of the attributes of the Model I/O family of light objects. Use this method to convert a SceneKit light to a Model I/O representation, which you can then process or export.

In Model I/O, a MDLLight object represents both lighting parameters and (as a MDLObject subclass) its position and orientation in a scene. In SceneKit, an SCNLight object represents only the lighting parameters, and the SCNNode object containing a light contains location and orientation information. To also import location and orientation, import the light’s containing node as a MDLObject or MDLAsset object.