Instance Method

snapshotAtTime:withSize:antialiasingMode:

Creates an image by drawing the renderer’s content at the specified system time.

Declaration

iOS, tvOS
- (UIImage *)snapshotAtTime:(CFTimeInterval)time withSize:(CGSize)size antialiasingMode:(SCNAntialiasingMode)antialiasingMode;
macOS
- (NSImage *)snapshotAtTime:(CFTimeInterval)time withSize:(CGSize)size antialiasingMode:(SCNAntialiasingMode)antialiasingMode;

Parameters

time

The timestamp, in seconds, at which to render the scene.

size

The size, in pixels, of the image to create.

antialiasingMode

The antialiasing mode to use for the image output.

Return Value

An image object reflecting the contents of the scene.

Discussion

When you call this method, SceneKit updates its hierarchy of presentation nodes based on the specified timestamp, and then draws the scene into a new image object of the specified size.