objc2_ar_kit/generated/
ARTrackingStatusTypes.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3#[cfg(feature = "objc2")]
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8/// A value describing the camera’s tracking state.
9///
10/// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/artrackingstate?language=objc)
11// NS_ENUM
12#[cfg(feature = "objc2")]
13#[repr(transparent)]
14#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
15pub struct ARTrackingState(pub NSInteger);
16#[cfg(feature = "objc2")]
17impl ARTrackingState {
18    /// Tracking is not available.
19    #[doc(alias = "ARTrackingStateNotAvailable")]
20    pub const NotAvailable: Self = Self(0);
21    /// Tracking is limited. See tracking reason for details.
22    #[doc(alias = "ARTrackingStateLimited")]
23    pub const Limited: Self = Self(1);
24    /// Tracking is Normal.
25    #[doc(alias = "ARTrackingStateNormal")]
26    pub const Normal: Self = Self(2);
27}
28
29#[cfg(feature = "objc2")]
30unsafe impl Encode for ARTrackingState {
31    const ENCODING: Encoding = NSInteger::ENCODING;
32}
33
34#[cfg(feature = "objc2")]
35unsafe impl RefEncode for ARTrackingState {
36    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
37}
38
39/// A reason describing why the camera’s tracking state is limited.
40///
41/// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/artrackingstatereason?language=objc)
42// NS_ENUM
43#[cfg(feature = "objc2")]
44#[repr(transparent)]
45#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
46pub struct ARTrackingStateReason(pub NSInteger);
47#[cfg(feature = "objc2")]
48impl ARTrackingStateReason {
49    /// Tracking is not limited.
50    #[doc(alias = "ARTrackingStateReasonNone")]
51    pub const None: Self = Self(0);
52    /// Tracking is limited due to initialization in progress.
53    #[doc(alias = "ARTrackingStateReasonInitializing")]
54    pub const Initializing: Self = Self(1);
55    /// Tracking is limited due to a excessive motion of the camera.
56    #[doc(alias = "ARTrackingStateReasonExcessiveMotion")]
57    pub const ExcessiveMotion: Self = Self(2);
58    /// Tracking is limited due to a lack of features visible to the camera.
59    #[doc(alias = "ARTrackingStateReasonInsufficientFeatures")]
60    pub const InsufficientFeatures: Self = Self(3);
61    /// Tracking is limited due to a relocalization in progress.
62    #[doc(alias = "ARTrackingStateReasonRelocalizing")]
63    pub const Relocalizing: Self = Self(4);
64}
65
66#[cfg(feature = "objc2")]
67unsafe impl Encode for ARTrackingStateReason {
68    const ENCODING: Encoding = NSInteger::ENCODING;
69}
70
71#[cfg(feature = "objc2")]
72unsafe impl RefEncode for ARTrackingStateReason {
73    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
74}