Class

ARCamera

Information about the camera position and imaging characteristics for a captured video frame in an AR session.

Topics

Handling Tracking Status

var trackingState: ARCamera.TrackingState

The general quality of position tracking available when the camera captured a frame.

enum ARCamera.TrackingState

Values for position tracking quality, with possible causes when tracking quality is limited.

Examining Camera Geometry

var transform: matrix_float4x4

The position and orientation of the camera in world coordinate space.

var eulerAngles: vector_float3

The orientation of the camera, expressed as roll, pitch, and yaw values.

Examining Imaging Parameters

var imageResolution: CGSize

The width and height, in pixels, of the captured camera image.

var intrinsics: matrix_float3x3

A matrix that converts between the 2D camera plane and 3D world coordinate space.

Applying Camera Geometry

var projectionMatrix: matrix_float4x4

A transform matrix appropriate for rendering 3D content to match the image captured by the camera.

func projectionMatrix(for: UIInterfaceOrientation, viewportSize: CGSize, zNear: CGFloat, zFar: CGFloat)

Returns a transform matrix appropriate for rendering 3D content to match the image captured by the camera, using the specified parameters.

func viewMatrix(for: UIInterfaceOrientation)

Returns a transform matrix for converting from world space to camera space.

func projectPoint(vector_float3, orientation: UIInterfaceOrientation, viewportSize: CGSize)

Returns the projection of a point from the 3D world space detected by ARKit into the 2D space of a view rendering the scene.

Relationships

Inherits From

See Also

Camera and Scene Details

class ARFrame

A video image and position tracking information captured as part of an AR session.

class ARLightEstimate

Estimated scene lighting information associated with a captured video frame in an AR session.

class ARDirectionalLightEstimate

Estimated environmental lighting information associated with a captured video frame in a face-tracking AR session.