objc2_scene_kit/generated/SCNSceneSource.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::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern "C" {
11 /// Scene source properties
12 ///
13 /// File contributors. The values are dictionaries populated with keys documented in the "Contributor dictionary keys" group.
14 ///
15 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetcontributorskey?language=objc)
16 pub static SCNSceneSourceAssetContributorsKey: &'static NSString;
17}
18
19extern "C" {
20 /// When the file was created. The value is a NSDate instance.
21 ///
22 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetcreateddatekey?language=objc)
23 pub static SCNSceneSourceAssetCreatedDateKey: &'static NSString;
24}
25
26extern "C" {
27 /// When the file was last modified. The value is a NSDate instance.
28 ///
29 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetmodifieddatekey?language=objc)
30 pub static SCNSceneSourceAssetModifiedDateKey: &'static NSString;
31}
32
33extern "C" {
34 /// The up axis of the file. If the file is oriented Y-up, for example, then this is the string
35 /// @
36 /// "0.0 1.0 0.0"
37 ///
38 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetupaxiskey?language=objc)
39 pub static SCNSceneSourceAssetUpAxisKey: &'static NSString;
40}
41
42extern "C" {
43 /// The unit used in the file. The value is a dictionary populated with keys documented in the "Unit dictionary keys" group.
44 ///
45 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetunitkey?language=objc)
46 pub static SCNSceneSourceAssetUnitKey: &'static NSString;
47}
48
49extern "C" {
50 /// Contributor dictionary keys
51 ///
52 /// Authoring tool used to create the file. The corresponding value is an NSString.
53 ///
54 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetauthoringtoolkey?language=objc)
55 pub static SCNSceneSourceAssetAuthoringToolKey: &'static NSString;
56}
57
58extern "C" {
59 /// The file's author. The corresponding value is an NSString.
60 ///
61 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetauthorkey?language=objc)
62 pub static SCNSceneSourceAssetAuthorKey: &'static NSString;
63}
64
65extern "C" {
66 /// Unit dictionary keys
67 ///
68 /// The name (NSString) of the unit
69 ///
70 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetunitnamekey?language=objc)
71 pub static SCNSceneSourceAssetUnitNameKey: &'static NSString;
72}
73
74extern "C" {
75 /// A NSNumber encapsulating a floating-point value indicating how many meters the unit is. For example, if the name is
76 /// @
77 /// "centimeter", then this will be 0.01.
78 ///
79 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetunitmeterkey?language=objc)
80 pub static SCNSceneSourceAssetUnitMeterKey: &'static NSString;
81}
82
83/// Scene loading options
84///
85/// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceloadingoption?language=objc)
86// NS_TYPED_ENUM
87pub type SCNSceneSourceLoadingOption = NSString;
88
89extern "C" {
90 /// Enable to try to guess acceptable normals for the vertices if none are given in the file
91 ///
92 /// Use this with a boolean value encapsulated in a NSNumber. The default value is NO.
93 ///
94 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourcecreatenormalsifabsentkey?language=objc)
95 pub static SCNSceneSourceCreateNormalsIfAbsentKey: &'static SCNSceneSourceLoadingOption;
96}
97
98extern "C" {
99 /// Pass YES in order to perform the document validation.
100 ///
101 /// This option can be set in the options dictionary of the SCNScene and SCNSceneSource loading methods.
102 /// The value for this option should be a boolean NSNumber. If its boolean value is YES (the default is NO),
103 /// SceneKit will attempt to check the document for consistency.
104 /// If the document doesn't pass the consistency check it is then not loaded and an error is returned.
105 /// This is slower, but for security reasons it should be set to YES if you are not sure the files you load are valid and have not been tampered with.
106 ///
107 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourcecheckconsistencykey?language=objc)
108 pub static SCNSceneSourceCheckConsistencyKey: &'static SCNSceneSourceLoadingOption;
109}
110
111extern "C" {
112 /// Pass YES to flatten the scene graph when possible.
113 ///
114 /// This option can be set in the options dictionary of the SCNScene and SCNSceneSource loading methods.
115 /// The value for this option should be a boolean NSNumber. If its boolean value is YES (the default is NO),
116 /// SceneKit will attempt to reduce the scene graph by merging the geometries.
117 /// This option is suitable to preview a 3D scene efficiently and when manipulating the scene graph is not needed.
118 ///
119 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceflattenscenekey?language=objc)
120 pub static SCNSceneSourceFlattenSceneKey: &'static SCNSceneSourceLoadingOption;
121}
122
123extern "C" {
124 /// Pass YES in order to enable the safe mode.
125 ///
126 /// This option can be set in the options dictionary of the SCNScene and SCNSceneSource loading methods.
127 /// The value for this option should be a boolean NSNumber. If its boolean value is YES (the default is NO),
128 /// SceneKit will forbid network accesses, prevent the loading of resources from arbitrary directories, and will not execute
129 /// any code present in the loaded files.
130 ///
131 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceusesafemodekey?language=objc)
132 pub static SCNSceneSourceUseSafeModeKey: &'static SCNSceneSourceLoadingOption;
133}
134
135extern "C" {
136 /// Pass an array of directory URLs where SceneKit should look for resources
137 ///
138 /// By default, SceneKit will look for the external resources it cannot find in the parent directory of the imported file.
139 /// You can add additional directories by setting an array of URLs for this key when calling sceneWithOptions:error:.
140 /// This is recommended if you want to construct your scene source from a data object, not from an URL,
141 /// and need to load resources whose paths are not absolute.
142 ///
143 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceassetdirectoryurlskey?language=objc)
144 pub static SCNSceneSourceAssetDirectoryURLsKey: &'static SCNSceneSourceLoadingOption;
145}
146
147extern "C" {
148 /// Pass YES in order to override assets URLs with the directory URLs passed via SCNSceneSourceAssetDirectoryURLsKey.
149 ///
150 /// By default, SceneKit will look for the external resources using the paths/urls as described in the imported file.
151 /// You can force SceneKit to only search for extern resources within the directories specified by the SCNSceneSourceAssetDirectoryURLsKey key.
152 /// This can be useful to load a file and its resources from a specific bundle for instance.
153 ///
154 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceoverrideasseturlskey?language=objc)
155 pub static SCNSceneSourceOverrideAssetURLsKey: &'static SCNSceneSourceLoadingOption;
156}
157
158extern "C" {
159 /// Pass YES to interpret the 3D format of the file in a strict way.
160 ///
161 /// This option defaults to NO. In this case SceneKit will try to read any additional metadata present in the file to
162 /// enable additional features and make the rendering as close as possible to the original intent. If you pass YES,
163 /// SceneKit will instead only consider features which are part of the file format specification.
164 ///
165 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourcestrictconformancekey?language=objc)
166 pub static SCNSceneSourceStrictConformanceKey: &'static SCNSceneSourceLoadingOption;
167}
168
169extern "C" {
170 /// Pass the units you want the scene to be converted to (in meter).
171 ///
172 /// Use this with a floating value encapsulated in a NSNumber. The default value is nil which means no conversion done. Passing a non-zero value will convert the scene coordinates so that 1 unit corresponds to N meters. For example pass 0.01 for 1 unit == 1 centimeter, pass 0.3048 for 1 unit == 1 foot...
173 /// For better physics simulation it is recommended to use 1 unit equals to 1 meter.
174 /// This option has no effect for SCN files or if the asset is already compressed by Xcode (use the compression options instead).
175 ///
176 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceconvertunitstometerskey?language=objc)
177 pub static SCNSceneSourceConvertUnitsToMetersKey: &'static SCNSceneSourceLoadingOption;
178}
179
180extern "C" {
181 /// Pass YES if a scene should be converted to Y up if it currently has a different up axis.
182 ///
183 /// Use this with a boolean value encapsulated in a NSNumber. The default value is NO.
184 /// This option has no effect for SCN files or if the asset is already compressed by Xcode (use the compression options instead).
185 ///
186 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceconverttoyupkey?language=objc)
187 pub static SCNSceneSourceConvertToYUpKey: &'static SCNSceneSourceLoadingOption;
188}
189
190extern "C" {
191 /// Pass one of the value below to specify what to do with loaded animations.
192 ///
193 /// See below for the description of each individual key. Defaults to SCNSceneSourceAnimationImportPolicyPlayRepeatedly. On 10.9 and before the behavior is SCNSceneSourceAnimationImportPolicyPlayUsingSceneTimeBase. For compatibility reason if the application was built on 10.9 or before the default behavior is SCNSceneSourceAnimationImportPolicyPlayUsingSceneTimeBase.
194 ///
195 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceanimationimportpolicykey?language=objc)
196 pub static SCNSceneSourceAnimationImportPolicyKey: &'static SCNSceneSourceLoadingOption;
197}
198
199extern "C" {
200 /// Pass YES to make SceneKit preserve the original topology instead of triangulating at load time. This can be useful to get better results when subdividing a geometry.
201 ///
202 /// Defaults to YES starting macOS 10.15, iOS 13, tvOS 13 and watchOS 6. Defaults to NO in previous versions.
203 ///
204 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceloadingoptionpreserveoriginaltopology?language=objc)
205 pub static SCNSceneSourceLoadingOptionPreserveOriginalTopology:
206 &'static SCNSceneSourceLoadingOption;
207}
208
209/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceanimationimportpolicy?language=objc)
210// NS_TYPED_ENUM
211pub type SCNSceneSourceAnimationImportPolicy = NSString;
212
213extern "C" {
214 /// Add animations to the scene and play them once (repeatCount set to 1).
215 ///
216 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceanimationimportpolicyplay?language=objc)
217 pub static SCNSceneSourceAnimationImportPolicyPlay:
218 &'static SCNSceneSourceAnimationImportPolicy;
219}
220
221extern "C" {
222 /// Add animations to the scene and play them repeatedly (repeatCount set to infinity).
223 ///
224 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceanimationimportpolicyplayrepeatedly?language=objc)
225 pub static SCNSceneSourceAnimationImportPolicyPlayRepeatedly:
226 &'static SCNSceneSourceAnimationImportPolicy;
227}
228
229extern "C" {
230 /// Only keep animations in the SCNSceneSource and don't add to the animatable elements of the scene.
231 ///
232 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceanimationimportpolicydonotplay?language=objc)
233 pub static SCNSceneSourceAnimationImportPolicyDoNotPlay:
234 &'static SCNSceneSourceAnimationImportPolicy;
235}
236
237extern "C" {
238 /// Add animations to the scene and play them using the SCNView/SCNRenderer's scene time (usesSceneTimeBase set to YES)
239 ///
240 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourceanimationimportpolicyplayusingscenetimebase?language=objc)
241 pub static SCNSceneSourceAnimationImportPolicyPlayUsingSceneTimeBase:
242 &'static SCNSceneSourceAnimationImportPolicy;
243}
244
245extern "C" {
246 /// Key to access the detailed validation errors.
247 ///
248 /// This key will be present in the user info dictionary of errors created by the various sceneWithOptions: methods.
249 /// When present, the value associated with it is an array of detailed errors found by the consistency checker
250 /// which represent consistency errors in the 3D file. Some metadata about these detailed errors is available
251 /// in their user info dictionary using the other keys (SCNConsistency*) defined in this file.
252 ///
253 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scndetailederrorskey?language=objc)
254 pub static SCNDetailedErrorsKey: &'static NSString;
255}
256
257extern "C" {
258 /// For XML-based formats, the ID of the element where the error occurred.
259 ///
260 /// When the element does not have an ID, the ID of the closest parent element which has one is returned.
261 ///
262 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencyelementiderrorkey?language=objc)
263 pub static SCNConsistencyElementIDErrorKey: &'static NSString;
264}
265
266extern "C" {
267 /// For XML-based formats, the tag name of the element where the error occurred.
268 ///
269 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencyelementtypeerrorkey?language=objc)
270 pub static SCNConsistencyElementTypeErrorKey: &'static NSString;
271}
272
273extern "C" {
274 /// For text-based formats, the line number where an error occurred.
275 ///
276 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencylinenumbererrorkey?language=objc)
277 pub static SCNConsistencyLineNumberErrorKey: &'static NSString;
278}
279
280/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencyinvalidurierror?language=objc)
281pub const SCNConsistencyInvalidURIError: c_uint = 1000;
282/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencyinvalidcounterror?language=objc)
283pub const SCNConsistencyInvalidCountError: c_uint = 1001;
284/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencyinvalidargumenterror?language=objc)
285pub const SCNConsistencyInvalidArgumentError: c_uint = 1002;
286/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencymissingelementerror?language=objc)
287pub const SCNConsistencyMissingElementError: c_uint = 1003;
288/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencymissingattributeerror?language=objc)
289pub const SCNConsistencyMissingAttributeError: c_uint = 1004;
290/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnconsistencyxmlschemavalidationerror?language=objc)
291pub const SCNConsistencyXMLSchemaValidationError: c_uint = 1005;
292
293/// Represents a phase of the loading process.
294///
295/// Each of these constants (except SCNSceneSourceStatusError) represents a phase of the loading process. "Parsing" means that the document is being deserialized, "validating" that it's being checked for consistency, "processing" that the resulting object is being loaded. New values might be added to this enumeration to make it more detailed; however the values will always be ordered in the same order as the corresponding phases are executed.
296///
297/// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourcestatus?language=objc)
298// NS_ENUM
299#[repr(transparent)]
300#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
301pub struct SCNSceneSourceStatus(pub NSInteger);
302impl SCNSceneSourceStatus {
303 #[doc(alias = "SCNSceneSourceStatusError")]
304 pub const Error: Self = Self(-1);
305 #[doc(alias = "SCNSceneSourceStatusParsing")]
306 pub const Parsing: Self = Self(4);
307 #[doc(alias = "SCNSceneSourceStatusValidating")]
308 pub const Validating: Self = Self(8);
309 #[doc(alias = "SCNSceneSourceStatusProcessing")]
310 pub const Processing: Self = Self(12);
311 #[doc(alias = "SCNSceneSourceStatusComplete")]
312 pub const Complete: Self = Self(16);
313}
314
315unsafe impl Encode for SCNSceneSourceStatus {
316 const ENCODING: Encoding = NSInteger::ENCODING;
317}
318
319unsafe impl RefEncode for SCNSceneSourceStatus {
320 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
321}
322
323/// [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesourcestatushandler?language=objc)
324#[cfg(feature = "block2")]
325pub type SCNSceneSourceStatusHandler =
326 *mut block2::Block<dyn Fn(c_float, SCNSceneSourceStatus, *mut NSError, NonNull<Bool>)>;
327
328extern_class!(
329 /// SCNSceneSource objects, abstract the data-reading task. A scene source can read scene data from a URL or a NSData object.
330 /// After creating a SCNSceneSource object for the appropriate source, you can obtain scenes using SCNSceneSource methods.
331 ///
332 /// See also [Apple's documentation](https://developer.apple.com/documentation/scenekit/scnscenesource?language=objc)
333 #[unsafe(super(NSObject))]
334 #[derive(Debug, PartialEq, Eq, Hash)]
335 pub struct SCNSceneSource;
336);
337
338unsafe impl NSObjectProtocol for SCNSceneSource {}
339
340impl SCNSceneSource {
341 extern_methods!(
342 /// Creates and initialize a SCNSceneSource instance.
343 ///
344 /// Parameter `url`: The URL to read scenes from.
345 ///
346 /// Parameter `options`: An optional dictionary for future extensions.
347 #[unsafe(method(sceneSourceWithURL:options:))]
348 #[unsafe(method_family = none)]
349 pub unsafe fn sceneSourceWithURL_options(
350 url: &NSURL,
351 options: Option<&NSDictionary<SCNSceneSourceLoadingOption, AnyObject>>,
352 ) -> Option<Retained<Self>>;
353
354 /// Creates and initialize a SCNSceneSource instance.
355 ///
356 /// Parameter `data`: The scene data.
357 ///
358 /// Parameter `options`: An optional dictionary for future extensions.
359 #[unsafe(method(sceneSourceWithData:options:))]
360 #[unsafe(method_family = none)]
361 pub unsafe fn sceneSourceWithData_options(
362 data: &NSData,
363 options: Option<&NSDictionary<SCNSceneSourceLoadingOption, AnyObject>>,
364 ) -> Option<Retained<Self>>;
365
366 /// Initialize a SCNSceneSource instance from a URL.
367 ///
368 /// Parameter `url`: The URL to read scenes from.
369 ///
370 /// Parameter `options`: An optional dictionary for future extensions.
371 #[unsafe(method(initWithURL:options:))]
372 #[unsafe(method_family = init)]
373 pub unsafe fn initWithURL_options(
374 this: Allocated<Self>,
375 url: &NSURL,
376 options: Option<&NSDictionary<SCNSceneSourceLoadingOption, AnyObject>>,
377 ) -> Option<Retained<Self>>;
378
379 /// Initialize a SCNSceneSource instance from a NSData object.
380 ///
381 /// Parameter `data`: The data to read scenes from.
382 ///
383 /// Parameter `options`: An optional dictionary for future extensions.
384 #[unsafe(method(initWithData:options:))]
385 #[unsafe(method_family = init)]
386 pub unsafe fn initWithData_options(
387 this: Allocated<Self>,
388 data: &NSData,
389 options: Option<&NSDictionary<SCNSceneSourceLoadingOption, AnyObject>>,
390 ) -> Option<Retained<Self>>;
391
392 /// The receiver's URL (if any).
393 #[unsafe(method(url))]
394 #[unsafe(method_family = none)]
395 pub unsafe fn url(&self) -> Option<Retained<NSURL>>;
396
397 /// The receiver's data (if any).
398 #[unsafe(method(data))]
399 #[unsafe(method_family = none)]
400 pub unsafe fn data(&self) -> Option<Retained<NSData>>;
401
402 #[cfg(all(feature = "SCNScene", feature = "block2"))]
403 /// Creates and initializes the scene described in the 3D file with the specified options and lets you monitor the progress.
404 ///
405 /// Parameter `options`: A dictionary of options. The valid keys are described in the "Scene loading options" section.
406 ///
407 /// Parameter `statusHandler`: This block will be called repeatedly while the scene is being loaded.
408 /// - The first argument, overallProgress, is a floating-point number between 0 and 1. 0 means the loading process has just started and 1 that it is complete.
409 /// - The second argument, status, tells you what the source is currently doing. It takes one of the values in the SCNSceneSourceStatus enum. New values might be added to this enum in the future.
410 /// - If status == SCNSceneStatusError, then error will contain more information about the failure, and the method will return nil after having called the block. Otherwise error will be nil.
411 /// - Set *stop to YES if you want the source to abort the loading operation.
412 #[unsafe(method(sceneWithOptions:statusHandler:))]
413 #[unsafe(method_family = none)]
414 pub unsafe fn sceneWithOptions_statusHandler(
415 &self,
416 options: Option<&NSDictionary<SCNSceneSourceLoadingOption, AnyObject>>,
417 status_handler: SCNSceneSourceStatusHandler,
418 ) -> Option<Retained<SCNScene>>;
419
420 #[cfg(feature = "SCNScene")]
421 /// Creates and initializes the scene described in the 3D file with the specified options.
422 ///
423 /// Parameter `options`: A dictionary of options. The valid keys are described in the "Scene loading options" section.
424 ///
425 /// Parameter `error`: If this method returns nil, an error providing more information is returned by reference.
426 ///
427 /// This simpler version is equivalent to providing a block to sceneWithOptions:statusHandler: and checking the "error"
428 /// parameter of the block if the status is SCNSceneStatusError.
429 #[unsafe(method(sceneWithOptions:error:_))]
430 #[unsafe(method_family = none)]
431 pub unsafe fn sceneWithOptions_error(
432 &self,
433 options: Option<&NSDictionary<SCNSceneSourceLoadingOption, AnyObject>>,
434 ) -> Result<Retained<SCNScene>, Retained<NSError>>;
435
436 /// Parameter `key`: The key for which to return the corresponding property.
437 ///
438 /// Returns the property as defined in the 3D file for the given key. See keys above.
439 #[unsafe(method(propertyForKey:))]
440 #[unsafe(method_family = none)]
441 pub unsafe fn propertyForKey(&self, key: &NSString) -> Option<Retained<AnyObject>>;
442
443 /// Returns the instance of "entryClass" found in the receiver's library with the id "uid".
444 ///
445 /// Parameter `uid`: The id of the entry to find as specified in the source file
446 ///
447 /// Parameter `entryClass`: Specifies the type of the object to be returned. It can be one of the following classes: SCNMaterial, SCNGeometry, SCNScene, SCNNode, CAAnimation, SCNLight, SCNCamera, SCNSkinner, SCNMorpher, NSImage
448 ///
449 /// Returns NULL if the receiver's library doesn't contains such an uid for the specified type.
450 #[unsafe(method(entryWithIdentifier:withClass:))]
451 #[unsafe(method_family = none)]
452 pub unsafe fn entryWithIdentifier_withClass(
453 &self,
454 uid: &NSString,
455 entry_class: &AnyClass,
456 ) -> Option<Retained<AnyObject>>;
457
458 /// Returns the IDs found in the receiver's library for the class "entryClass".
459 ///
460 /// Parameter `entryClass`: Specifies the type of the object referenced by the returned IDs. It can be one of the following classes: SCNMaterial, SCNScene, SCNGeometry, SCNNode, CAAnimation, SCNLight, SCNCamera, SCNSkinner, SCNMorpher, NSImage
461 #[unsafe(method(identifiersOfEntriesWithClass:))]
462 #[unsafe(method_family = none)]
463 pub unsafe fn identifiersOfEntriesWithClass(
464 &self,
465 entry_class: &AnyClass,
466 ) -> Retained<NSArray<NSString>>;
467
468 #[cfg(feature = "block2")]
469 /// Returns the entries in the receiver's library that pass a test in a given Block.
470 ///
471 /// Parameter `predicate`: The block to apply to entries in the library. The block takes three arguments: "entry" is an entry in the library, "identifier" is the ID of this entry and "stop" is a reference to a Boolean value. The block can set the value to YES to stop further processing of the library. The stop argument is an out-only argument. You should only ever set this Boolean to YES within the Block. The Block returns a Boolean value that indicates whether "entry" passed the test.
472 ///
473 /// The entry is an instance of one of following classes: SCNMaterial, SCNScene, SCNGeometry, SCNNode, CAAnimation, SCNLight, SCNCamera, SCNSkinner, SCNMorpher, NSImage.
474 #[unsafe(method(entriesPassingTest:))]
475 #[unsafe(method_family = none)]
476 pub unsafe fn entriesPassingTest(
477 &self,
478 predicate: &block2::Block<
479 dyn Fn(NonNull<AnyObject>, NonNull<NSString>, NonNull<Bool>) -> Bool + '_,
480 >,
481 ) -> Retained<NSArray<AnyObject>>;
482 );
483}
484
485/// Methods declared on superclass `NSObject`.
486impl SCNSceneSource {
487 extern_methods!(
488 #[unsafe(method(init))]
489 #[unsafe(method_family = init)]
490 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
491
492 #[unsafe(method(new))]
493 #[unsafe(method_family = new)]
494 pub unsafe fn new() -> Retained<Self>;
495 );
496}