objc2_ar_kit/generated/
ARFaceAnchor.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-foundation")]
7use objc2_foundation::*;
8
9use crate::*;
10
11/// Blend shape locations of a face geometry.
12///
13/// Each location defines an area of the face that can be displaced with a provided coefficient.
14///
15/// Note: Blend shapes are computed based on the captured image. For example, if the detected person has a closed right eye, the eye on the left side of the captured image will appear closed and reported as
16/// blend shape activation  by ARKit.
17///
18/// See: -[ARFrame capturedImage]
19///
20/// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocation?language=objc)
21// NS_TYPED_ENUM
22#[cfg(feature = "objc2-foundation")]
23pub type ARBlendShapeLocation = NSString;
24
25extern "C" {
26    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationbrowdownleft?language=objc)
27    #[cfg(feature = "objc2-foundation")]
28    pub static ARBlendShapeLocationBrowDownLeft: &'static ARBlendShapeLocation;
29}
30
31extern "C" {
32    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationbrowdownright?language=objc)
33    #[cfg(feature = "objc2-foundation")]
34    pub static ARBlendShapeLocationBrowDownRight: &'static ARBlendShapeLocation;
35}
36
37extern "C" {
38    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationbrowinnerup?language=objc)
39    #[cfg(feature = "objc2-foundation")]
40    pub static ARBlendShapeLocationBrowInnerUp: &'static ARBlendShapeLocation;
41}
42
43extern "C" {
44    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationbrowouterupleft?language=objc)
45    #[cfg(feature = "objc2-foundation")]
46    pub static ARBlendShapeLocationBrowOuterUpLeft: &'static ARBlendShapeLocation;
47}
48
49extern "C" {
50    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationbrowouterupright?language=objc)
51    #[cfg(feature = "objc2-foundation")]
52    pub static ARBlendShapeLocationBrowOuterUpRight: &'static ARBlendShapeLocation;
53}
54
55extern "C" {
56    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationcheekpuff?language=objc)
57    #[cfg(feature = "objc2-foundation")]
58    pub static ARBlendShapeLocationCheekPuff: &'static ARBlendShapeLocation;
59}
60
61extern "C" {
62    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationcheeksquintleft?language=objc)
63    #[cfg(feature = "objc2-foundation")]
64    pub static ARBlendShapeLocationCheekSquintLeft: &'static ARBlendShapeLocation;
65}
66
67extern "C" {
68    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationcheeksquintright?language=objc)
69    #[cfg(feature = "objc2-foundation")]
70    pub static ARBlendShapeLocationCheekSquintRight: &'static ARBlendShapeLocation;
71}
72
73extern "C" {
74    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyeblinkleft?language=objc)
75    #[cfg(feature = "objc2-foundation")]
76    pub static ARBlendShapeLocationEyeBlinkLeft: &'static ARBlendShapeLocation;
77}
78
79extern "C" {
80    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyeblinkright?language=objc)
81    #[cfg(feature = "objc2-foundation")]
82    pub static ARBlendShapeLocationEyeBlinkRight: &'static ARBlendShapeLocation;
83}
84
85extern "C" {
86    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookdownleft?language=objc)
87    #[cfg(feature = "objc2-foundation")]
88    pub static ARBlendShapeLocationEyeLookDownLeft: &'static ARBlendShapeLocation;
89}
90
91extern "C" {
92    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookdownright?language=objc)
93    #[cfg(feature = "objc2-foundation")]
94    pub static ARBlendShapeLocationEyeLookDownRight: &'static ARBlendShapeLocation;
95}
96
97extern "C" {
98    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookinleft?language=objc)
99    #[cfg(feature = "objc2-foundation")]
100    pub static ARBlendShapeLocationEyeLookInLeft: &'static ARBlendShapeLocation;
101}
102
103extern "C" {
104    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookinright?language=objc)
105    #[cfg(feature = "objc2-foundation")]
106    pub static ARBlendShapeLocationEyeLookInRight: &'static ARBlendShapeLocation;
107}
108
109extern "C" {
110    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookoutleft?language=objc)
111    #[cfg(feature = "objc2-foundation")]
112    pub static ARBlendShapeLocationEyeLookOutLeft: &'static ARBlendShapeLocation;
113}
114
115extern "C" {
116    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookoutright?language=objc)
117    #[cfg(feature = "objc2-foundation")]
118    pub static ARBlendShapeLocationEyeLookOutRight: &'static ARBlendShapeLocation;
119}
120
121extern "C" {
122    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookupleft?language=objc)
123    #[cfg(feature = "objc2-foundation")]
124    pub static ARBlendShapeLocationEyeLookUpLeft: &'static ARBlendShapeLocation;
125}
126
127extern "C" {
128    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyelookupright?language=objc)
129    #[cfg(feature = "objc2-foundation")]
130    pub static ARBlendShapeLocationEyeLookUpRight: &'static ARBlendShapeLocation;
131}
132
133extern "C" {
134    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyesquintleft?language=objc)
135    #[cfg(feature = "objc2-foundation")]
136    pub static ARBlendShapeLocationEyeSquintLeft: &'static ARBlendShapeLocation;
137}
138
139extern "C" {
140    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyesquintright?language=objc)
141    #[cfg(feature = "objc2-foundation")]
142    pub static ARBlendShapeLocationEyeSquintRight: &'static ARBlendShapeLocation;
143}
144
145extern "C" {
146    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyewideleft?language=objc)
147    #[cfg(feature = "objc2-foundation")]
148    pub static ARBlendShapeLocationEyeWideLeft: &'static ARBlendShapeLocation;
149}
150
151extern "C" {
152    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationeyewideright?language=objc)
153    #[cfg(feature = "objc2-foundation")]
154    pub static ARBlendShapeLocationEyeWideRight: &'static ARBlendShapeLocation;
155}
156
157extern "C" {
158    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationjawforward?language=objc)
159    #[cfg(feature = "objc2-foundation")]
160    pub static ARBlendShapeLocationJawForward: &'static ARBlendShapeLocation;
161}
162
163extern "C" {
164    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationjawleft?language=objc)
165    #[cfg(feature = "objc2-foundation")]
166    pub static ARBlendShapeLocationJawLeft: &'static ARBlendShapeLocation;
167}
168
169extern "C" {
170    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationjawopen?language=objc)
171    #[cfg(feature = "objc2-foundation")]
172    pub static ARBlendShapeLocationJawOpen: &'static ARBlendShapeLocation;
173}
174
175extern "C" {
176    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationjawright?language=objc)
177    #[cfg(feature = "objc2-foundation")]
178    pub static ARBlendShapeLocationJawRight: &'static ARBlendShapeLocation;
179}
180
181extern "C" {
182    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthclose?language=objc)
183    #[cfg(feature = "objc2-foundation")]
184    pub static ARBlendShapeLocationMouthClose: &'static ARBlendShapeLocation;
185}
186
187extern "C" {
188    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthdimpleleft?language=objc)
189    #[cfg(feature = "objc2-foundation")]
190    pub static ARBlendShapeLocationMouthDimpleLeft: &'static ARBlendShapeLocation;
191}
192
193extern "C" {
194    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthdimpleright?language=objc)
195    #[cfg(feature = "objc2-foundation")]
196    pub static ARBlendShapeLocationMouthDimpleRight: &'static ARBlendShapeLocation;
197}
198
199extern "C" {
200    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthfrownleft?language=objc)
201    #[cfg(feature = "objc2-foundation")]
202    pub static ARBlendShapeLocationMouthFrownLeft: &'static ARBlendShapeLocation;
203}
204
205extern "C" {
206    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthfrownright?language=objc)
207    #[cfg(feature = "objc2-foundation")]
208    pub static ARBlendShapeLocationMouthFrownRight: &'static ARBlendShapeLocation;
209}
210
211extern "C" {
212    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthfunnel?language=objc)
213    #[cfg(feature = "objc2-foundation")]
214    pub static ARBlendShapeLocationMouthFunnel: &'static ARBlendShapeLocation;
215}
216
217extern "C" {
218    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthleft?language=objc)
219    #[cfg(feature = "objc2-foundation")]
220    pub static ARBlendShapeLocationMouthLeft: &'static ARBlendShapeLocation;
221}
222
223extern "C" {
224    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthlowerdownleft?language=objc)
225    #[cfg(feature = "objc2-foundation")]
226    pub static ARBlendShapeLocationMouthLowerDownLeft: &'static ARBlendShapeLocation;
227}
228
229extern "C" {
230    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthlowerdownright?language=objc)
231    #[cfg(feature = "objc2-foundation")]
232    pub static ARBlendShapeLocationMouthLowerDownRight: &'static ARBlendShapeLocation;
233}
234
235extern "C" {
236    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthpressleft?language=objc)
237    #[cfg(feature = "objc2-foundation")]
238    pub static ARBlendShapeLocationMouthPressLeft: &'static ARBlendShapeLocation;
239}
240
241extern "C" {
242    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthpressright?language=objc)
243    #[cfg(feature = "objc2-foundation")]
244    pub static ARBlendShapeLocationMouthPressRight: &'static ARBlendShapeLocation;
245}
246
247extern "C" {
248    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthpucker?language=objc)
249    #[cfg(feature = "objc2-foundation")]
250    pub static ARBlendShapeLocationMouthPucker: &'static ARBlendShapeLocation;
251}
252
253extern "C" {
254    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthright?language=objc)
255    #[cfg(feature = "objc2-foundation")]
256    pub static ARBlendShapeLocationMouthRight: &'static ARBlendShapeLocation;
257}
258
259extern "C" {
260    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthrolllower?language=objc)
261    #[cfg(feature = "objc2-foundation")]
262    pub static ARBlendShapeLocationMouthRollLower: &'static ARBlendShapeLocation;
263}
264
265extern "C" {
266    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthrollupper?language=objc)
267    #[cfg(feature = "objc2-foundation")]
268    pub static ARBlendShapeLocationMouthRollUpper: &'static ARBlendShapeLocation;
269}
270
271extern "C" {
272    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthshruglower?language=objc)
273    #[cfg(feature = "objc2-foundation")]
274    pub static ARBlendShapeLocationMouthShrugLower: &'static ARBlendShapeLocation;
275}
276
277extern "C" {
278    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthshrugupper?language=objc)
279    #[cfg(feature = "objc2-foundation")]
280    pub static ARBlendShapeLocationMouthShrugUpper: &'static ARBlendShapeLocation;
281}
282
283extern "C" {
284    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthsmileleft?language=objc)
285    #[cfg(feature = "objc2-foundation")]
286    pub static ARBlendShapeLocationMouthSmileLeft: &'static ARBlendShapeLocation;
287}
288
289extern "C" {
290    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthsmileright?language=objc)
291    #[cfg(feature = "objc2-foundation")]
292    pub static ARBlendShapeLocationMouthSmileRight: &'static ARBlendShapeLocation;
293}
294
295extern "C" {
296    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthstretchleft?language=objc)
297    #[cfg(feature = "objc2-foundation")]
298    pub static ARBlendShapeLocationMouthStretchLeft: &'static ARBlendShapeLocation;
299}
300
301extern "C" {
302    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthstretchright?language=objc)
303    #[cfg(feature = "objc2-foundation")]
304    pub static ARBlendShapeLocationMouthStretchRight: &'static ARBlendShapeLocation;
305}
306
307extern "C" {
308    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthupperupleft?language=objc)
309    #[cfg(feature = "objc2-foundation")]
310    pub static ARBlendShapeLocationMouthUpperUpLeft: &'static ARBlendShapeLocation;
311}
312
313extern "C" {
314    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationmouthupperupright?language=objc)
315    #[cfg(feature = "objc2-foundation")]
316    pub static ARBlendShapeLocationMouthUpperUpRight: &'static ARBlendShapeLocation;
317}
318
319extern "C" {
320    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationnosesneerleft?language=objc)
321    #[cfg(feature = "objc2-foundation")]
322    pub static ARBlendShapeLocationNoseSneerLeft: &'static ARBlendShapeLocation;
323}
324
325extern "C" {
326    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationnosesneerright?language=objc)
327    #[cfg(feature = "objc2-foundation")]
328    pub static ARBlendShapeLocationNoseSneerRight: &'static ARBlendShapeLocation;
329}
330
331extern "C" {
332    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arblendshapelocationtongueout?language=objc)
333    #[cfg(feature = "objc2-foundation")]
334    pub static ARBlendShapeLocationTongueOut: &'static ARBlendShapeLocation;
335}
336
337#[cfg(feature = "objc2")]
338extern_class!(
339    /// An anchor representing a face and its geometry.
340    ///
341    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arfaceanchor?language=objc)
342    #[unsafe(super(ARAnchor, NSObject))]
343    #[derive(Debug, PartialEq, Eq, Hash)]
344    #[cfg(all(feature = "ARAnchor", feature = "objc2"))]
345    pub struct ARFaceAnchor;
346);
347
348#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
349unsafe impl Send for ARFaceAnchor {}
350
351#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
352unsafe impl Sync for ARFaceAnchor {}
353
354#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
355unsafe impl ARAnchorCopying for ARFaceAnchor {}
356
357#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
358unsafe impl ARTrackable for ARFaceAnchor {}
359
360#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
361unsafe impl NSCoding for ARFaceAnchor {}
362
363#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
364unsafe impl NSCopying for ARFaceAnchor {}
365
366#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
367unsafe impl CopyingHelper for ARFaceAnchor {
368    type Result = Self;
369}
370
371#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
372unsafe impl NSObjectProtocol for ARFaceAnchor {}
373
374#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
375unsafe impl NSSecureCoding for ARFaceAnchor {}
376
377#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
378impl ARFaceAnchor {
379    extern_methods!(
380        #[cfg(feature = "ARFaceGeometry")]
381        /// The face geometry updated based on the computed blend shapes.
382        #[unsafe(method(geometry))]
383        #[unsafe(method_family = none)]
384        pub unsafe fn geometry(&self) -> Retained<ARFaceGeometry>;
385
386        #[cfg(feature = "objc2-foundation")]
387        /// A dictionary of blend shape coefficients for each blend shape location.
388        ///
389        /// Blend shapes coefficients define the amount of displacement of a neutral shape at a specific location on the face.
390        #[unsafe(method(blendShapes))]
391        #[unsafe(method_family = none)]
392        pub unsafe fn blendShapes(&self) -> Retained<NSDictionary<ARBlendShapeLocation, NSNumber>>;
393    );
394}
395
396/// Methods declared on superclass `ARAnchor`.
397#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
398impl ARFaceAnchor {
399    extern_methods!(
400        /// Unavailable
401        #[unsafe(method(init))]
402        #[unsafe(method_family = init)]
403        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
404
405        #[unsafe(method(new))]
406        #[unsafe(method_family = new)]
407        pub unsafe fn new() -> Retained<Self>;
408    );
409}