Skip to main content
API Reference NianticSpatial.NSDK.AR.Utilities CameraMath

CalculateDisplayMatrix


Declaration

public static Matrix4x4 CalculateDisplayMatrix(int imageWidth, int imageHeight, int viewportWidth, int viewportHeight, ScreenOrientation viewportOrientation, bool invertVertically = true, MatrixLayout layout = MatrixLayout.ColumnMajor, bool reverseRotation = false)

Parameters

NameTypeSummary
imageWidthint
The width of the raw AR background image in pixels.
imageHeightint
The height of the raw AR background image in pixels.
viewportWidthint
The width of the viewport in pixels.
viewportHeightint
The height of the viewport in pixels.
viewportOrientationScreenOrientation
The orientation of the viewport.
invertVerticallybool
Whether to mirror the image across the X axis.
This reverses the order of the horizontal rows, flipping the image upside down.
layoutMatrixLayout
The layout of the resulting matrix.
reverseRotationbool
On some platforms, the direction of UI rotation is counter-clockwise.