objc2_ar_kit/generated/
ARSkeletonDefinition.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/// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointname?language=objc)
12// NS_TYPED_ENUM
13#[cfg(feature = "objc2-foundation")]
14pub type ARSkeletonJointName = NSString;
15
16extern "C" {
17    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnameroot?language=objc)
18    #[cfg(feature = "objc2-foundation")]
19    pub static ARSkeletonJointNameRoot: &'static ARSkeletonJointName;
20}
21
22extern "C" {
23    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnamehead?language=objc)
24    #[cfg(feature = "objc2-foundation")]
25    pub static ARSkeletonJointNameHead: &'static ARSkeletonJointName;
26}
27
28extern "C" {
29    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnamelefthand?language=objc)
30    #[cfg(feature = "objc2-foundation")]
31    pub static ARSkeletonJointNameLeftHand: &'static ARSkeletonJointName;
32}
33
34extern "C" {
35    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnamerighthand?language=objc)
36    #[cfg(feature = "objc2-foundation")]
37    pub static ARSkeletonJointNameRightHand: &'static ARSkeletonJointName;
38}
39
40extern "C" {
41    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnameleftfoot?language=objc)
42    #[cfg(feature = "objc2-foundation")]
43    pub static ARSkeletonJointNameLeftFoot: &'static ARSkeletonJointName;
44}
45
46extern "C" {
47    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnamerightfoot?language=objc)
48    #[cfg(feature = "objc2-foundation")]
49    pub static ARSkeletonJointNameRightFoot: &'static ARSkeletonJointName;
50}
51
52extern "C" {
53    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnameleftshoulder?language=objc)
54    #[cfg(feature = "objc2-foundation")]
55    pub static ARSkeletonJointNameLeftShoulder: &'static ARSkeletonJointName;
56}
57
58extern "C" {
59    /// [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletonjointnamerightshoulder?language=objc)
60    #[cfg(feature = "objc2-foundation")]
61    pub static ARSkeletonJointNameRightShoulder: &'static ARSkeletonJointName;
62}
63
64#[cfg(feature = "objc2")]
65extern_class!(
66    /// Definition of a skeleton.
67    ///
68    ///
69    /// A skeleton consists of a set of labeled joints that are defined in a certain hierarchy, i.e. joints are parented to other joints.
70    /// One may use the parentIndices property to identify the hierarchy for a given skeleton definition.
71    ///
72    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arskeletondefinition?language=objc)
73    #[unsafe(super(NSObject))]
74    #[derive(Debug, PartialEq, Eq, Hash)]
75    #[cfg(feature = "objc2")]
76    pub struct ARSkeletonDefinition;
77);
78
79#[cfg(feature = "objc2")]
80unsafe impl Send for ARSkeletonDefinition {}
81
82#[cfg(feature = "objc2")]
83unsafe impl Sync for ARSkeletonDefinition {}
84
85#[cfg(feature = "objc2")]
86extern_conformance!(
87    unsafe impl NSObjectProtocol for ARSkeletonDefinition {}
88);
89
90#[cfg(feature = "objc2")]
91impl ARSkeletonDefinition {
92    extern_methods!(
93        /// Default skeleton definition for bodies defined in 3D.
94        ///
95        /// Note: The default height of this skeleton, measured from lowest to highest joint in standing position, is defined to be 1.71 meters.
96        ///
97        /// See: ARSkeleton3D
98        #[unsafe(method(defaultBody3DSkeletonDefinition))]
99        #[unsafe(method_family = none)]
100        pub unsafe fn defaultBody3DSkeletonDefinition() -> Retained<ARSkeletonDefinition>;
101
102        /// Default skeleton definition for bodies defined in 2D.
103        ///
104        /// See: ARBody2D
105        #[unsafe(method(defaultBody2DSkeletonDefinition))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn defaultBody2DSkeletonDefinition() -> Retained<ARSkeletonDefinition>;
108
109        /// The number of joints.
110        #[unsafe(method(jointCount))]
111        #[unsafe(method_family = none)]
112        pub unsafe fn jointCount(&self) -> NSUInteger;
113
114        #[cfg(feature = "objc2-foundation")]
115        /// The joint names.
116        #[unsafe(method(jointNames))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn jointNames(&self) -> Retained<NSArray<NSString>>;
119
120        #[cfg(feature = "objc2-foundation")]
121        /// The parent index for each joint.
122        ///
123        /// This property may be used to identify the hierarchical dependency between joints. If a line is drawn for every joint and its parent joint
124        /// the result is a visualization of the underlying skeleton. The joint with no parent is denoted as the root joint. The root joint's parent index has
125        /// a value of -1.
126        #[unsafe(method(parentIndices))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn parentIndices(&self) -> Retained<NSArray<NSNumber>>;
129
130        #[cfg(feature = "ARSkeleton")]
131        /// The 3D skeleton in neutral pose.
132        ///
133        /// The neutral skeleton pose assumes a standardized size of the skeleton in meters. The neutral pose is defined as the skeleton's T-pose.
134        #[unsafe(method(neutralBodySkeleton3D))]
135        #[unsafe(method_family = none)]
136        pub unsafe fn neutralBodySkeleton3D(&self) -> Option<Retained<ARSkeleton3D>>;
137
138        #[cfg(feature = "objc2-foundation")]
139        /// Returns the index for a given joint identifier.
140        ///
141        ///
142        /// Parameter `jointName`: Name of a given joint.
143        ///
144        /// This function returns NSNotFound if an invalid joint name is passed.
145        ///
146        /// Returns: Joint index.
147        #[unsafe(method(indexForJointName:))]
148        #[unsafe(method_family = none)]
149        pub unsafe fn indexForJointName(&self, joint_name: &ARSkeletonJointName) -> NSUInteger;
150
151        /// Unavailable
152        #[unsafe(method(init))]
153        #[unsafe(method_family = init)]
154        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
155
156        #[unsafe(method(new))]
157        #[unsafe(method_family = new)]
158        pub unsafe fn new() -> Retained<Self>;
159    );
160}