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