objc2_model_io/generated/
MDLSubmesh.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11 #[unsafe(super(NSObject))]
13 #[derive(Debug, PartialEq, Eq, Hash)]
14 pub struct MDLSubmeshTopology;
15);
16
17unsafe impl NSObjectProtocol for MDLSubmeshTopology {}
18
19impl MDLSubmeshTopology {
20 extern_methods!(
21 #[unsafe(method(initWithSubmesh:))]
23 #[unsafe(method_family = init)]
24 pub unsafe fn initWithSubmesh(
25 this: Allocated<Self>,
26 submesh: &MDLSubmesh,
27 ) -> Retained<Self>;
28
29 #[cfg(feature = "MDLMeshBuffer")]
30 #[unsafe(method(faceTopology))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn faceTopology(&self) -> Option<Retained<ProtocolObject<dyn MDLMeshBuffer>>>;
47
48 #[cfg(feature = "MDLMeshBuffer")]
49 #[unsafe(method(setFaceTopology:))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn setFaceTopology(
53 &self,
54 face_topology: Option<&ProtocolObject<dyn MDLMeshBuffer>>,
55 );
56
57 #[unsafe(method(faceCount))]
59 #[unsafe(method_family = none)]
60 pub unsafe fn faceCount(&self) -> NSUInteger;
61
62 #[unsafe(method(setFaceCount:))]
64 #[unsafe(method_family = none)]
65 pub unsafe fn setFaceCount(&self, face_count: NSUInteger);
66
67 #[cfg(feature = "MDLMeshBuffer")]
68 #[unsafe(method(vertexCreaseIndices))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn vertexCreaseIndices(
80 &self,
81 ) -> Option<Retained<ProtocolObject<dyn MDLMeshBuffer>>>;
82
83 #[cfg(feature = "MDLMeshBuffer")]
84 #[unsafe(method(setVertexCreaseIndices:))]
86 #[unsafe(method_family = none)]
87 pub unsafe fn setVertexCreaseIndices(
88 &self,
89 vertex_crease_indices: Option<&ProtocolObject<dyn MDLMeshBuffer>>,
90 );
91
92 #[cfg(feature = "MDLMeshBuffer")]
93 #[unsafe(method(vertexCreases))]
94 #[unsafe(method_family = none)]
95 pub unsafe fn vertexCreases(&self) -> Option<Retained<ProtocolObject<dyn MDLMeshBuffer>>>;
96
97 #[cfg(feature = "MDLMeshBuffer")]
98 #[unsafe(method(setVertexCreases:))]
100 #[unsafe(method_family = none)]
101 pub unsafe fn setVertexCreases(
102 &self,
103 vertex_creases: Option<&ProtocolObject<dyn MDLMeshBuffer>>,
104 );
105
106 #[unsafe(method(vertexCreaseCount))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn vertexCreaseCount(&self) -> NSUInteger;
110
111 #[unsafe(method(setVertexCreaseCount:))]
113 #[unsafe(method_family = none)]
114 pub unsafe fn setVertexCreaseCount(&self, vertex_crease_count: NSUInteger);
115
116 #[cfg(feature = "MDLMeshBuffer")]
117 #[unsafe(method(edgeCreaseIndices))]
129 #[unsafe(method_family = none)]
130 pub unsafe fn edgeCreaseIndices(
131 &self,
132 ) -> Option<Retained<ProtocolObject<dyn MDLMeshBuffer>>>;
133
134 #[cfg(feature = "MDLMeshBuffer")]
135 #[unsafe(method(setEdgeCreaseIndices:))]
137 #[unsafe(method_family = none)]
138 pub unsafe fn setEdgeCreaseIndices(
139 &self,
140 edge_crease_indices: Option<&ProtocolObject<dyn MDLMeshBuffer>>,
141 );
142
143 #[cfg(feature = "MDLMeshBuffer")]
144 #[unsafe(method(edgeCreases))]
145 #[unsafe(method_family = none)]
146 pub unsafe fn edgeCreases(&self) -> Option<Retained<ProtocolObject<dyn MDLMeshBuffer>>>;
147
148 #[cfg(feature = "MDLMeshBuffer")]
149 #[unsafe(method(setEdgeCreases:))]
151 #[unsafe(method_family = none)]
152 pub unsafe fn setEdgeCreases(
153 &self,
154 edge_creases: Option<&ProtocolObject<dyn MDLMeshBuffer>>,
155 );
156
157 #[unsafe(method(edgeCreaseCount))]
159 #[unsafe(method_family = none)]
160 pub unsafe fn edgeCreaseCount(&self) -> NSUInteger;
161
162 #[unsafe(method(setEdgeCreaseCount:))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn setEdgeCreaseCount(&self, edge_crease_count: NSUInteger);
166
167 #[cfg(feature = "MDLMeshBuffer")]
168 #[unsafe(method(holes))]
175 #[unsafe(method_family = none)]
176 pub unsafe fn holes(&self) -> Option<Retained<ProtocolObject<dyn MDLMeshBuffer>>>;
177
178 #[cfg(feature = "MDLMeshBuffer")]
179 #[unsafe(method(setHoles:))]
181 #[unsafe(method_family = none)]
182 pub unsafe fn setHoles(&self, holes: Option<&ProtocolObject<dyn MDLMeshBuffer>>);
183
184 #[unsafe(method(holeCount))]
186 #[unsafe(method_family = none)]
187 pub unsafe fn holeCount(&self) -> NSUInteger;
188
189 #[unsafe(method(setHoleCount:))]
191 #[unsafe(method_family = none)]
192 pub unsafe fn setHoleCount(&self, hole_count: NSUInteger);
193 );
194}
195
196impl MDLSubmeshTopology {
198 extern_methods!(
199 #[unsafe(method(init))]
200 #[unsafe(method_family = init)]
201 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
202
203 #[unsafe(method(new))]
204 #[unsafe(method_family = new)]
205 pub unsafe fn new() -> Retained<Self>;
206 );
207}
208
209extern_class!(
210 #[unsafe(super(NSObject))]
214 #[derive(Debug, PartialEq, Eq, Hash)]
215 pub struct MDLSubmesh;
216);
217
218#[cfg(feature = "MDLTypes")]
219unsafe impl MDLNamed for MDLSubmesh {}
220
221unsafe impl NSObjectProtocol for MDLSubmesh {}
222
223impl MDLSubmesh {
224 extern_methods!(
225 #[cfg(all(
226 feature = "MDLMaterial",
227 feature = "MDLMeshBuffer",
228 feature = "MDLTypes"
229 ))]
230 #[unsafe(method(initWithName:indexBuffer:indexCount:indexType:geometryType:material:))]
232 #[unsafe(method_family = init)]
233 pub unsafe fn initWithName_indexBuffer_indexCount_indexType_geometryType_material(
234 this: Allocated<Self>,
235 name: &NSString,
236 index_buffer: &ProtocolObject<dyn MDLMeshBuffer>,
237 index_count: NSUInteger,
238 index_type: MDLIndexBitDepth,
239 geometry_type: MDLGeometryType,
240 material: Option<&MDLMaterial>,
241 ) -> Retained<Self>;
242
243 #[cfg(all(
244 feature = "MDLMaterial",
245 feature = "MDLMeshBuffer",
246 feature = "MDLTypes"
247 ))]
248 #[unsafe(method(initWithIndexBuffer:indexCount:indexType:geometryType:material:))]
250 #[unsafe(method_family = init)]
251 pub unsafe fn initWithIndexBuffer_indexCount_indexType_geometryType_material(
252 this: Allocated<Self>,
253 index_buffer: &ProtocolObject<dyn MDLMeshBuffer>,
254 index_count: NSUInteger,
255 index_type: MDLIndexBitDepth,
256 geometry_type: MDLGeometryType,
257 material: Option<&MDLMaterial>,
258 ) -> Retained<Self>;
259
260 #[cfg(all(
261 feature = "MDLMaterial",
262 feature = "MDLMeshBuffer",
263 feature = "MDLTypes"
264 ))]
265 #[unsafe(method(initWithName:indexBuffer:indexCount:indexType:geometryType:material:topology:))]
272 #[unsafe(method_family = init)]
273 pub unsafe fn initWithName_indexBuffer_indexCount_indexType_geometryType_material_topology(
274 this: Allocated<Self>,
275 name: &NSString,
276 index_buffer: &ProtocolObject<dyn MDLMeshBuffer>,
277 index_count: NSUInteger,
278 index_type: MDLIndexBitDepth,
279 geometry_type: MDLGeometryType,
280 material: Option<&MDLMaterial>,
281 topology: Option<&MDLSubmeshTopology>,
282 ) -> Retained<Self>;
283
284 #[cfg(feature = "MDLTypes")]
285 #[unsafe(method(initWithMDLSubmesh:indexType:geometryType:))]
292 #[unsafe(method_family = init)]
293 pub unsafe fn initWithMDLSubmesh_indexType_geometryType(
294 this: Allocated<Self>,
295 submesh: &MDLSubmesh,
296 index_type: MDLIndexBitDepth,
297 geometry_type: MDLGeometryType,
298 ) -> Option<Retained<Self>>;
299
300 #[cfg(feature = "MDLMeshBuffer")]
301 #[unsafe(method(indexBuffer))]
303 #[unsafe(method_family = none)]
304 pub unsafe fn indexBuffer(&self) -> Retained<ProtocolObject<dyn MDLMeshBuffer>>;
305
306 #[cfg(all(feature = "MDLMeshBuffer", feature = "MDLTypes"))]
307 #[unsafe(method(indexBufferAsIndexType:))]
308 #[unsafe(method_family = none)]
309 pub unsafe fn indexBufferAsIndexType(
310 &self,
311 index_type: MDLIndexBitDepth,
312 ) -> Retained<ProtocolObject<dyn MDLMeshBuffer>>;
313
314 #[unsafe(method(indexCount))]
316 #[unsafe(method_family = none)]
317 pub unsafe fn indexCount(&self) -> NSUInteger;
318
319 #[cfg(feature = "MDLTypes")]
320 #[unsafe(method(indexType))]
324 #[unsafe(method_family = none)]
325 pub unsafe fn indexType(&self) -> MDLIndexBitDepth;
326
327 #[cfg(feature = "MDLTypes")]
328 #[unsafe(method(geometryType))]
331 #[unsafe(method_family = none)]
332 pub unsafe fn geometryType(&self) -> MDLGeometryType;
333
334 #[cfg(feature = "MDLMaterial")]
335 #[unsafe(method(material))]
337 #[unsafe(method_family = none)]
338 pub unsafe fn material(&self) -> Option<Retained<MDLMaterial>>;
339
340 #[cfg(feature = "MDLMaterial")]
341 #[unsafe(method(setMaterial:))]
343 #[unsafe(method_family = none)]
344 pub unsafe fn setMaterial(&self, material: Option<&MDLMaterial>);
345
346 #[unsafe(method(topology))]
353 #[unsafe(method_family = none)]
354 pub unsafe fn topology(&self) -> Option<Retained<MDLSubmeshTopology>>;
355
356 #[unsafe(method(setTopology:))]
358 #[unsafe(method_family = none)]
359 pub unsafe fn setTopology(&self, topology: Option<&MDLSubmeshTopology>);
360
361 #[unsafe(method(name))]
363 #[unsafe(method_family = none)]
364 pub unsafe fn name(&self) -> Retained<NSString>;
365
366 #[unsafe(method(setName:))]
368 #[unsafe(method_family = none)]
369 pub unsafe fn setName(&self, name: &NSString);
370 );
371}
372
373impl MDLSubmesh {
375 extern_methods!(
376 #[unsafe(method(init))]
377 #[unsafe(method_family = init)]
378 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
379
380 #[unsafe(method(new))]
381 #[unsafe(method_family = new)]
382 pub unsafe fn new() -> Retained<Self>;
383 );
384}