objc2_scene_kit/generated/SCNGeometry.rs
1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9#[cfg(feature = "objc2-metal")]
10#[cfg(not(target_os = "watchos"))]
11use objc2_metal::*;
12
13use crate::*;
14
15/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometryprimitivetype?language=objc)
16// NS_ENUM
17#[repr(transparent)]
18#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
19pub struct SCNGeometryPrimitiveType(pub NSInteger);
20impl SCNGeometryPrimitiveType {
21 #[doc(alias = "SCNGeometryPrimitiveTypeTriangles")]
22 pub const Triangles: Self = Self(0);
23 #[doc(alias = "SCNGeometryPrimitiveTypeTriangleStrip")]
24 pub const TriangleStrip: Self = Self(1);
25 #[doc(alias = "SCNGeometryPrimitiveTypeLine")]
26 pub const Line: Self = Self(2);
27 #[doc(alias = "SCNGeometryPrimitiveTypePoint")]
28 pub const Point: Self = Self(3);
29 #[doc(alias = "SCNGeometryPrimitiveTypePolygon")]
30 pub const Polygon: Self = Self(4);
31}
32
33unsafe impl Encode for SCNGeometryPrimitiveType {
34 const ENCODING: Encoding = NSInteger::ENCODING;
35}
36
37unsafe impl RefEncode for SCNGeometryPrimitiveType {
38 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
39}
40
41/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometrysourcesemantic?language=objc)
42// NS_TYPED_EXTENSIBLE_ENUM
43pub type SCNGeometrySourceSemantic = NSString;
44
45extern "C" {
46 /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometrysourcesemanticvertex?language=objc)
47 pub static SCNGeometrySourceSemanticVertex: &'static SCNGeometrySourceSemantic;
48}
49
50extern "C" {
51 /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometrysourcesemanticnormal?language=objc)
52 pub static SCNGeometrySourceSemanticNormal: &'static SCNGeometrySourceSemantic;
53}
54
55extern "C" {
56 /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometrysourcesemanticcolor?language=objc)
57 pub static SCNGeometrySourceSemanticColor: &'static SCNGeometrySourceSemantic;
58}
59
60extern "C" {
61 /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometrysourcesemantictexcoord?language=objc)
62 pub static SCNGeometrySourceSemanticTexcoord: &'static SCNGeometrySourceSemantic;
63}
64
65extern "C" {
66 /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometrysourcesemantictangent?language=objc)
67 pub static SCNGeometrySourceSemanticTangent: &'static SCNGeometrySourceSemantic;
68}
69
70extern "C" {
71 /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometrysourcesemanticvertexcrease?language=objc)
72 pub static SCNGeometrySourceSemanticVertexCrease: &'static SCNGeometrySourceSemantic;
73}
74
75extern "C" {
76 /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometrysourcesemanticedgecrease?language=objc)
77 pub static SCNGeometrySourceSemanticEdgeCrease: &'static SCNGeometrySourceSemantic;
78}
79
80extern "C" {
81 /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometrysourcesemanticboneweights?language=objc)
82 pub static SCNGeometrySourceSemanticBoneWeights: &'static SCNGeometrySourceSemantic;
83}
84
85extern "C" {
86 /// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometrysourcesemanticboneindices?language=objc)
87 pub static SCNGeometrySourceSemanticBoneIndices: &'static SCNGeometrySourceSemantic;
88}
89
90extern_class!(
91 /// SCNGeometry is an abstract class that represents the geometry that can be attached to a SCNNode.
92 ///
93 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometry?language=objc)
94 #[unsafe(super(NSObject))]
95 #[derive(Debug, PartialEq, Eq, Hash)]
96 pub struct SCNGeometry;
97);
98
99unsafe impl NSCoding for SCNGeometry {}
100
101unsafe impl NSCopying for SCNGeometry {}
102
103unsafe impl CopyingHelper for SCNGeometry {
104 type Result = Self;
105}
106
107unsafe impl NSObjectProtocol for SCNGeometry {}
108
109unsafe impl NSSecureCoding for SCNGeometry {}
110
111#[cfg(feature = "SCNAnimation")]
112unsafe impl SCNAnimatable for SCNGeometry {}
113
114#[cfg(feature = "SCNBoundingVolume")]
115unsafe impl SCNBoundingVolume for SCNGeometry {}
116
117#[cfg(feature = "SCNShadable")]
118unsafe impl SCNShadable for SCNGeometry {}
119
120impl SCNGeometry {
121 extern_methods!(
122 /// Creates and returns an empty geometry object.
123 ///
124 /// An empty geometry may be used as the lowest level of detail of a geometry.
125 #[unsafe(method(geometry))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn geometry() -> Retained<Self>;
128
129 /// Determines the name of the receiver.
130 #[unsafe(method(name))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn name(&self) -> Option<Retained<NSString>>;
133
134 /// Setter for [`name`][Self::name].
135 #[unsafe(method(setName:))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn setName(&self, name: Option<&NSString>);
138
139 #[cfg(feature = "SCNMaterial")]
140 /// Specifies the receiver's materials array.
141 ///
142 /// Each geometry element can be rendered using a different material. The index of the material used for a geometry element is equal to the index of that element modulo the number of materials.
143 #[unsafe(method(materials))]
144 #[unsafe(method_family = none)]
145 pub unsafe fn materials(&self) -> Retained<NSArray<SCNMaterial>>;
146
147 #[cfg(feature = "SCNMaterial")]
148 /// Setter for [`materials`][Self::materials].
149 #[unsafe(method(setMaterials:))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn setMaterials(&self, materials: &NSArray<SCNMaterial>);
152
153 #[cfg(feature = "SCNMaterial")]
154 /// Determines the first material of the geometry. Returns nil if the geometry has no material.
155 ///
156 /// This method is here for convenience. It is equivalent to the first object in the "materials" array above.
157 #[unsafe(method(firstMaterial))]
158 #[unsafe(method_family = none)]
159 pub unsafe fn firstMaterial(&self) -> Option<Retained<SCNMaterial>>;
160
161 #[cfg(feature = "SCNMaterial")]
162 /// Setter for [`firstMaterial`][Self::firstMaterial].
163 #[unsafe(method(setFirstMaterial:))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn setFirstMaterial(&self, first_material: Option<&SCNMaterial>);
166
167 #[cfg(feature = "SCNMaterial")]
168 /// Insert a material in the materials array at the specified index.
169 ///
170 /// Parameter `material`: The material to insert.
171 ///
172 /// Parameter `index`: Index in the materials array to insert the new material.
173 #[unsafe(method(insertMaterial:atIndex:))]
174 #[unsafe(method_family = none)]
175 pub unsafe fn insertMaterial_atIndex(&self, material: &SCNMaterial, index: NSUInteger);
176
177 /// Remove the material at the specified index from the materials array.
178 ///
179 /// Parameter `index`: The index of the material to remove from the 'materials' array.
180 #[unsafe(method(removeMaterialAtIndex:))]
181 #[unsafe(method_family = none)]
182 pub unsafe fn removeMaterialAtIndex(&self, index: NSUInteger);
183
184 #[cfg(feature = "SCNMaterial")]
185 /// Remove the material at the index 'index' from the materials array of the receiver and insert 'material' in its position.
186 ///
187 /// Parameter `index`: The index of the material to replace in the materials array.
188 ///
189 /// Parameter `material`: The new material that will replace the previous one.
190 #[unsafe(method(replaceMaterialAtIndex:withMaterial:))]
191 #[unsafe(method_family = none)]
192 pub unsafe fn replaceMaterialAtIndex_withMaterial(
193 &self,
194 index: NSUInteger,
195 material: &SCNMaterial,
196 );
197
198 #[cfg(feature = "SCNMaterial")]
199 /// Return the first material from the materials array of the receiver with the specified name.
200 ///
201 /// Parameter `name`: The name of the material to retrieve.
202 #[unsafe(method(materialWithName:))]
203 #[unsafe(method_family = none)]
204 pub unsafe fn materialWithName(&self, name: &NSString) -> Option<Retained<SCNMaterial>>;
205
206 /// Creates and returns a new geometry built from geometry sources and geometry elements.
207 ///
208 /// Parameter `sources`: An array of geometry sources. If several geometry sources have the same semantic, only the first one is taken into account.
209 ///
210 /// Parameter `elements`: An array of geometry elements. The sort order in the array determines the mapping between materials and geometry elements.
211 ///
212 /// A geometry is made of geometry sources (at least `SCNGeometrySourceSemanticVertex`) and at least one geometry element. Multiple sources for texture coordinates are accepted. In that case the `mappingChannel` is implicitly set based on the order of the texture sources, starting at index 0.
213 #[unsafe(method(geometryWithSources:elements:))]
214 #[unsafe(method_family = none)]
215 pub unsafe fn geometryWithSources_elements(
216 sources: &NSArray<SCNGeometrySource>,
217 elements: Option<&NSArray<SCNGeometryElement>>,
218 ) -> Retained<Self>;
219
220 /// Creates and returns a new geometry built from geometry sources and geometry elements, with per-source indexed geometry data.
221 ///
222 /// Parameter `sources`: An array of geometry sources. If several geometry sources have the same semantic, only the first one is taken into account.
223 ///
224 /// Parameter `elements`: An array of geometry elements. The sort order in the array determines the mapping between materials and geometry elements.
225 ///
226 /// Parameter `sourceChannels`: An array of indices that describes, for each geometry source, which channel of the geometry elements to use.
227 ///
228 /// ```text
229 /// Example: geometry made of 3 primitives (2 quads, 1 pentagon) using different indices to reference position and UV data (2 channels)
230 ///
231 /// Positions ┆ POS0 POS3 POS4 ┆ quad quad pentagon quad quad pentagon ┆ SCNGeometryElement *element = [SCNGeometryElement geometryElementWithData:…
232 /// 0 │ (0.0, 0.0, 0.0) ┆ ┌───────────┬───────────┐ ┆ ┌─────┐ ┌─────┐ ┌───────┐ ┌─────┐ ┌─────┐ ┌───────┐ ┆ primitiveType:SCNGeometryPrimitiveTypePolygon
233 /// 1 │ (0.0, 1.0, 0.0) ┆ │UV0 UV3│UV0 UV3│ ┆ 4 4 5 0 1 2 3 5 4 3 2 7 6 5 2 1 0 1 2 3 2 3 0 1 1 2 3 4 0 ┆ primitiveCount:3
234 /// 2 │ (1.0, 0.0, 0.0) ┆ │ │ │ ┆ └───┘ └───────────────────────┘ └───────────────────────┘ ┆ indicesChannelCount:2
235 /// 3 │ (1.0, 1.0, 0.0) ┆ │ A │ B │ ┆ polygons channel 0 channel 1 ┆ interleavedIndicesChannels:…
236 /// 4 │ (2.0, 0.0, 0.0) ┆ │ │ │ ┆ (positions) (UVs) ┆ bytesPerIndex:…];
237 /// 5 │ (2.0, 1.0, 0.0) ┆ │UV1 UV2│UV1 UV2│ ┆ ┆
238 /// 6 │ (2.0, 2.0, 0.0) ┆ POS1 ├───────────┴───────────┤ POS5 ┆ ┆ SCNGeometry *geometry = [SCNGeometry geometryWithSources:
239 /// @
240 /// [positionSource, texcoordsSource]
241 /// 7 │ (0.0, 2.0, 0.0) ┆ │UVO UV4 UV3│ ┆ ┆ elements:
242 /// @
243 /// [element]
244 /// ┆ │ POS2 │ ┆ quad A quad B pentagon C ┆ sourceChannels:
245 /// @
246 /// [0, 1]];
247 /// UVs ┆ │ │ ┆ ┌─────────────┐ ┌─────────────┐ ┌─────────────────┐ ┆
248 /// 0 │ (0.0, 0.0) ┆ │ C │ ┆ 4 4 5 0 0 1 1 2 2 3 3 5 2 4 3 3 0 2 1 7 1 6 2 5 3 2 4 1 0 ┆
249 /// 1 │ (0.0, 1.0) ┆ │ │ ┆ └───┘└──────────────────────────────────────────────────┘ ┆
250 /// 2 │ (1.0, 1.0) ┆ │UV1 UV2│ ┆ polygons interleaved channels ┆
251 /// 3 │ (1.0, 0.0) ┆ └───────────────────────┘ ┆ (positions and UVs) ┆
252 /// 4 │ (0.5, 0.0) ┆ POS7 POS6 ┆ ┆
253 ///
254 /// Example: geometry made of 3 primitives (2 quads, 1 pentagon) using the same indices to reference position and UV data (1 channel)
255 ///
256 /// Positions ┆ POS0 POS3 POS4 ┆ quad A quad B pentagon C ┆ SCNGeometryElement *element = [SCNGeometryElement geometryElementWithData:…
257 /// 0 │ (0.0, 4.0, 0.0) ┆ ┌───────────┬───────────┐ ┆ ┌────────┐ ┌────────┐ ┌───────────┐ ┆ primitiveType:SCNGeometryPrimitiveTypePolygon
258 /// 1 │ (0.0, 2.0, 0.0) ┆ │UV0 UV3│UV3 UV4│ ┆ 4 4 5 0 1 2 3 5 4 3 2 7 6 5 2 1 ┆ primitiveCount:3
259 /// 2 │ (2.0, 2.0, 0.0) ┆ │ │ │ ┆ └───┘ └───────────────────────────────────┘ ┆ bytesPerIndex:…];
260 /// 3 │ (2.0, 4.0, 0.0) ┆ │ A │ B │ ┆ polygons channel 0 ┆
261 /// 4 │ (4.0, 4.0, 0.0) ┆ │ │ │ ┆ (positions and UVs) ┆ SCNGeometry *geometry = [SCNGeometry geometryWithSources:
262 /// @
263 /// [positionSource, texcoordsSource]
264 /// 5 │ (4.0, 2.0, 0.0) ┆ │UV1 UV2│UV2 UV5│ ┆ ┆ elements:
265 /// @
266 /// [element]];
267 /// 6 │ (4.0, 0.0, 0.0) ┆ POS1 ├───────────┴───────────┤ POS5 ┆ ┆
268 /// 7 │ (0.0, 0.0, 0.0) ┆ │UV1 UV2 UV5│ ┆ ┆ === or equivalently ===
269 /// ┆ │ POS2 │ ┆ ┆
270 /// UVs ┆ │ │ ┆ ┆ SCNGeometryElement *element = [SCNGeometryElement geometryElementWithData:…
271 /// 0 │ (0.0, 0.0) ┆ │ C │ ┆ ┆ primitiveType:SCNGeometryPrimitiveTypePolygon
272 /// 1 │ (0.0, 0.5) ┆ │ │ ┆ ┆ primitiveCount:3
273 /// 2 │ (0.5, 0.5) ┆ │UV7 UV6│ ┆ ┆ indicesChannelCount:1
274 /// 3 │ (0.5, 0.0) ┆ └───────────────────────┘ ┆ ┆ interleavedIndicesChannels:…
275 /// 4 │ (1.0, 0.0) ┆ POS7 POS6 ┆ ┆ bytesPerIndex:…];
276 /// 5 │ (1.0, 0.5) ┆ ┆ ┆
277 /// 6 │ (1.0, 1.0) ┆ ┆ ┆ SCNGeometry *geometry = [SCNGeometry geometryWithSources:
278 /// @
279 /// [positionSource, texcoordsSource]
280 /// 7 │ (0.0, 1.0) ┆ ┆ ┆ elements:
281 /// @
282 /// [element]
283 /// ┆ ┆ ┆ sourceChannels:
284 /// @
285 /// [0, 0]]; ┆
286 /// ```
287 #[unsafe(method(geometryWithSources:elements:sourceChannels:))]
288 #[unsafe(method_family = none)]
289 pub unsafe fn geometryWithSources_elements_sourceChannels(
290 sources: &NSArray<SCNGeometrySource>,
291 elements: Option<&NSArray<SCNGeometryElement>>,
292 source_channels: Option<&NSArray<NSNumber>>,
293 ) -> Retained<Self>;
294
295 /// The array of geometry sources of the receiver.
296 #[unsafe(method(geometrySources))]
297 #[unsafe(method_family = none)]
298 pub unsafe fn geometrySources(&self) -> Retained<NSArray<SCNGeometrySource>>;
299
300 /// Returns the geometry sources for a given semantic.
301 ///
302 /// Parameter `semantic`: The semantic of the geometry sources that should be retrieved.
303 ///
304 /// Returns nil if no geometry source is found for the given semantic. May return more than one source, typically for multiple texture coordinate sources.
305 #[unsafe(method(geometrySourcesForSemantic:))]
306 #[unsafe(method_family = none)]
307 pub unsafe fn geometrySourcesForSemantic(
308 &self,
309 semantic: &SCNGeometrySourceSemantic,
310 ) -> Retained<NSArray<SCNGeometrySource>>;
311
312 /// The array of geometry elements of the receiver.
313 #[unsafe(method(geometryElements))]
314 #[unsafe(method_family = none)]
315 pub unsafe fn geometryElements(&self) -> Retained<NSArray<SCNGeometryElement>>;
316
317 /// Returns the number of geometry elements owned by the geometry.
318 #[unsafe(method(geometryElementCount))]
319 #[unsafe(method_family = none)]
320 pub unsafe fn geometryElementCount(&self) -> NSInteger;
321
322 /// Returns the geometry element at a given index.
323 ///
324 /// Parameter `elementIndex`: The index of the geometry element.
325 #[unsafe(method(geometryElementAtIndex:))]
326 #[unsafe(method_family = none)]
327 pub unsafe fn geometryElementAtIndex(
328 &self,
329 element_index: NSInteger,
330 ) -> Retained<SCNGeometryElement>;
331
332 /// An array of indices that describes, for each geometry source, which channel of the geometry elements to use.
333 #[unsafe(method(geometrySourceChannels))]
334 #[unsafe(method_family = none)]
335 pub unsafe fn geometrySourceChannels(&self) -> Option<Retained<NSArray<NSNumber>>>;
336
337 #[cfg(feature = "SCNLevelOfDetail")]
338 /// Determines the receiver's levels of detail. Defaults to nil.
339 #[unsafe(method(levelsOfDetail))]
340 #[unsafe(method_family = none)]
341 pub unsafe fn levelsOfDetail(&self) -> Option<Retained<NSArray<SCNLevelOfDetail>>>;
342
343 #[cfg(feature = "SCNLevelOfDetail")]
344 /// Setter for [`levelsOfDetail`][Self::levelsOfDetail].
345 #[unsafe(method(setLevelsOfDetail:))]
346 #[unsafe(method_family = none)]
347 pub unsafe fn setLevelsOfDetail(
348 &self,
349 levels_of_detail: Option<&NSArray<SCNLevelOfDetail>>,
350 );
351
352 #[unsafe(method(tessellator))]
353 #[unsafe(method_family = none)]
354 pub unsafe fn tessellator(&self) -> Option<Retained<SCNGeometryTessellator>>;
355
356 /// Setter for [`tessellator`][Self::tessellator].
357 #[unsafe(method(setTessellator:))]
358 #[unsafe(method_family = none)]
359 pub unsafe fn setTessellator(&self, tessellator: Option<&SCNGeometryTessellator>);
360
361 /// Specifies the subdivision level of the receiver. Defaults to 0.
362 ///
363 /// A subdivision level of 0 means no subdivision. When the `tessellator` property of the receiver is not nil, the refinement is done on the GPU.
364 #[unsafe(method(subdivisionLevel))]
365 #[unsafe(method_family = none)]
366 pub unsafe fn subdivisionLevel(&self) -> NSUInteger;
367
368 /// Setter for [`subdivisionLevel`][Self::subdivisionLevel].
369 #[unsafe(method(setSubdivisionLevel:))]
370 #[unsafe(method_family = none)]
371 pub unsafe fn setSubdivisionLevel(&self, subdivision_level: NSUInteger);
372
373 /// Specifies if the subdivision is adaptive or uniform. Defaults to YES.
374 ///
375 /// Adaptive subdivision requires that the `tessellator` property of the receiver is not nil.
376 #[unsafe(method(wantsAdaptiveSubdivision))]
377 #[unsafe(method_family = none)]
378 pub unsafe fn wantsAdaptiveSubdivision(&self) -> bool;
379
380 /// Setter for [`wantsAdaptiveSubdivision`][Self::wantsAdaptiveSubdivision].
381 #[unsafe(method(setWantsAdaptiveSubdivision:))]
382 #[unsafe(method_family = none)]
383 pub unsafe fn setWantsAdaptiveSubdivision(&self, wants_adaptive_subdivision: bool);
384
385 /// Specifies the edges creases that control the subdivision. Defaults to nil.
386 ///
387 /// The primitive type of this geometry element must be SCNGeometryPrimitiveTypeLine. See subdivisionLevel above to control the level of subdivision. See edgeCreasesSource below to specify sharpness of the creases.
388 #[unsafe(method(edgeCreasesElement))]
389 #[unsafe(method_family = none)]
390 pub unsafe fn edgeCreasesElement(&self) -> Option<Retained<SCNGeometryElement>>;
391
392 /// Setter for [`edgeCreasesElement`][Self::edgeCreasesElement].
393 #[unsafe(method(setEdgeCreasesElement:))]
394 #[unsafe(method_family = none)]
395 pub unsafe fn setEdgeCreasesElement(
396 &self,
397 edge_creases_element: Option<&SCNGeometryElement>,
398 );
399
400 /// Specifies the crease value of the edges specified by edgeCreasesElement. Defaults to nil.
401 ///
402 /// The semantic of this geometry source must be "SCNGeometrySourceSemanticEdgeCrease". The creases values are floating values between 0 and 10, where 0 means smooth and 10 means infinitely sharp. See subdivisionLevel above to control the level of subdivision. See edgeCreasesElement above to specify edges for edge creases.
403 #[unsafe(method(edgeCreasesSource))]
404 #[unsafe(method_family = none)]
405 pub unsafe fn edgeCreasesSource(&self) -> Option<Retained<SCNGeometrySource>>;
406
407 /// Setter for [`edgeCreasesSource`][Self::edgeCreasesSource].
408 #[unsafe(method(setEdgeCreasesSource:))]
409 #[unsafe(method_family = none)]
410 pub unsafe fn setEdgeCreasesSource(&self, edge_creases_source: Option<&SCNGeometrySource>);
411 );
412}
413
414/// Methods declared on superclass `NSObject`.
415impl SCNGeometry {
416 extern_methods!(
417 #[unsafe(method(init))]
418 #[unsafe(method_family = init)]
419 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
420
421 #[unsafe(method(new))]
422 #[unsafe(method_family = new)]
423 pub unsafe fn new() -> Retained<Self>;
424 );
425}
426
427extern_class!(
428 /// A geometry source contains geometry data for a specific semantic. The data format is described by properties.
429 ///
430 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometrysource?language=objc)
431 #[unsafe(super(NSObject))]
432 #[derive(Debug, PartialEq, Eq, Hash)]
433 pub struct SCNGeometrySource;
434);
435
436unsafe impl NSCoding for SCNGeometrySource {}
437
438unsafe impl NSObjectProtocol for SCNGeometrySource {}
439
440unsafe impl NSSecureCoding for SCNGeometrySource {}
441
442impl SCNGeometrySource {
443 extern_methods!(
444 /// Creates and returns a geometry source from the given data and parameters.
445 ///
446 /// Parameter `data`: The geometry data.
447 ///
448 /// Parameter `semantic`: The semantic of the geometry source.
449 ///
450 /// Parameter `vectorCount`: The number of geometry source vectors.
451 ///
452 /// Parameter `floatComponents`: A flag that indicates if vector components are floating point values.
453 ///
454 /// Parameter `componentsPerVector`: The number of scalar components in a vector.
455 ///
456 /// Parameter `bytesPerComponent`: The number of bytes that represent a vector component.
457 ///
458 /// Parameter `offset`: The offset from the beginning of the data. In bytes.
459 ///
460 /// Parameter `stride`: The number of bytes from a vector to the next one in the data.
461 #[unsafe(method(geometrySourceWithData:semantic:vectorCount:floatComponents:componentsPerVector:bytesPerComponent:dataOffset:dataStride:))]
462 #[unsafe(method_family = none)]
463 pub unsafe fn geometrySourceWithData_semantic_vectorCount_floatComponents_componentsPerVector_bytesPerComponent_dataOffset_dataStride(
464 data: &NSData,
465 semantic: &SCNGeometrySourceSemantic,
466 vector_count: NSInteger,
467 float_components: bool,
468 components_per_vector: NSInteger,
469 bytes_per_component: NSInteger,
470 offset: NSInteger,
471 stride: NSInteger,
472 ) -> Retained<Self>;
473
474 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
475 /// Creates and returns a geometry source from vertices stored in a buffer of SCNVector3 values.
476 ///
477 /// Parameter `vertices`: The buffer of vertices.
478 ///
479 /// Parameter `count`: The number of vertices.
480 ///
481 /// Input vertices are copied to an optimized data format. The actual format is described by the properties of the resulting instance.
482 #[unsafe(method(geometrySourceWithVertices:count:))]
483 #[unsafe(method_family = none)]
484 pub unsafe fn geometrySourceWithVertices_count(
485 vertices: NonNull<SCNVector3>,
486 count: NSInteger,
487 ) -> Retained<Self>;
488
489 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
490 /// Creates and returns a geometry source from normals stored in a buffer of SCNVector3 values.
491 ///
492 /// Parameter `normals`: The buffer of normals.
493 ///
494 /// Parameter `count`: The number of normals.
495 ///
496 /// Input normals are copied to an optimized data format. The actual format is described by the properties of the resulting instance.
497 #[unsafe(method(geometrySourceWithNormals:count:))]
498 #[unsafe(method_family = none)]
499 pub unsafe fn geometrySourceWithNormals_count(
500 normals: NonNull<SCNVector3>,
501 count: NSInteger,
502 ) -> Retained<Self>;
503
504 #[cfg(feature = "objc2-core-foundation")]
505 /// Creates and returns a geometry source from texture coordinates stored in a buffer of CGPoint values.
506 ///
507 /// Parameter `texcoord`: The buffer of texture coordinates.
508 ///
509 /// Parameter `count`: The number of texture coordinate points.
510 ///
511 /// Input texture coordinates are copied to an optimized data format. The actual format is described by the properties of the resulting instance.
512 #[unsafe(method(geometrySourceWithTextureCoordinates:count:))]
513 #[unsafe(method_family = none)]
514 pub unsafe fn geometrySourceWithTextureCoordinates_count(
515 texcoord: NonNull<CGPoint>,
516 count: NSInteger,
517 ) -> Retained<Self>;
518
519 #[cfg(feature = "objc2-metal")]
520 #[cfg(not(target_os = "watchos"))]
521 /// Creates and returns a geometry source from the given data and parameters.
522 ///
523 /// Parameter `buffer`: A Metal buffer.
524 ///
525 /// Parameter `vertexFormat`: The vertex format.
526 ///
527 /// Parameter `semantic`: The semantic of the geometry source.
528 ///
529 /// Parameter `vertexCount`: The number of vertex.
530 ///
531 /// Parameter `offset`: The offset from the beginning of the data. In bytes.
532 ///
533 /// Parameter `stride`: The number of bytes from a vector to the next one in the data.
534 ///
535 /// Attempting to modify the Metal buffer outside the SCNSceneRenderer delegate callbacks is undefined.
536 /// The typical usage it to modify the MTLBuffer within the willRenderScene callback, using a compute kernel or a vertex function in the user own command buffer. So something like:
537 ///
538 /// - (void)renderer:(id
539 /// <SCNSceneRenderer
540 /// >)aRenderer willRenderScene:(SCNScene *)scene atTime:(NSTimeInterval)time
541 /// {
542 /// // ask for a new command buffer
543 /// id
544 /// <MTLCommandBuffer
545 /// > myCommandBuffer = [aRenderer.commandQueue commandBuffer];
546 ///
547 /// // get a compute command encoder
548 /// id
549 /// <MTLComputeCommandEncoder
550 /// > myComputeCommandEncoder = [myCommandBuffer computeCommandEncoder];
551 ///
552 /// // configure the compute command encoder's pipeline state, buffer inputs etc...
553 /// //...
554 ///
555 /// // dispatch the
556 /// [myComputeCommandEncoder dispatchThreadgroups:numberOfWorkingGroups threadsPerThreadgroup:numberOfThreads];
557 /// [myComputeCommandEncoder endEncoding];
558 ///
559 /// [myCommandBuffer commit];
560 /// }
561 #[unsafe(method(geometrySourceWithBuffer:vertexFormat:semantic:vertexCount:dataOffset:dataStride:))]
562 #[unsafe(method_family = none)]
563 pub unsafe fn geometrySourceWithBuffer_vertexFormat_semantic_vertexCount_dataOffset_dataStride(
564 buffer: &ProtocolObject<dyn MTLBuffer>,
565 vertex_format: MTLVertexFormat,
566 semantic: &SCNGeometrySourceSemantic,
567 vertex_count: NSInteger,
568 offset: NSInteger,
569 stride: NSInteger,
570 ) -> Retained<Self>;
571
572 /// The data for the geometry source
573 #[unsafe(method(data))]
574 #[unsafe(method_family = none)]
575 pub unsafe fn data(&self) -> Retained<NSData>;
576
577 /// The semantic of the geometry source
578 #[unsafe(method(semantic))]
579 #[unsafe(method_family = none)]
580 pub unsafe fn semantic(&self) -> Retained<SCNGeometrySourceSemantic>;
581
582 /// The number of vectors in the data.
583 #[unsafe(method(vectorCount))]
584 #[unsafe(method_family = none)]
585 pub unsafe fn vectorCount(&self) -> NSInteger;
586
587 /// A flag that indicates if vector components are floating point values.
588 #[unsafe(method(floatComponents))]
589 #[unsafe(method_family = none)]
590 pub unsafe fn floatComponents(&self) -> bool;
591
592 /// The number of scalar components in each vector.
593 #[unsafe(method(componentsPerVector))]
594 #[unsafe(method_family = none)]
595 pub unsafe fn componentsPerVector(&self) -> NSInteger;
596
597 /// The size of a vector component in bytes.
598 #[unsafe(method(bytesPerComponent))]
599 #[unsafe(method_family = none)]
600 pub unsafe fn bytesPerComponent(&self) -> NSInteger;
601
602 /// The offset from the beginning of the data. In bytes.
603 #[unsafe(method(dataOffset))]
604 #[unsafe(method_family = none)]
605 pub unsafe fn dataOffset(&self) -> NSInteger;
606
607 /// The number of bytes from a vector to the next one in the data.
608 #[unsafe(method(dataStride))]
609 #[unsafe(method_family = none)]
610 pub unsafe fn dataStride(&self) -> NSInteger;
611 );
612}
613
614/// Methods declared on superclass `NSObject`.
615impl SCNGeometrySource {
616 extern_methods!(
617 #[unsafe(method(init))]
618 #[unsafe(method_family = init)]
619 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
620
621 #[unsafe(method(new))]
622 #[unsafe(method_family = new)]
623 pub unsafe fn new() -> Retained<Self>;
624 );
625}
626
627extern_class!(
628 /// A geometry element describes how vertices from a geometry source are connected together.
629 ///
630 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometryelement?language=objc)
631 #[unsafe(super(NSObject))]
632 #[derive(Debug, PartialEq, Eq, Hash)]
633 pub struct SCNGeometryElement;
634);
635
636unsafe impl NSCoding for SCNGeometryElement {}
637
638unsafe impl NSObjectProtocol for SCNGeometryElement {}
639
640unsafe impl NSSecureCoding for SCNGeometryElement {}
641
642impl SCNGeometryElement {
643 extern_methods!(
644 /// Creates and returns a geometry element from the given data and data format info.
645 ///
646 /// Parameter `data`: The data that contains element indices. You can pass nil to use an implicit vertex ordering (0,1,2,…).
647 ///
648 /// Parameter `primitiveType`: The primitive type, as listed in the SCNGeometryPrimitiveType enumeration.
649 ///
650 /// Parameter `primitiveCount`: The number of primitives in the data.
651 ///
652 /// Parameter `bytesPerIndex`: The number of bytes that represent a single index value in the data.
653 #[unsafe(method(geometryElementWithData:primitiveType:primitiveCount:bytesPerIndex:))]
654 #[unsafe(method_family = none)]
655 pub unsafe fn geometryElementWithData_primitiveType_primitiveCount_bytesPerIndex(
656 data: Option<&NSData>,
657 primitive_type: SCNGeometryPrimitiveType,
658 primitive_count: NSInteger,
659 bytes_per_index: NSInteger,
660 ) -> Retained<Self>;
661
662 /// Parameter `data`: The data that contains element indices. You can pass nil to use an implicit vertex ordering (0,1,2,…).
663 ///
664 /// Parameter `primitiveType`: The primitive type, as listed in the SCNGeometryPrimitiveType enumeration.
665 ///
666 /// Parameter `primitiveCount`: The number of primitives in the data.
667 ///
668 /// Parameter `indicesChannelCount`: The number of channels for the vertex indices.
669 ///
670 /// Parameter `interleavedIndicesChannels`: Whether the channels are interleaved.
671 ///
672 /// Parameter `bytesPerIndex`: The number of bytes that represent a single index value in the data.
673 #[unsafe(method(geometryElementWithData:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex:))]
674 #[unsafe(method_family = none)]
675 pub unsafe fn geometryElementWithData_primitiveType_primitiveCount_indicesChannelCount_interleavedIndicesChannels_bytesPerIndex(
676 data: Option<&NSData>,
677 primitive_type: SCNGeometryPrimitiveType,
678 primitive_count: NSInteger,
679 indices_channel_count: NSInteger,
680 interleaved_indices_channels: bool,
681 bytes_per_index: NSInteger,
682 ) -> Retained<Self>;
683
684 #[cfg(feature = "objc2-metal")]
685 #[cfg(not(target_os = "watchos"))]
686 /// Creates and returns a geometry element from the given Metal buffer and parameters.
687 ///
688 /// Parameter `buffer`: The buffer that contains element indices.
689 ///
690 /// Parameter `primitiveType`: The primitive type, as listed in the SCNGeometryPrimitiveType enumeration.
691 ///
692 /// Parameter `primitiveCount`: The number of primitives in the data.
693 ///
694 /// Parameter `bytesPerIndex`: The number of bytes that represent a single index value in the data.
695 #[unsafe(method(geometryElementWithBuffer:primitiveType:primitiveCount:bytesPerIndex:))]
696 #[unsafe(method_family = none)]
697 pub unsafe fn geometryElementWithBuffer_primitiveType_primitiveCount_bytesPerIndex(
698 buffer: &ProtocolObject<dyn MTLBuffer>,
699 primitive_type: SCNGeometryPrimitiveType,
700 primitive_count: NSInteger,
701 bytes_per_index: NSInteger,
702 ) -> Retained<Self>;
703
704 #[cfg(feature = "objc2-metal")]
705 #[cfg(not(target_os = "watchos"))]
706 #[unsafe(method(geometryElementWithBuffer:primitiveType:primitiveCount:indicesChannelCount:interleavedIndicesChannels:bytesPerIndex:))]
707 #[unsafe(method_family = none)]
708 pub unsafe fn geometryElementWithBuffer_primitiveType_primitiveCount_indicesChannelCount_interleavedIndicesChannels_bytesPerIndex(
709 buffer: &ProtocolObject<dyn MTLBuffer>,
710 primitive_type: SCNGeometryPrimitiveType,
711 primitive_count: NSInteger,
712 indices_channel_count: NSInteger,
713 interleaved_indices_channels: bool,
714 bytes_per_index: NSInteger,
715 ) -> Retained<Self>;
716
717 /// The data for the geometry element
718 #[unsafe(method(data))]
719 #[unsafe(method_family = none)]
720 pub unsafe fn data(&self) -> Retained<NSData>;
721
722 /// The type of the geometry element. Possible values are listed in the SCNGeometryPrimitiveType enumeration.
723 #[unsafe(method(primitiveType))]
724 #[unsafe(method_family = none)]
725 pub unsafe fn primitiveType(&self) -> SCNGeometryPrimitiveType;
726
727 /// The number of primitives in the data.
728 #[unsafe(method(primitiveCount))]
729 #[unsafe(method_family = none)]
730 pub unsafe fn primitiveCount(&self) -> NSInteger;
731
732 /// Determines whether the channels are interleaved.
733 #[unsafe(method(hasInterleavedIndicesChannels))]
734 #[unsafe(method_family = none)]
735 pub unsafe fn hasInterleavedIndicesChannels(&self) -> bool;
736
737 /// The number of channels in the geometry element.
738 #[unsafe(method(indicesChannelCount))]
739 #[unsafe(method_family = none)]
740 pub unsafe fn indicesChannelCount(&self) -> NSInteger;
741
742 /// The number of bytes that represent an index value
743 #[unsafe(method(bytesPerIndex))]
744 #[unsafe(method_family = none)]
745 pub unsafe fn bytesPerIndex(&self) -> NSInteger;
746
747 /// Specifies the subrange of primitives to render within NSMakeRange(0, primitiveCount). Defaults to NSMakeRange(NSNotFound, 0).
748 ///
749 /// When the location of the range is set to NSNotFound, the entire geometry element is rendered.
750 #[unsafe(method(primitiveRange))]
751 #[unsafe(method_family = none)]
752 pub unsafe fn primitiveRange(&self) -> NSRange;
753
754 /// Setter for [`primitiveRange`][Self::primitiveRange].
755 #[unsafe(method(setPrimitiveRange:))]
756 #[unsafe(method_family = none)]
757 pub unsafe fn setPrimitiveRange(&self, primitive_range: NSRange);
758
759 #[cfg(feature = "objc2-core-foundation")]
760 /// Specifies the size of the point in local space. Defaults to 1
761 #[unsafe(method(pointSize))]
762 #[unsafe(method_family = none)]
763 pub unsafe fn pointSize(&self) -> CGFloat;
764
765 #[cfg(feature = "objc2-core-foundation")]
766 /// Setter for [`pointSize`][Self::pointSize].
767 #[unsafe(method(setPointSize:))]
768 #[unsafe(method_family = none)]
769 pub unsafe fn setPointSize(&self, point_size: CGFloat);
770
771 #[cfg(feature = "objc2-core-foundation")]
772 /// Specifies the minimum size in screen-space (in pixel). Defaults to 1
773 #[unsafe(method(minimumPointScreenSpaceRadius))]
774 #[unsafe(method_family = none)]
775 pub unsafe fn minimumPointScreenSpaceRadius(&self) -> CGFloat;
776
777 #[cfg(feature = "objc2-core-foundation")]
778 /// Setter for [`minimumPointScreenSpaceRadius`][Self::minimumPointScreenSpaceRadius].
779 #[unsafe(method(setMinimumPointScreenSpaceRadius:))]
780 #[unsafe(method_family = none)]
781 pub unsafe fn setMinimumPointScreenSpaceRadius(
782 &self,
783 minimum_point_screen_space_radius: CGFloat,
784 );
785
786 #[cfg(feature = "objc2-core-foundation")]
787 /// Specifies the maximum size in screen-space (in pixel). Defaults to 1
788 #[unsafe(method(maximumPointScreenSpaceRadius))]
789 #[unsafe(method_family = none)]
790 pub unsafe fn maximumPointScreenSpaceRadius(&self) -> CGFloat;
791
792 #[cfg(feature = "objc2-core-foundation")]
793 /// Setter for [`maximumPointScreenSpaceRadius`][Self::maximumPointScreenSpaceRadius].
794 #[unsafe(method(setMaximumPointScreenSpaceRadius:))]
795 #[unsafe(method_family = none)]
796 pub unsafe fn setMaximumPointScreenSpaceRadius(
797 &self,
798 maximum_point_screen_space_radius: CGFloat,
799 );
800 );
801}
802
803/// Methods declared on superclass `NSObject`.
804impl SCNGeometryElement {
805 extern_methods!(
806 #[unsafe(method(init))]
807 #[unsafe(method_family = init)]
808 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
809
810 #[unsafe(method(new))]
811 #[unsafe(method_family = new)]
812 pub unsafe fn new() -> Retained<Self>;
813 );
814}
815
816/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scntessellationsmoothingmode?language=objc)
817// NS_ENUM
818#[repr(transparent)]
819#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
820pub struct SCNTessellationSmoothingMode(pub NSInteger);
821impl SCNTessellationSmoothingMode {
822 #[doc(alias = "SCNTessellationSmoothingModeNone")]
823 pub const None: Self = Self(0);
824 #[doc(alias = "SCNTessellationSmoothingModePNTriangles")]
825 pub const PNTriangles: Self = Self(1);
826 #[doc(alias = "SCNTessellationSmoothingModePhong")]
827 pub const Phong: Self = Self(2);
828}
829
830unsafe impl Encode for SCNTessellationSmoothingMode {
831 const ENCODING: Encoding = NSInteger::ENCODING;
832}
833
834unsafe impl RefEncode for SCNTessellationSmoothingMode {
835 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
836}
837
838extern_class!(
839 /// A geometry tessellator describes how a more detailed surface is calculated from the geometry's initial surface.
840 ///
841 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scngeometrytessellator?language=objc)
842 #[unsafe(super(NSObject))]
843 #[derive(Debug, PartialEq, Eq, Hash)]
844 pub struct SCNGeometryTessellator;
845);
846
847unsafe impl NSCoding for SCNGeometryTessellator {}
848
849unsafe impl NSCopying for SCNGeometryTessellator {}
850
851unsafe impl CopyingHelper for SCNGeometryTessellator {
852 type Result = Self;
853}
854
855unsafe impl NSObjectProtocol for SCNGeometryTessellator {}
856
857unsafe impl NSSecureCoding for SCNGeometryTessellator {}
858
859impl SCNGeometryTessellator {
860 extern_methods!(
861 #[cfg(feature = "objc2-core-foundation")]
862 /// Specifies the scale factor applied to the per-patch tessellation factors. Defaults to 1.
863 #[unsafe(method(tessellationFactorScale))]
864 #[unsafe(method_family = none)]
865 pub unsafe fn tessellationFactorScale(&self) -> CGFloat;
866
867 #[cfg(feature = "objc2-core-foundation")]
868 /// Setter for [`tessellationFactorScale`][Self::tessellationFactorScale].
869 #[unsafe(method(setTessellationFactorScale:))]
870 #[unsafe(method_family = none)]
871 pub unsafe fn setTessellationFactorScale(&self, tessellation_factor_scale: CGFloat);
872
873 #[cfg(feature = "objc2-metal")]
874 #[cfg(not(target_os = "watchos"))]
875 /// Specifies the tessellation partition mode. Defaults to MTLTessellationPartitionModeInteger.
876 #[unsafe(method(tessellationPartitionMode))]
877 #[unsafe(method_family = none)]
878 pub unsafe fn tessellationPartitionMode(&self) -> MTLTessellationPartitionMode;
879
880 #[cfg(feature = "objc2-metal")]
881 #[cfg(not(target_os = "watchos"))]
882 /// Setter for [`tessellationPartitionMode`][Self::tessellationPartitionMode].
883 #[unsafe(method(setTessellationPartitionMode:))]
884 #[unsafe(method_family = none)]
885 pub unsafe fn setTessellationPartitionMode(
886 &self,
887 tessellation_partition_mode: MTLTessellationPartitionMode,
888 );
889
890 /// Specifies if the tessellation should be uniform or adaptive. Defaults to NO.
891 #[unsafe(method(isAdaptive))]
892 #[unsafe(method_family = none)]
893 pub unsafe fn isAdaptive(&self) -> bool;
894
895 /// Setter for [`isAdaptive`][Self::isAdaptive].
896 #[unsafe(method(setAdaptive:))]
897 #[unsafe(method_family = none)]
898 pub unsafe fn setAdaptive(&self, adaptive: bool);
899
900 /// Specifies if the level of tessellation should be adapted in screenSpace. Defaults to NO.
901 #[unsafe(method(isScreenSpace))]
902 #[unsafe(method_family = none)]
903 pub unsafe fn isScreenSpace(&self) -> bool;
904
905 /// Setter for [`isScreenSpace`][Self::isScreenSpace].
906 #[unsafe(method(setScreenSpace:))]
907 #[unsafe(method_family = none)]
908 pub unsafe fn setScreenSpace(&self, screen_space: bool);
909
910 #[cfg(feature = "objc2-core-foundation")]
911 /// Specifies the edge tessellation factor. Defaults to 1.
912 ///
913 /// This has no effect for adaptive subdivision
914 #[unsafe(method(edgeTessellationFactor))]
915 #[unsafe(method_family = none)]
916 pub unsafe fn edgeTessellationFactor(&self) -> CGFloat;
917
918 #[cfg(feature = "objc2-core-foundation")]
919 /// Setter for [`edgeTessellationFactor`][Self::edgeTessellationFactor].
920 #[unsafe(method(setEdgeTessellationFactor:))]
921 #[unsafe(method_family = none)]
922 pub unsafe fn setEdgeTessellationFactor(&self, edge_tessellation_factor: CGFloat);
923
924 #[cfg(feature = "objc2-core-foundation")]
925 /// Specifies the inside tessellation factor. Defaults to 1.
926 ///
927 /// This has no effect for adaptive subdivision
928 #[unsafe(method(insideTessellationFactor))]
929 #[unsafe(method_family = none)]
930 pub unsafe fn insideTessellationFactor(&self) -> CGFloat;
931
932 #[cfg(feature = "objc2-core-foundation")]
933 /// Setter for [`insideTessellationFactor`][Self::insideTessellationFactor].
934 #[unsafe(method(setInsideTessellationFactor:))]
935 #[unsafe(method_family = none)]
936 pub unsafe fn setInsideTessellationFactor(&self, inside_tessellation_factor: CGFloat);
937
938 #[cfg(feature = "objc2-core-foundation")]
939 /// Specifies the maximum edge length. Defaults to 1.
940 ///
941 /// This has no effect for non-adaptive subdivision
942 #[unsafe(method(maximumEdgeLength))]
943 #[unsafe(method_family = none)]
944 pub unsafe fn maximumEdgeLength(&self) -> CGFloat;
945
946 #[cfg(feature = "objc2-core-foundation")]
947 /// Setter for [`maximumEdgeLength`][Self::maximumEdgeLength].
948 #[unsafe(method(setMaximumEdgeLength:))]
949 #[unsafe(method_family = none)]
950 pub unsafe fn setMaximumEdgeLength(&self, maximum_edge_length: CGFloat);
951
952 /// Defaults to SCNTessellationSmoothingModeNone.
953 #[unsafe(method(smoothingMode))]
954 #[unsafe(method_family = none)]
955 pub unsafe fn smoothingMode(&self) -> SCNTessellationSmoothingMode;
956
957 /// Setter for [`smoothingMode`][Self::smoothingMode].
958 #[unsafe(method(setSmoothingMode:))]
959 #[unsafe(method_family = none)]
960 pub unsafe fn setSmoothingMode(&self, smoothing_mode: SCNTessellationSmoothingMode);
961 );
962}
963
964/// Methods declared on superclass `NSObject`.
965impl SCNGeometryTessellator {
966 extern_methods!(
967 #[unsafe(method(init))]
968 #[unsafe(method_family = init)]
969 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
970
971 #[unsafe(method(new))]
972 #[unsafe(method_family = new)]
973 pub unsafe fn new() -> Retained<Self>;
974 );
975}