objc2_ar_kit/generated/
ARGeoAnchor.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-location")]
7use objc2_core_location::*;
8#[cfg(feature = "objc2-foundation")]
9use objc2_foundation::*;
10
11use crate::*;
12
13#[cfg(feature = "objc2")]
14extern_class!(
15    /// An anchor representing a geographical location in the world.
16    ///
17    /// The anchor's transform will be automatically updated by the session based on location and heading.
18    /// The session needs to be configured with ARGeoTrackingConfiguration.
19    ///
20    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/argeoanchor?language=objc)
21    #[unsafe(super(ARAnchor, NSObject))]
22    #[derive(Debug, PartialEq, Eq, Hash)]
23    #[cfg(all(feature = "ARAnchor", feature = "objc2"))]
24    pub struct ARGeoAnchor;
25);
26
27#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
28unsafe impl Send for ARGeoAnchor {}
29
30#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
31unsafe impl Sync for ARGeoAnchor {}
32
33#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
34unsafe impl ARAnchorCopying for ARGeoAnchor {}
35
36#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
37unsafe impl ARTrackable for ARGeoAnchor {}
38
39#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
40unsafe impl NSCoding for ARGeoAnchor {}
41
42#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
43unsafe impl NSCopying for ARGeoAnchor {}
44
45#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
46unsafe impl CopyingHelper for ARGeoAnchor {
47    type Result = Self;
48}
49
50#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
51unsafe impl NSObjectProtocol for ARGeoAnchor {}
52
53#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
54unsafe impl NSSecureCoding for ARGeoAnchor {}
55
56#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
57impl ARGeoAnchor {
58    extern_methods!(
59        #[cfg(feature = "objc2-core-location")]
60        /// The coordinate where this anchor will be placed.
61        ///
62        ///
63        /// The anchor's transform will be automatically updated by the session when ARGeoTrackingConfiguration is set.
64        #[unsafe(method(coordinate))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn coordinate(&self) -> CLLocationCoordinate2D;
67
68        #[cfg(feature = "objc2-core-location")]
69        /// The distance to mean sea level, in meters (negative values indicate it's below sea level).
70        ///
71        ///
72        /// Only valid when altitudeSource is not ARAltitudeSourceUnknown.
73        #[unsafe(method(altitude))]
74        #[unsafe(method_family = none)]
75        pub unsafe fn altitude(&self) -> CLLocationDistance;
76
77        #[cfg(feature = "ARGeoTrackingTypes")]
78        /// The source of altitude information. If the user did not provide the altitude, ARKit populates this property to indicate the expected accuracy depending on the available altitude data.
79        #[unsafe(method(altitudeSource))]
80        #[unsafe(method_family = none)]
81        pub unsafe fn altitudeSource(&self) -> ARAltitudeSource;
82
83        #[cfg(feature = "objc2-core-location")]
84        /// Initializes a new ARGeoAnchor with the given coordinates.
85        ///
86        ///
87        /// ARKit will query the ground level altitude during runtime, and populate the altitude as soon as that information becomes available.
88        ///
89        /// Parameter `coordinate`: Coordinates.
90        #[unsafe(method(initWithCoordinate:))]
91        #[unsafe(method_family = init)]
92        pub unsafe fn initWithCoordinate(
93            this: Allocated<Self>,
94            coordinate: CLLocationCoordinate2D,
95        ) -> Retained<Self>;
96
97        #[cfg(feature = "objc2-core-location")]
98        /// Initializes a new ARGeoAnchor with the given coordinates and altitude.
99        ///
100        ///
101        /// Parameter `coordinate`: Coordinates.
102        ///
103        /// Parameter `altitude`: Altitude in meters.
104        #[unsafe(method(initWithCoordinate:altitude:))]
105        #[unsafe(method_family = init)]
106        pub unsafe fn initWithCoordinate_altitude(
107            this: Allocated<Self>,
108            coordinate: CLLocationCoordinate2D,
109            altitude: CLLocationDistance,
110        ) -> Retained<Self>;
111
112        #[cfg(all(feature = "objc2-core-location", feature = "objc2-foundation"))]
113        /// Initializes a new named ARGeoAnchor with the given coordinates.
114        ///
115        ///
116        /// ARKit will query the ground level altitude during runtime, and populate the altitude as soon as that information becomes available.
117        ///
118        /// Parameter `name`: Name of the anchor.
119        ///
120        /// Parameter `coordinate`: Coordinates.
121        #[unsafe(method(initWithName:coordinate:))]
122        #[unsafe(method_family = init)]
123        pub unsafe fn initWithName_coordinate(
124            this: Allocated<Self>,
125            name: &NSString,
126            coordinate: CLLocationCoordinate2D,
127        ) -> Retained<Self>;
128
129        #[cfg(all(feature = "objc2-core-location", feature = "objc2-foundation"))]
130        /// Initializes a new named ARGeoAnchor with the given coordinates and altitude.
131        ///
132        ///
133        /// Parameter `name`: Name of the anchor.
134        ///
135        /// Parameter `coordinate`: Coordinates.
136        ///
137        /// Parameter `altitude`: Altitude in meters.
138        #[unsafe(method(initWithName:coordinate:altitude:))]
139        #[unsafe(method_family = init)]
140        pub unsafe fn initWithName_coordinate_altitude(
141            this: Allocated<Self>,
142            name: &NSString,
143            coordinate: CLLocationCoordinate2D,
144            altitude: CLLocationDistance,
145        ) -> Retained<Self>;
146    );
147}
148
149/// Methods declared on superclass `ARAnchor`.
150#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
151impl ARGeoAnchor {
152    extern_methods!(
153        /// Unavailable
154        #[unsafe(method(init))]
155        #[unsafe(method_family = init)]
156        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
157
158        #[unsafe(method(new))]
159        #[unsafe(method_family = new)]
160        pub unsafe fn new() -> Retained<Self>;
161    );
162}