Skip to main content

ARDK for Android/com.nianticlabs.ardk.utils/ImageMath/calculateViewRotation

calculateViewRotation

[androidJvm]
fun calculateViewRotation(fromOrientation: Orientation, toOrientation: Orientation): Matrix

Returns an affine transform that rotates between two interface orientations around the center.

This method models UI rotation (opposite to physical device rotation).

Return​

An affine Matrix that rotates from the fromOrientation into the toOrientation.

Parameters​

androidJvm

fromOrientationStarting orientation.
toOrientationTarget orientation.