objc2_scene_kit/generated/
ModelIO.rs1use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5#[cfg(feature = "objc2-model-io")]
6#[cfg(not(target_os = "watchos"))]
7use objc2_model_io::*;
8
9use crate::*;
10
11#[cfg(feature = "SCNScene")]
17impl SCNScene {
18 extern_methods!(
19 #[cfg(feature = "objc2-model-io")]
20 #[cfg(not(target_os = "watchos"))]
21 #[unsafe(method(sceneWithMDLAsset:))]
22 #[unsafe(method_family = none)]
23 pub unsafe fn sceneWithMDLAsset(mdl_asset: &MDLAsset) -> Retained<Self>;
24 );
25}
26
27mod private_MDLAssetSCNModelIO {
28 pub trait Sealed {}
29}
30
31#[doc(alias = "SCNModelIO")]
33pub unsafe trait MDLAssetSCNModelIO:
34 ClassType + Sized + private_MDLAssetSCNModelIO::Sealed
35{
36 extern_methods!(
37 #[cfg(feature = "SCNScene")]
38 #[unsafe(method(assetWithSCNScene:))]
39 #[unsafe(method_family = none)]
40 unsafe fn assetWithSCNScene(scn_scene: &SCNScene) -> Retained<Self>;
41
42 #[cfg(all(feature = "SCNScene", feature = "objc2-model-io"))]
43 #[cfg(not(target_os = "watchos"))]
44 #[unsafe(method(assetWithSCNScene:bufferAllocator:))]
45 #[unsafe(method_family = none)]
46 unsafe fn assetWithSCNScene_bufferAllocator(
47 scn_scene: &SCNScene,
48 buffer_allocator: Option<&ProtocolObject<dyn MDLMeshBufferAllocator>>,
49 ) -> Retained<Self>;
50 );
51}
52
53#[cfg(feature = "objc2-model-io")]
54#[cfg(not(target_os = "watchos"))]
55impl private_MDLAssetSCNModelIO::Sealed for MDLAsset {}
56#[cfg(feature = "objc2-model-io")]
57#[cfg(not(target_os = "watchos"))]
58unsafe impl MDLAssetSCNModelIO for MDLAsset {}
59
60#[cfg(feature = "SCNNode")]
62impl SCNNode {
63 extern_methods!(
64 #[cfg(feature = "objc2-model-io")]
65 #[cfg(not(target_os = "watchos"))]
66 #[unsafe(method(nodeWithMDLObject:))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn nodeWithMDLObject(mdl_object: &MDLObject) -> Retained<Self>;
69 );
70}
71
72mod private_MDLObjectSCNModelIO {
73 pub trait Sealed {}
74}
75
76#[doc(alias = "SCNModelIO")]
78pub unsafe trait MDLObjectSCNModelIO:
79 ClassType + Sized + private_MDLObjectSCNModelIO::Sealed
80{
81 extern_methods!(
82 #[cfg(feature = "SCNNode")]
83 #[unsafe(method(objectWithSCNNode:))]
84 #[unsafe(method_family = none)]
85 unsafe fn objectWithSCNNode(scn_node: &SCNNode) -> Retained<Self>;
86
87 #[cfg(all(feature = "SCNNode", feature = "objc2-model-io"))]
88 #[cfg(not(target_os = "watchos"))]
89 #[unsafe(method(objectWithSCNNode:bufferAllocator:))]
90 #[unsafe(method_family = none)]
91 unsafe fn objectWithSCNNode_bufferAllocator(
92 scn_node: &SCNNode,
93 buffer_allocator: Option<&ProtocolObject<dyn MDLMeshBufferAllocator>>,
94 ) -> Retained<Self>;
95 );
96}
97
98#[cfg(feature = "objc2-model-io")]
99#[cfg(not(target_os = "watchos"))]
100impl private_MDLObjectSCNModelIO::Sealed for MDLObject {}
101#[cfg(feature = "objc2-model-io")]
102#[cfg(not(target_os = "watchos"))]
103unsafe impl MDLObjectSCNModelIO for MDLObject {}
104
105#[cfg(feature = "SCNGeometry")]
107impl SCNGeometry {
108 extern_methods!(
109 #[cfg(feature = "objc2-model-io")]
110 #[cfg(not(target_os = "watchos"))]
111 #[unsafe(method(geometryWithMDLMesh:))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn geometryWithMDLMesh(mdl_mesh: &MDLMesh) -> Retained<Self>;
114 );
115}
116
117mod private_MDLMeshSCNModelIO {
118 pub trait Sealed {}
119}
120
121#[doc(alias = "SCNModelIO")]
123pub unsafe trait MDLMeshSCNModelIO:
124 ClassType + Sized + private_MDLMeshSCNModelIO::Sealed
125{
126 extern_methods!(
127 #[cfg(feature = "SCNGeometry")]
128 #[unsafe(method(meshWithSCNGeometry:))]
129 #[unsafe(method_family = none)]
130 unsafe fn meshWithSCNGeometry(scn_geometry: &SCNGeometry) -> Retained<Self>;
131
132 #[cfg(all(feature = "SCNGeometry", feature = "objc2-model-io"))]
133 #[cfg(not(target_os = "watchos"))]
134 #[unsafe(method(meshWithSCNGeometry:bufferAllocator:))]
135 #[unsafe(method_family = none)]
136 unsafe fn meshWithSCNGeometry_bufferAllocator(
137 scn_geometry: &SCNGeometry,
138 buffer_allocator: Option<&ProtocolObject<dyn MDLMeshBufferAllocator>>,
139 ) -> Retained<Self>;
140 );
141}
142
143#[cfg(feature = "objc2-model-io")]
144#[cfg(not(target_os = "watchos"))]
145impl private_MDLMeshSCNModelIO::Sealed for MDLMesh {}
146#[cfg(feature = "objc2-model-io")]
147#[cfg(not(target_os = "watchos"))]
148unsafe impl MDLMeshSCNModelIO for MDLMesh {}
149
150#[cfg(feature = "SCNGeometry")]
152impl SCNGeometryElement {
153 extern_methods!(
154 #[cfg(feature = "objc2-model-io")]
155 #[cfg(not(target_os = "watchos"))]
156 #[unsafe(method(geometryElementWithMDLSubmesh:))]
157 #[unsafe(method_family = none)]
158 pub unsafe fn geometryElementWithMDLSubmesh(mdl_sub_mesh: &MDLSubmesh) -> Retained<Self>;
159 );
160}
161
162mod private_MDLSubmeshSCNModelIO {
163 pub trait Sealed {}
164}
165
166#[doc(alias = "SCNModelIO")]
168pub unsafe trait MDLSubmeshSCNModelIO:
169 ClassType + Sized + private_MDLSubmeshSCNModelIO::Sealed
170{
171 extern_methods!(
172 #[cfg(feature = "SCNGeometry")]
173 #[unsafe(method(submeshWithSCNGeometryElement:))]
174 #[unsafe(method_family = none)]
175 unsafe fn submeshWithSCNGeometryElement(
176 scn_geometry_element: &SCNGeometryElement,
177 ) -> Retained<Self>;
178
179 #[cfg(all(feature = "SCNGeometry", feature = "objc2-model-io"))]
180 #[cfg(not(target_os = "watchos"))]
181 #[unsafe(method(submeshWithSCNGeometryElement:bufferAllocator:))]
182 #[unsafe(method_family = none)]
183 unsafe fn submeshWithSCNGeometryElement_bufferAllocator(
184 scn_geometry_element: &SCNGeometryElement,
185 buffer_allocator: Option<&ProtocolObject<dyn MDLMeshBufferAllocator>>,
186 ) -> Retained<Self>;
187 );
188}
189
190#[cfg(feature = "objc2-model-io")]
191#[cfg(not(target_os = "watchos"))]
192impl private_MDLSubmeshSCNModelIO::Sealed for MDLSubmesh {}
193#[cfg(feature = "objc2-model-io")]
194#[cfg(not(target_os = "watchos"))]
195unsafe impl MDLSubmeshSCNModelIO for MDLSubmesh {}
196
197#[cfg(feature = "SCNMaterial")]
199impl SCNMaterial {
200 extern_methods!(
201 #[cfg(feature = "objc2-model-io")]
202 #[cfg(not(target_os = "watchos"))]
203 #[unsafe(method(materialWithMDLMaterial:))]
204 #[unsafe(method_family = none)]
205 pub unsafe fn materialWithMDLMaterial(mdl_material: &MDLMaterial) -> Retained<Self>;
206 );
207}
208
209mod private_MDLMaterialSCNModelIO {
210 pub trait Sealed {}
211}
212
213#[doc(alias = "SCNModelIO")]
215pub unsafe trait MDLMaterialSCNModelIO:
216 ClassType + Sized + private_MDLMaterialSCNModelIO::Sealed
217{
218 extern_methods!(
219 #[cfg(feature = "SCNMaterial")]
220 #[unsafe(method(materialWithSCNMaterial:))]
221 #[unsafe(method_family = none)]
222 unsafe fn materialWithSCNMaterial(scn_material: &SCNMaterial) -> Retained<Self>;
223 );
224}
225
226#[cfg(feature = "objc2-model-io")]
227#[cfg(not(target_os = "watchos"))]
228impl private_MDLMaterialSCNModelIO::Sealed for MDLMaterial {}
229#[cfg(feature = "objc2-model-io")]
230#[cfg(not(target_os = "watchos"))]
231unsafe impl MDLMaterialSCNModelIO for MDLMaterial {}
232
233#[cfg(feature = "SCNLight")]
235impl SCNLight {
236 extern_methods!(
237 #[cfg(feature = "objc2-model-io")]
238 #[cfg(not(target_os = "watchos"))]
239 #[unsafe(method(lightWithMDLLight:))]
240 #[unsafe(method_family = none)]
241 pub unsafe fn lightWithMDLLight(mdl_light: &MDLLight) -> Retained<Self>;
242 );
243}
244
245mod private_MDLLightSCNModelIO {
246 pub trait Sealed {}
247}
248
249#[doc(alias = "SCNModelIO")]
251pub unsafe trait MDLLightSCNModelIO:
252 ClassType + Sized + private_MDLLightSCNModelIO::Sealed
253{
254 extern_methods!(
255 #[cfg(feature = "SCNLight")]
256 #[unsafe(method(lightWithSCNLight:))]
257 #[unsafe(method_family = none)]
258 unsafe fn lightWithSCNLight(scn_light: &SCNLight) -> Retained<Self>;
259 );
260}
261
262#[cfg(feature = "objc2-model-io")]
263#[cfg(not(target_os = "watchos"))]
264impl private_MDLLightSCNModelIO::Sealed for MDLLight {}
265#[cfg(feature = "objc2-model-io")]
266#[cfg(not(target_os = "watchos"))]
267unsafe impl MDLLightSCNModelIO for MDLLight {}
268
269#[cfg(feature = "SCNCamera")]
271impl SCNCamera {
272 extern_methods!(
273 #[cfg(feature = "objc2-model-io")]
274 #[cfg(not(target_os = "watchos"))]
275 #[unsafe(method(cameraWithMDLCamera:))]
276 #[unsafe(method_family = none)]
277 pub unsafe fn cameraWithMDLCamera(mdl_camera: &MDLCamera) -> Retained<Self>;
278 );
279}
280
281mod private_MDLCameraSCNModelIO {
282 pub trait Sealed {}
283}
284
285#[doc(alias = "SCNModelIO")]
287pub unsafe trait MDLCameraSCNModelIO:
288 ClassType + Sized + private_MDLCameraSCNModelIO::Sealed
289{
290 extern_methods!(
291 #[cfg(feature = "SCNCamera")]
292 #[unsafe(method(cameraWithSCNCamera:))]
293 #[unsafe(method_family = none)]
294 unsafe fn cameraWithSCNCamera(scn_camera: &SCNCamera) -> Retained<Self>;
295 );
296}
297
298#[cfg(feature = "objc2-model-io")]
299#[cfg(not(target_os = "watchos"))]
300impl private_MDLCameraSCNModelIO::Sealed for MDLCamera {}
301#[cfg(feature = "objc2-model-io")]
302#[cfg(not(target_os = "watchos"))]
303unsafe impl MDLCameraSCNModelIO for MDLCamera {}