objc2_model_io/generated/
MDLAnimation.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlskeleton?language=objc)
12    #[unsafe(super(MDLObject, NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    #[cfg(feature = "MDLObject")]
15    pub struct MDLSkeleton;
16);
17
18#[cfg(all(feature = "MDLObject", feature = "MDLTypes"))]
19unsafe impl MDLNamed for MDLSkeleton {}
20
21#[cfg(feature = "MDLObject")]
22unsafe impl NSCopying for MDLSkeleton {}
23
24#[cfg(feature = "MDLObject")]
25unsafe impl CopyingHelper for MDLSkeleton {
26    type Result = Self;
27}
28
29#[cfg(feature = "MDLObject")]
30unsafe impl NSObjectProtocol for MDLSkeleton {}
31
32#[cfg(feature = "MDLObject")]
33impl MDLSkeleton {
34    extern_methods!(
35        #[unsafe(method(jointPaths))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn jointPaths(&self) -> Retained<NSArray<NSString>>;
38
39        #[cfg(feature = "MDLValueTypes")]
40        #[unsafe(method(jointBindTransforms))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn jointBindTransforms(&self) -> Retained<MDLMatrix4x4Array>;
43
44        #[cfg(feature = "MDLValueTypes")]
45        #[unsafe(method(jointRestTransforms))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn jointRestTransforms(&self) -> Retained<MDLMatrix4x4Array>;
48
49        #[unsafe(method(initWithName:jointPaths:))]
50        #[unsafe(method_family = init)]
51        pub unsafe fn initWithName_jointPaths(
52            this: Allocated<Self>,
53            name: &NSString,
54            joint_paths: &NSArray<NSString>,
55        ) -> Retained<Self>;
56    );
57}
58
59/// Methods declared on superclass `NSObject`.
60#[cfg(feature = "MDLObject")]
61impl MDLSkeleton {
62    extern_methods!(
63        #[unsafe(method(init))]
64        #[unsafe(method_family = init)]
65        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
66
67        #[unsafe(method(new))]
68        #[unsafe(method_family = new)]
69        pub unsafe fn new() -> Retained<Self>;
70    );
71}
72
73extern_protocol!(
74    /// [Apple's documentation](https://developer.apple.com/documentation/modelio/mdljointanimation?language=objc)
75    pub unsafe trait MDLJointAnimation {}
76);
77
78extern_class!(
79    /// [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlpackedjointanimation?language=objc)
80    #[unsafe(super(MDLObject, NSObject))]
81    #[derive(Debug, PartialEq, Eq, Hash)]
82    #[cfg(feature = "MDLObject")]
83    pub struct MDLPackedJointAnimation;
84);
85
86#[cfg(feature = "MDLObject")]
87unsafe impl MDLJointAnimation for MDLPackedJointAnimation {}
88
89#[cfg(all(feature = "MDLObject", feature = "MDLTypes"))]
90unsafe impl MDLNamed for MDLPackedJointAnimation {}
91
92#[cfg(feature = "MDLObject")]
93unsafe impl NSCopying for MDLPackedJointAnimation {}
94
95#[cfg(feature = "MDLObject")]
96unsafe impl CopyingHelper for MDLPackedJointAnimation {
97    type Result = Self;
98}
99
100#[cfg(feature = "MDLObject")]
101unsafe impl NSObjectProtocol for MDLPackedJointAnimation {}
102
103#[cfg(feature = "MDLObject")]
104impl MDLPackedJointAnimation {
105    extern_methods!(
106        #[unsafe(method(jointPaths))]
107        #[unsafe(method_family = none)]
108        pub unsafe fn jointPaths(&self) -> Retained<NSArray<NSString>>;
109
110        #[cfg(feature = "MDLAnimatedValueTypes")]
111        #[unsafe(method(translations))]
112        #[unsafe(method_family = none)]
113        pub unsafe fn translations(&self) -> Retained<MDLAnimatedVector3Array>;
114
115        #[cfg(feature = "MDLAnimatedValueTypes")]
116        #[unsafe(method(rotations))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn rotations(&self) -> Retained<MDLAnimatedQuaternionArray>;
119
120        #[cfg(feature = "MDLAnimatedValueTypes")]
121        #[unsafe(method(scales))]
122        #[unsafe(method_family = none)]
123        pub unsafe fn scales(&self) -> Retained<MDLAnimatedVector3Array>;
124
125        #[unsafe(method(initWithName:jointPaths:))]
126        #[unsafe(method_family = init)]
127        pub unsafe fn initWithName_jointPaths(
128            this: Allocated<Self>,
129            name: &NSString,
130            joint_paths: &NSArray<NSString>,
131        ) -> Retained<Self>;
132    );
133}
134
135/// Methods declared on superclass `NSObject`.
136#[cfg(feature = "MDLObject")]
137impl MDLPackedJointAnimation {
138    extern_methods!(
139        #[unsafe(method(init))]
140        #[unsafe(method_family = init)]
141        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
142
143        #[unsafe(method(new))]
144        #[unsafe(method_family = new)]
145        pub unsafe fn new() -> Retained<Self>;
146    );
147}
148
149extern_class!(
150    /// [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlanimationbindcomponent?language=objc)
151    #[unsafe(super(NSObject))]
152    #[derive(Debug, PartialEq, Eq, Hash)]
153    pub struct MDLAnimationBindComponent;
154);
155
156#[cfg(feature = "MDLTypes")]
157unsafe impl MDLComponent for MDLAnimationBindComponent {}
158
159unsafe impl NSCopying for MDLAnimationBindComponent {}
160
161unsafe impl CopyingHelper for MDLAnimationBindComponent {
162    type Result = Self;
163}
164
165unsafe impl NSObjectProtocol for MDLAnimationBindComponent {}
166
167impl MDLAnimationBindComponent {
168    extern_methods!(
169        #[cfg(feature = "MDLObject")]
170        #[unsafe(method(skeleton))]
171        #[unsafe(method_family = none)]
172        pub unsafe fn skeleton(&self) -> Option<Retained<MDLSkeleton>>;
173
174        #[cfg(feature = "MDLObject")]
175        /// Setter for [`skeleton`][Self::skeleton].
176        #[unsafe(method(setSkeleton:))]
177        #[unsafe(method_family = none)]
178        pub unsafe fn setSkeleton(&self, skeleton: Option<&MDLSkeleton>);
179
180        #[unsafe(method(jointAnimation))]
181        #[unsafe(method_family = none)]
182        pub unsafe fn jointAnimation(
183            &self,
184        ) -> Option<Retained<ProtocolObject<dyn MDLJointAnimation>>>;
185
186        /// Setter for [`jointAnimation`][Self::jointAnimation].
187        #[unsafe(method(setJointAnimation:))]
188        #[unsafe(method_family = none)]
189        pub unsafe fn setJointAnimation(
190            &self,
191            joint_animation: Option<&ProtocolObject<dyn MDLJointAnimation>>,
192        );
193
194        #[unsafe(method(jointPaths))]
195        #[unsafe(method_family = none)]
196        pub unsafe fn jointPaths(&self) -> Option<Retained<NSArray<NSString>>>;
197
198        /// Setter for [`jointPaths`][Self::jointPaths].
199        #[unsafe(method(setJointPaths:))]
200        #[unsafe(method_family = none)]
201        pub unsafe fn setJointPaths(&self, joint_paths: Option<&NSArray<NSString>>);
202    );
203}
204
205/// Methods declared on superclass `NSObject`.
206impl MDLAnimationBindComponent {
207    extern_methods!(
208        #[unsafe(method(init))]
209        #[unsafe(method_family = init)]
210        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
211
212        #[unsafe(method(new))]
213        #[unsafe(method_family = new)]
214        pub unsafe fn new() -> Retained<Self>;
215    );
216}