Contents

viewMatrix(for:)

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

Declaration

func viewMatrix(for orientation: UIInterfaceOrientation) -> simd_float4x4

Parameters

  • orientation:

    The orientation in which the camera image is to be presented.

Return Value

A view matrix appropriate for the camera with the specified orientation.

Discussion

This method has no effect on ARKit. Instead, this method uses the orientation parameter and the camera’s state to construct a view matrix for your own rendering code.

See Also

Applying Camera Geometry