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