Orientation
Declaration
enum class OrientationSummary
Device orientation when capturing camera frames. Orientation affects how ARDK interprets camera data and poses. Ensure the correct orientation is set in [FrameData.screenOrientation] for accurate tracking and localization.
See also
- FrameData.screenOrientation
Cases
Functions
| Name | Type | Summary |
|---|---|---|
| From | Orientation? | - |
| fromSurfaceRotation | Orientation | Converts an Android display rotation into the corresponding device [Orientation]. Pass the value returned by Display.rotation — one of [Surface.ROTATION_0],[Surface.ROTATION_90], [Surface.ROTATION_180], or [Surface.ROTATION_270]. Any unrecognized value maps to [UNKNOWN]. This produces the device/UI orientation expected by [FrameData.screenOrientation] and by the orientationProvider ofcreateLiveDataSource. It is the inverse-free, sensor-agnostic mapping;renderers that need the flipped landscape convention should additionally apply their own rendering transform rather than swapping here. |