Instance Method

snapshotAtTime:withSize:antialiasingMode:

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

Declaration

iOS, Mac Catalyst, 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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software