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"))]
32unsafe impl NSCoding for ARFaceGeometry {}
33
34#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
35unsafe impl NSCopying for ARFaceGeometry {}
36
37#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
38unsafe impl CopyingHelper for ARFaceGeometry {
39    type Result = Self;
40}
41
42#[cfg(feature = "objc2")]
43unsafe impl NSObjectProtocol for ARFaceGeometry {}
44
45#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
46unsafe impl NSSecureCoding for ARFaceGeometry {}
47
48#[cfg(feature = "objc2")]
49impl ARFaceGeometry {
50    extern_methods!(
51        /// The number of mesh vertices of the geometry.
52        #[unsafe(method(vertexCount))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn vertexCount(&self) -> NSUInteger;
55
56        /// The number of texture coordinates of the face geometry.
57        #[unsafe(method(textureCoordinateCount))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn textureCoordinateCount(&self) -> NSUInteger;
60
61        /// The number of triangles of the face geometry.
62        #[unsafe(method(triangleCount))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn triangleCount(&self) -> NSUInteger;
65
66        /// The triangle indices of the geometry.
67        #[unsafe(method(triangleIndices))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn triangleIndices(&self) -> NonNull<i16>;
70
71        #[cfg(all(feature = "ARFaceAnchor", feature = "objc2-foundation"))]
72        /// Creates and returns a face geometry by applying a set of given blend shape coefficients.
73        ///
74        ///
75        /// An empty dictionary can be provided to create a neutral face geometry.
76        ///
77        /// Parameter `blendShapes`: A dictionary of blend shape coefficients.
78        ///
79        /// Returns: Face geometry after applying the blend shapes.
80        #[unsafe(method(initWithBlendShapes:))]
81        #[unsafe(method_family = init)]
82        pub unsafe fn initWithBlendShapes(
83            this: Allocated<Self>,
84            blend_shapes: &NSDictionary<ARBlendShapeLocation, NSNumber>,
85        ) -> Option<Retained<Self>>;
86
87        /// Unavailable
88        #[unsafe(method(init))]
89        #[unsafe(method_family = init)]
90        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
91
92        #[unsafe(method(new))]
93        #[unsafe(method_family = new)]
94        pub unsafe fn new() -> Retained<Self>;
95    );
96}