Class

ARSCNFaceGeometry

A SceneKit representation of face topology for use with face information provided by an AR session.

Declaration

@interface ARSCNFaceGeometry : SCNGeometry

Overview

This class is a subclass of SCNGeometry that wraps the mesh data provided by the ARFaceGeometry class. You can use ARSCNFaceGeometry to quickly and easily visualize face topology and facial expressions provided by ARKit in a SceneKit view.

Face mesh topology is constant for the lifetime of an ARSCNFaceGeometry object. That is, the geometry's single SCNGeometryElement object always describes the same arrangement of vertices, and the SCNGeometrySourceSemanticTexcoord geometry source always maps the same vertices to the same texture coordinates.

When you modify the geometry with the updateFromFaceGeometry: method, only the contents of the SCNGeometrySourceSemanticVertex geometry source change, indicating the difference in vertex positions as ARKit adapts the mesh to the shape and expression of the user's face.

Topics

Creating a Geometry

+ faceGeometryWithDevice:

Creates a SceneKit face geometry for rendering with the specified Metal device object.

+ faceGeometryWithDevice:fillMesh:

Creates a SceneKit face geometry, optionally filling in gaps in the mesh for the eyes and mouth.

Updating the Geometry

- updateFromFaceGeometry:

Deforms the SceneKit geometry to match the specified face mesh.

Relationships

Inherits From

See Also

Using Face Geometry

geometry

A coarse triangle mesh representing the topology of the detected face.

ARFaceGeometry

A 3D mesh describing face topology used in face-tracking AR sessions.