objc2_model_io/generated/
MDLAnimation.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[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"))]
19extern_conformance!(
20 unsafe impl MDLNamed for MDLSkeleton {}
21);
22
23#[cfg(feature = "MDLObject")]
24extern_conformance!(
25 unsafe impl NSCopying for MDLSkeleton {}
26);
27
28#[cfg(feature = "MDLObject")]
29unsafe impl CopyingHelper for MDLSkeleton {
30 type Result = Self;
31}
32
33#[cfg(feature = "MDLObject")]
34extern_conformance!(
35 unsafe impl NSObjectProtocol for MDLSkeleton {}
36);
37
38#[cfg(feature = "MDLObject")]
39impl MDLSkeleton {
40 extern_methods!(
41 #[unsafe(method(jointPaths))]
42 #[unsafe(method_family = none)]
43 pub unsafe fn jointPaths(&self) -> Retained<NSArray<NSString>>;
44
45 #[cfg(feature = "MDLValueTypes")]
46 #[unsafe(method(jointBindTransforms))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn jointBindTransforms(&self) -> Retained<MDLMatrix4x4Array>;
49
50 #[cfg(feature = "MDLValueTypes")]
51 #[unsafe(method(jointRestTransforms))]
52 #[unsafe(method_family = none)]
53 pub unsafe fn jointRestTransforms(&self) -> Retained<MDLMatrix4x4Array>;
54
55 #[unsafe(method(initWithName:jointPaths:))]
56 #[unsafe(method_family = init)]
57 pub unsafe fn initWithName_jointPaths(
58 this: Allocated<Self>,
59 name: &NSString,
60 joint_paths: &NSArray<NSString>,
61 ) -> Retained<Self>;
62 );
63}
64
65#[cfg(feature = "MDLObject")]
67impl MDLSkeleton {
68 extern_methods!(
69 #[unsafe(method(init))]
70 #[unsafe(method_family = init)]
71 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
72
73 #[unsafe(method(new))]
74 #[unsafe(method_family = new)]
75 pub unsafe fn new() -> Retained<Self>;
76 );
77}
78
79extern_protocol!(
80 pub unsafe trait MDLJointAnimation {}
82);
83
84extern_class!(
85 #[unsafe(super(MDLObject, NSObject))]
87 #[derive(Debug, PartialEq, Eq, Hash)]
88 #[cfg(feature = "MDLObject")]
89 pub struct MDLPackedJointAnimation;
90);
91
92#[cfg(feature = "MDLObject")]
93extern_conformance!(
94 unsafe impl MDLJointAnimation for MDLPackedJointAnimation {}
95);
96
97#[cfg(all(feature = "MDLObject", feature = "MDLTypes"))]
98extern_conformance!(
99 unsafe impl MDLNamed for MDLPackedJointAnimation {}
100);
101
102#[cfg(feature = "MDLObject")]
103extern_conformance!(
104 unsafe impl NSCopying for MDLPackedJointAnimation {}
105);
106
107#[cfg(feature = "MDLObject")]
108unsafe impl CopyingHelper for MDLPackedJointAnimation {
109 type Result = Self;
110}
111
112#[cfg(feature = "MDLObject")]
113extern_conformance!(
114 unsafe impl NSObjectProtocol for MDLPackedJointAnimation {}
115);
116
117#[cfg(feature = "MDLObject")]
118impl MDLPackedJointAnimation {
119 extern_methods!(
120 #[unsafe(method(jointPaths))]
121 #[unsafe(method_family = none)]
122 pub unsafe fn jointPaths(&self) -> Retained<NSArray<NSString>>;
123
124 #[cfg(feature = "MDLAnimatedValueTypes")]
125 #[unsafe(method(translations))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn translations(&self) -> Retained<MDLAnimatedVector3Array>;
128
129 #[cfg(feature = "MDLAnimatedValueTypes")]
130 #[unsafe(method(rotations))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn rotations(&self) -> Retained<MDLAnimatedQuaternionArray>;
133
134 #[cfg(feature = "MDLAnimatedValueTypes")]
135 #[unsafe(method(scales))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn scales(&self) -> Retained<MDLAnimatedVector3Array>;
138
139 #[unsafe(method(initWithName:jointPaths:))]
140 #[unsafe(method_family = init)]
141 pub unsafe fn initWithName_jointPaths(
142 this: Allocated<Self>,
143 name: &NSString,
144 joint_paths: &NSArray<NSString>,
145 ) -> Retained<Self>;
146 );
147}
148
149#[cfg(feature = "MDLObject")]
151impl MDLPackedJointAnimation {
152 extern_methods!(
153 #[unsafe(method(init))]
154 #[unsafe(method_family = init)]
155 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
156
157 #[unsafe(method(new))]
158 #[unsafe(method_family = new)]
159 pub unsafe fn new() -> Retained<Self>;
160 );
161}
162
163extern_class!(
164 #[unsafe(super(NSObject))]
166 #[derive(Debug, PartialEq, Eq, Hash)]
167 pub struct MDLAnimationBindComponent;
168);
169
170#[cfg(feature = "MDLTypes")]
171extern_conformance!(
172 unsafe impl MDLComponent for MDLAnimationBindComponent {}
173);
174
175extern_conformance!(
176 unsafe impl NSCopying for MDLAnimationBindComponent {}
177);
178
179unsafe impl CopyingHelper for MDLAnimationBindComponent {
180 type Result = Self;
181}
182
183extern_conformance!(
184 unsafe impl NSObjectProtocol for MDLAnimationBindComponent {}
185);
186
187impl MDLAnimationBindComponent {
188 extern_methods!(
189 #[cfg(feature = "MDLObject")]
190 #[unsafe(method(skeleton))]
191 #[unsafe(method_family = none)]
192 pub unsafe fn skeleton(&self) -> Option<Retained<MDLSkeleton>>;
193
194 #[cfg(feature = "MDLObject")]
195 #[unsafe(method(setSkeleton:))]
197 #[unsafe(method_family = none)]
198 pub unsafe fn setSkeleton(&self, skeleton: Option<&MDLSkeleton>);
199
200 #[unsafe(method(jointAnimation))]
201 #[unsafe(method_family = none)]
202 pub unsafe fn jointAnimation(
203 &self,
204 ) -> Option<Retained<ProtocolObject<dyn MDLJointAnimation>>>;
205
206 #[unsafe(method(setJointAnimation:))]
208 #[unsafe(method_family = none)]
209 pub unsafe fn setJointAnimation(
210 &self,
211 joint_animation: Option<&ProtocolObject<dyn MDLJointAnimation>>,
212 );
213
214 #[unsafe(method(jointPaths))]
215 #[unsafe(method_family = none)]
216 pub unsafe fn jointPaths(&self) -> Option<Retained<NSArray<NSString>>>;
217
218 #[unsafe(method(setJointPaths:))]
220 #[unsafe(method_family = none)]
221 pub unsafe fn setJointPaths(&self, joint_paths: Option<&NSArray<NSString>>);
222 );
223}
224
225impl MDLAnimationBindComponent {
227 extern_methods!(
228 #[unsafe(method(init))]
229 #[unsafe(method_family = init)]
230 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
231
232 #[unsafe(method(new))]
233 #[unsafe(method_family = new)]
234 pub unsafe fn new() -> Retained<Self>;
235 );
236}