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        #[unsafe(method(vertexCount))]
61        #[unsafe(method_family = none)]
62        pub unsafe fn vertexCount(&self) -> NSUInteger;
63
64        /// The number of texture coordinates of the face geometry.
65        #[unsafe(method(textureCoordinateCount))]
66        #[unsafe(method_family = none)]
67        pub unsafe fn textureCoordinateCount(&self) -> NSUInteger;
68
69        /// The number of triangles of the face geometry.
70        #[unsafe(method(triangleCount))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn triangleCount(&self) -> NSUInteger;
73
74        /// The triangle indices of the geometry.
75        #[unsafe(method(triangleIndices))]
76        #[unsafe(method_family = none)]
77        pub unsafe fn triangleIndices(&self) -> NonNull<i16>;
78
79        #[cfg(all(feature = "ARFaceAnchor", feature = "objc2-foundation"))]
80        /// Creates and returns a face geometry by applying a set of given blend shape coefficients.
81        ///
82        ///
83        /// An empty dictionary can be provided to create a neutral face geometry.
84        ///
85        /// Parameter `blendShapes`: A dictionary of blend shape coefficients.
86        ///
87        /// Returns: Face geometry after applying the blend shapes.
88        #[unsafe(method(initWithBlendShapes:))]
89        #[unsafe(method_family = init)]
90        pub unsafe fn initWithBlendShapes(
91            this: Allocated<Self>,
92            blend_shapes: &NSDictionary<ARBlendShapeLocation, NSNumber>,
93        ) -> Option<Retained<Self>>;
94
95        /// Unavailable
96        #[unsafe(method(init))]
97        #[unsafe(method_family = init)]
98        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
99
100        #[unsafe(method(new))]
101        #[unsafe(method_family = new)]
102        pub unsafe fn new() -> Retained<Self>;
103    );
104}