objc2_scene_kit/generated/
ModelIO.rs

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