Creates a new geometry built from the specified geometry sources and elements.
- iOS 8.0+
- macOS 10.8+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 3.0+
A geometry’s visible content comes from the combination of geometry sources, which contain data describing its vertices, with geometry elements, which contain data describing how the vertices connect to form a surface.
SCNGeometry object describes an attribute of all vertices in the geometry (vertex position, surface normal vector, color, or texture mapping coordinates) identified by the source’s
semantic property. To create a custom geometry you must provide at least one source, for the
SCNGeometry semantic. Typically, you also provide sources for normals and texture coordinates for use in lighting and shading.
Sources for the vertex, normal, and color semantics must be unique—if multiple objects in the
sources array have the same semantic, SceneKit uses only the first. A geometry may have multiple sources for the
SCNGeometry semantic—the order of texture coordinate sources in the
sources array determines the value to use for the
mapping property when attaching materials.
SCNGeometry object describes how vertices from the geometry sources are combined into polygons to create the geometry’s shape. Creating a custom geometry requires at least one element. If the
elements array contains multiple objects, their order determines the arrangement of the geometry’s materials—for details, see the discussion of the