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")]
86unsafe impl NSObjectProtocol for ARSkeletonDefinition {}
87
88#[cfg(feature = "objc2")]
89impl ARSkeletonDefinition {
90    extern_methods!(
91        /// Default skeleton definition for bodies defined in 3D.
92        ///
93        /// Note: The default height of this skeleton, measured from lowest to highest joint in standing position, is defined to be 1.71 meters.
94        ///
95        /// See: ARSkeleton3D
96        #[unsafe(method(defaultBody3DSkeletonDefinition))]
97        #[unsafe(method_family = none)]
98        pub unsafe fn defaultBody3DSkeletonDefinition() -> Retained<ARSkeletonDefinition>;
99
100        /// Default skeleton definition for bodies defined in 2D.
101        ///
102        /// See: ARBody2D
103        #[unsafe(method(defaultBody2DSkeletonDefinition))]
104        #[unsafe(method_family = none)]
105        pub unsafe fn defaultBody2DSkeletonDefinition() -> Retained<ARSkeletonDefinition>;
106
107        /// The number of joints.
108        #[unsafe(method(jointCount))]
109        #[unsafe(method_family = none)]
110        pub unsafe fn jointCount(&self) -> NSUInteger;
111
112        #[cfg(feature = "objc2-foundation")]
113        /// The joint names.
114        #[unsafe(method(jointNames))]
115        #[unsafe(method_family = none)]
116        pub unsafe fn jointNames(&self) -> Retained<NSArray<NSString>>;
117
118        #[cfg(feature = "objc2-foundation")]
119        /// The parent index for each joint.
120        ///
121        /// This property may be used to identify the hierarchical dependency between joints. If a line is drawn for every joint and its parent joint
122        /// 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
123        /// a value of -1.
124        #[unsafe(method(parentIndices))]
125        #[unsafe(method_family = none)]
126        pub unsafe fn parentIndices(&self) -> Retained<NSArray<NSNumber>>;
127
128        #[cfg(feature = "ARSkeleton")]
129        /// The 3D skeleton in neutral pose.
130        ///
131        /// The neutral skeleton pose assumes a standardized size of the skeleton in meters. The neutral pose is defined as the skeleton's T-pose.
132        #[unsafe(method(neutralBodySkeleton3D))]
133        #[unsafe(method_family = none)]
134        pub unsafe fn neutralBodySkeleton3D(&self) -> Option<Retained<ARSkeleton3D>>;
135
136        #[cfg(feature = "objc2-foundation")]
137        /// Returns the index for a given joint identifier.
138        ///
139        ///
140        /// Parameter `jointName`: Name of a given joint.
141        ///
142        /// This function returns NSNotFound if an invalid joint name is passed.
143        ///
144        /// Returns: Joint index.
145        #[unsafe(method(indexForJointName:))]
146        #[unsafe(method_family = none)]
147        pub unsafe fn indexForJointName(&self, joint_name: &ARSkeletonJointName) -> NSUInteger;
148
149        /// Unavailable
150        #[unsafe(method(init))]
151        #[unsafe(method_family = init)]
152        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
153
154        #[unsafe(method(new))]
155        #[unsafe(method_family = new)]
156        pub unsafe fn new() -> Retained<Self>;
157    );
158}