A geometry based on a two-dimensional path, optionally extruded to create a three-dimensional object.
SDKs
- iOS 8.0+
- macOS 10.9+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
Framework
- Scene
Kit
Declaration
class SCNShape : SCNGeometry
Overview
SceneKit creates a three-dimensional geometry by extruding a Bézier path, which extends in the x- and y-axis directions of its local coordinate space, along the z-axis by a specified amount. For example, if you create a shape with an extrusion depth of 1
, it extends from -0
to 0
along the z-axis. An extrusion depth of zero creates a flat, one-sided shape—the geometry is confined to the plane whose z-coordinate is 0
, and viewable only from its front unless its material’s is
property is true
.
A shape geometry may contain between one and five geometry elements:
If its
extrusion
property isDepth 0
, the shape geometry has one element corresponding to its one visible side..0 If its extrusion depth is greater than zero and its
chamfer
property isRadius 0
, the shape geometry has three elements, corresponding to its front, back, and extruded sides..0 If both extrusion depth and chamfer radius are greater than zero, the text geometry can have four or five elements depending on its
chamfer
property, corresponding to its front, back, extruded sides, front chamfer, and back chamfer.Mode
SceneKit can render each element using a different material. For details, see the description of the materials
property in SCNGeometry
.