objc2_ar_kit/generated/
ARFaceGeometry.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#[cfg(feature = "objc2")]
12extern_class!(
13    /// An object representing the geometry of a face.
14    ///
15    /// The face geometry will have a constant number of triangles
16    /// and vertices, updating only the vertex positions from frame to frame.
17    ///
18    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arfacegeometry?language=objc)
19    #[unsafe(super(NSObject))]
20    #[derive(Debug, PartialEq, Eq, Hash)]
21    #[cfg(feature = "objc2")]
22    pub struct ARFaceGeometry;
23);
24
25#[cfg(feature = "objc2")]
26unsafe impl Send for ARFaceGeometry {}
27
28#[cfg(feature = "objc2")]
29unsafe impl Sync for ARFaceGeometry {}
30
31#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
32extern_conformance!(
33    unsafe impl NSCoding for ARFaceGeometry {}
34);
35
36#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
37extern_conformance!(
38    unsafe impl NSCopying for ARFaceGeometry {}
39);
40
41#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
42unsafe impl CopyingHelper for ARFaceGeometry {
43    type Result = Self;
44}
45
46#[cfg(feature = "objc2")]
47extern_conformance!(
48    unsafe impl NSObjectProtocol for ARFaceGeometry {}
49);
50
51#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
52extern_conformance!(
53    unsafe impl NSSecureCoding for ARFaceGeometry {}
54);
55
56#[cfg(feature = "objc2")]
57impl ARFaceGeometry {
58    extern_methods!(
59        /// The number of mesh vertices of the geometry.
60        ///
61        /// This property is not atomic.
62        ///
63        /// # Safety
64        ///
65        /// This might not be thread-safe.
66        #[unsafe(method(vertexCount))]
67        #[unsafe(method_family = none)]
68        pub unsafe fn vertexCount(&self) -> NSUInteger;
69
70        /// The number of texture coordinates of the face geometry.
71        ///
72        /// This property is not atomic.
73        ///
74        /// # Safety
75        ///
76        /// This might not be thread-safe.
77        #[unsafe(method(textureCoordinateCount))]
78        #[unsafe(method_family = none)]
79        pub unsafe fn textureCoordinateCount(&self) -> NSUInteger;
80
81        /// The number of triangles of the face geometry.
82        ///
83        /// This property is not atomic.
84        ///
85        /// # Safety
86        ///
87        /// This might not be thread-safe.
88        #[unsafe(method(triangleCount))]
89        #[unsafe(method_family = none)]
90        pub unsafe fn triangleCount(&self) -> NSUInteger;
91
92        /// The triangle indices of the geometry.
93        ///
94        /// This property is not atomic.
95        ///
96        /// # Safety
97        ///
98        /// This might not be thread-safe.
99        #[unsafe(method(triangleIndices))]
100        #[unsafe(method_family = none)]
101        pub unsafe fn triangleIndices(&self) -> NonNull<i16>;
102
103        #[cfg(all(feature = "ARFaceAnchor", feature = "objc2-foundation"))]
104        /// Creates and returns a face geometry by applying a set of given blend shape coefficients.
105        ///
106        ///
107        /// An empty dictionary can be provided to create a neutral face geometry.
108        ///
109        /// Parameter `blendShapes`: A dictionary of blend shape coefficients.
110        ///
111        /// Returns: Face geometry after applying the blend shapes.
112        #[unsafe(method(initWithBlendShapes:))]
113        #[unsafe(method_family = init)]
114        pub unsafe fn initWithBlendShapes(
115            this: Allocated<Self>,
116            blend_shapes: &NSDictionary<ARBlendShapeLocation, NSNumber>,
117        ) -> Option<Retained<Self>>;
118
119        /// Unavailable
120        #[unsafe(method(init))]
121        #[unsafe(method_family = init)]
122        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
123
124        #[unsafe(method(new))]
125        #[unsafe(method_family = new)]
126        pub unsafe fn new() -> Retained<Self>;
127    );
128}