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
17extern_conformance!(
18 unsafe impl NSObjectProtocol for MDLSubmeshTopology {}
19);
20
21impl MDLSubmeshTopology {
22 extern_methods!(
23 #[unsafe(method(initWithSubmesh:))]
25 #[unsafe(method_family = init)]
26 pub unsafe fn initWithSubmesh(
27 this: Allocated<Self>,
28 submesh: &MDLSubmesh,
29 ) -> Retained<Self>;
30
31 #[cfg(feature = "MDLMeshBuffer")]
32 #[unsafe(method(faceTopology))]
47 #[unsafe(method_family = none)]
48 pub unsafe fn faceTopology(&self) -> Option<Retained<ProtocolObject<dyn MDLMeshBuffer>>>;
49
50 #[cfg(feature = "MDLMeshBuffer")]
51 #[unsafe(method(setFaceTopology:))]
53 #[unsafe(method_family = none)]
54 pub unsafe fn setFaceTopology(
55 &self,
56 face_topology: Option<&ProtocolObject<dyn MDLMeshBuffer>>,
57 );
58
59 #[unsafe(method(faceCount))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn faceCount(&self) -> NSUInteger;
63
64 #[unsafe(method(setFaceCount:))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn setFaceCount(&self, face_count: NSUInteger);
68
69 #[cfg(feature = "MDLMeshBuffer")]
70 #[unsafe(method(vertexCreaseIndices))]
80 #[unsafe(method_family = none)]
81 pub unsafe fn vertexCreaseIndices(
82 &self,
83 ) -> Option<Retained<ProtocolObject<dyn MDLMeshBuffer>>>;
84
85 #[cfg(feature = "MDLMeshBuffer")]
86 #[unsafe(method(setVertexCreaseIndices:))]
88 #[unsafe(method_family = none)]
89 pub unsafe fn setVertexCreaseIndices(
90 &self,
91 vertex_crease_indices: Option<&ProtocolObject<dyn MDLMeshBuffer>>,
92 );
93
94 #[cfg(feature = "MDLMeshBuffer")]
95 #[unsafe(method(vertexCreases))]
96 #[unsafe(method_family = none)]
97 pub unsafe fn vertexCreases(&self) -> Option<Retained<ProtocolObject<dyn MDLMeshBuffer>>>;
98
99 #[cfg(feature = "MDLMeshBuffer")]
100 #[unsafe(method(setVertexCreases:))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn setVertexCreases(
104 &self,
105 vertex_creases: Option<&ProtocolObject<dyn MDLMeshBuffer>>,
106 );
107
108 #[unsafe(method(vertexCreaseCount))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn vertexCreaseCount(&self) -> NSUInteger;
112
113 #[unsafe(method(setVertexCreaseCount:))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn setVertexCreaseCount(&self, vertex_crease_count: NSUInteger);
117
118 #[cfg(feature = "MDLMeshBuffer")]
119 #[unsafe(method(edgeCreaseIndices))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn edgeCreaseIndices(
133 &self,
134 ) -> Option<Retained<ProtocolObject<dyn MDLMeshBuffer>>>;
135
136 #[cfg(feature = "MDLMeshBuffer")]
137 #[unsafe(method(setEdgeCreaseIndices:))]
139 #[unsafe(method_family = none)]
140 pub unsafe fn setEdgeCreaseIndices(
141 &self,
142 edge_crease_indices: Option<&ProtocolObject<dyn MDLMeshBuffer>>,
143 );
144
145 #[cfg(feature = "MDLMeshBuffer")]
146 #[unsafe(method(edgeCreases))]
147 #[unsafe(method_family = none)]
148 pub unsafe fn edgeCreases(&self) -> Option<Retained<ProtocolObject<dyn MDLMeshBuffer>>>;
149
150 #[cfg(feature = "MDLMeshBuffer")]
151 #[unsafe(method(setEdgeCreases:))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn setEdgeCreases(
155 &self,
156 edge_creases: Option<&ProtocolObject<dyn MDLMeshBuffer>>,
157 );
158
159 #[unsafe(method(edgeCreaseCount))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn edgeCreaseCount(&self) -> NSUInteger;
163
164 #[unsafe(method(setEdgeCreaseCount:))]
166 #[unsafe(method_family = none)]
167 pub unsafe fn setEdgeCreaseCount(&self, edge_crease_count: NSUInteger);
168
169 #[cfg(feature = "MDLMeshBuffer")]
170 #[unsafe(method(holes))]
177 #[unsafe(method_family = none)]
178 pub unsafe fn holes(&self) -> Option<Retained<ProtocolObject<dyn MDLMeshBuffer>>>;
179
180 #[cfg(feature = "MDLMeshBuffer")]
181 #[unsafe(method(setHoles:))]
183 #[unsafe(method_family = none)]
184 pub unsafe fn setHoles(&self, holes: Option<&ProtocolObject<dyn MDLMeshBuffer>>);
185
186 #[unsafe(method(holeCount))]
188 #[unsafe(method_family = none)]
189 pub unsafe fn holeCount(&self) -> NSUInteger;
190
191 #[unsafe(method(setHoleCount:))]
193 #[unsafe(method_family = none)]
194 pub unsafe fn setHoleCount(&self, hole_count: NSUInteger);
195 );
196}
197
198impl MDLSubmeshTopology {
200 extern_methods!(
201 #[unsafe(method(init))]
202 #[unsafe(method_family = init)]
203 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
204
205 #[unsafe(method(new))]
206 #[unsafe(method_family = new)]
207 pub unsafe fn new() -> Retained<Self>;
208 );
209}
210
211extern_class!(
212 #[unsafe(super(NSObject))]
216 #[derive(Debug, PartialEq, Eq, Hash)]
217 pub struct MDLSubmesh;
218);
219
220#[cfg(feature = "MDLTypes")]
221extern_conformance!(
222 unsafe impl MDLNamed for MDLSubmesh {}
223);
224
225extern_conformance!(
226 unsafe impl NSObjectProtocol for MDLSubmesh {}
227);
228
229impl MDLSubmesh {
230 extern_methods!(
231 #[cfg(all(
232 feature = "MDLMaterial",
233 feature = "MDLMeshBuffer",
234 feature = "MDLTypes"
235 ))]
236 #[unsafe(method(initWithName:indexBuffer:indexCount:indexType:geometryType:material:))]
238 #[unsafe(method_family = init)]
239 pub unsafe fn initWithName_indexBuffer_indexCount_indexType_geometryType_material(
240 this: Allocated<Self>,
241 name: &NSString,
242 index_buffer: &ProtocolObject<dyn MDLMeshBuffer>,
243 index_count: NSUInteger,
244 index_type: MDLIndexBitDepth,
245 geometry_type: MDLGeometryType,
246 material: Option<&MDLMaterial>,
247 ) -> Retained<Self>;
248
249 #[cfg(all(
250 feature = "MDLMaterial",
251 feature = "MDLMeshBuffer",
252 feature = "MDLTypes"
253 ))]
254 #[unsafe(method(initWithIndexBuffer:indexCount:indexType:geometryType:material:))]
256 #[unsafe(method_family = init)]
257 pub unsafe fn initWithIndexBuffer_indexCount_indexType_geometryType_material(
258 this: Allocated<Self>,
259 index_buffer: &ProtocolObject<dyn MDLMeshBuffer>,
260 index_count: NSUInteger,
261 index_type: MDLIndexBitDepth,
262 geometry_type: MDLGeometryType,
263 material: Option<&MDLMaterial>,
264 ) -> Retained<Self>;
265
266 #[cfg(all(
267 feature = "MDLMaterial",
268 feature = "MDLMeshBuffer",
269 feature = "MDLTypes"
270 ))]
271 #[unsafe(method(initWithName:indexBuffer:indexCount:indexType:geometryType:material:topology:))]
278 #[unsafe(method_family = init)]
279 pub unsafe fn initWithName_indexBuffer_indexCount_indexType_geometryType_material_topology(
280 this: Allocated<Self>,
281 name: &NSString,
282 index_buffer: &ProtocolObject<dyn MDLMeshBuffer>,
283 index_count: NSUInteger,
284 index_type: MDLIndexBitDepth,
285 geometry_type: MDLGeometryType,
286 material: Option<&MDLMaterial>,
287 topology: Option<&MDLSubmeshTopology>,
288 ) -> Retained<Self>;
289
290 #[cfg(feature = "MDLTypes")]
291 #[unsafe(method(initWithMDLSubmesh:indexType:geometryType:))]
298 #[unsafe(method_family = init)]
299 pub unsafe fn initWithMDLSubmesh_indexType_geometryType(
300 this: Allocated<Self>,
301 submesh: &MDLSubmesh,
302 index_type: MDLIndexBitDepth,
303 geometry_type: MDLGeometryType,
304 ) -> Option<Retained<Self>>;
305
306 #[cfg(feature = "MDLMeshBuffer")]
307 #[unsafe(method(indexBuffer))]
309 #[unsafe(method_family = none)]
310 pub unsafe fn indexBuffer(&self) -> Retained<ProtocolObject<dyn MDLMeshBuffer>>;
311
312 #[cfg(all(feature = "MDLMeshBuffer", feature = "MDLTypes"))]
313 #[unsafe(method(indexBufferAsIndexType:))]
314 #[unsafe(method_family = none)]
315 pub unsafe fn indexBufferAsIndexType(
316 &self,
317 index_type: MDLIndexBitDepth,
318 ) -> Retained<ProtocolObject<dyn MDLMeshBuffer>>;
319
320 #[unsafe(method(indexCount))]
322 #[unsafe(method_family = none)]
323 pub unsafe fn indexCount(&self) -> NSUInteger;
324
325 #[cfg(feature = "MDLTypes")]
326 #[unsafe(method(indexType))]
330 #[unsafe(method_family = none)]
331 pub unsafe fn indexType(&self) -> MDLIndexBitDepth;
332
333 #[cfg(feature = "MDLTypes")]
334 #[unsafe(method(geometryType))]
337 #[unsafe(method_family = none)]
338 pub unsafe fn geometryType(&self) -> MDLGeometryType;
339
340 #[cfg(feature = "MDLMaterial")]
341 #[unsafe(method(material))]
343 #[unsafe(method_family = none)]
344 pub unsafe fn material(&self) -> Option<Retained<MDLMaterial>>;
345
346 #[cfg(feature = "MDLMaterial")]
347 #[unsafe(method(setMaterial:))]
349 #[unsafe(method_family = none)]
350 pub unsafe fn setMaterial(&self, material: Option<&MDLMaterial>);
351
352 #[unsafe(method(topology))]
359 #[unsafe(method_family = none)]
360 pub unsafe fn topology(&self) -> Option<Retained<MDLSubmeshTopology>>;
361
362 #[unsafe(method(setTopology:))]
364 #[unsafe(method_family = none)]
365 pub unsafe fn setTopology(&self, topology: Option<&MDLSubmeshTopology>);
366
367 #[unsafe(method(name))]
369 #[unsafe(method_family = none)]
370 pub unsafe fn name(&self) -> Retained<NSString>;
371
372 #[unsafe(method(setName:))]
376 #[unsafe(method_family = none)]
377 pub unsafe fn setName(&self, name: &NSString);
378 );
379}
380
381impl MDLSubmesh {
383 extern_methods!(
384 #[unsafe(method(init))]
385 #[unsafe(method_family = init)]
386 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
387
388 #[unsafe(method(new))]
389 #[unsafe(method_family = new)]
390 pub unsafe fn new() -> Retained<Self>;
391 );
392}