objc2_model_io/generated/
MDLTexture.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-core-graphics")]
9use objc2_core_graphics::*;
10use objc2_foundation::*;
11
12use crate::*;
13
14#[repr(transparent)]
19#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
20pub struct MDLTextureChannelEncoding(pub NSInteger);
21impl MDLTextureChannelEncoding {
22 #[doc(alias = "MDLTextureChannelEncodingUInt8")]
23 pub const UInt8: Self = Self(1);
24 #[doc(alias = "MDLTextureChannelEncodingUint8")]
25 pub const Uint8: Self = Self(1);
26 #[doc(alias = "MDLTextureChannelEncodingUInt16")]
27 pub const UInt16: Self = Self(2);
28 #[doc(alias = "MDLTextureChannelEncodingUint16")]
29 pub const Uint16: Self = Self(2);
30 #[doc(alias = "MDLTextureChannelEncodingUInt24")]
31 pub const UInt24: Self = Self(3);
32 #[doc(alias = "MDLTextureChannelEncodingUint24")]
33 pub const Uint24: Self = Self(3);
34 #[doc(alias = "MDLTextureChannelEncodingUInt32")]
35 pub const UInt32: Self = Self(4);
36 #[doc(alias = "MDLTextureChannelEncodingUint32")]
37 pub const Uint32: Self = Self(4);
38 #[doc(alias = "MDLTextureChannelEncodingFloat16")]
39 pub const Float16: Self = Self(0x102);
40 #[doc(alias = "MDLTextureChannelEncodingFloat16SR")]
41 pub const Float16SR: Self = Self(0x302);
42 #[doc(alias = "MDLTextureChannelEncodingFloat32")]
43 pub const Float32: Self = Self(0x104);
44}
45
46unsafe impl Encode for MDLTextureChannelEncoding {
47 const ENCODING: Encoding = NSInteger::ENCODING;
48}
49
50unsafe impl RefEncode for MDLTextureChannelEncoding {
51 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
52}
53
54extern_class!(
55 #[unsafe(super(NSObject))]
86 #[derive(Debug, PartialEq, Eq, Hash)]
87 pub struct MDLTexture;
88);
89
90#[cfg(feature = "MDLTypes")]
91extern_conformance!(
92 unsafe impl MDLNamed for MDLTexture {}
93);
94
95extern_conformance!(
96 unsafe impl NSObjectProtocol for MDLTexture {}
97);
98
99impl MDLTexture {
100 extern_methods!(
101 #[unsafe(method(init))]
102 #[unsafe(method_family = init)]
103 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
104
105 #[unsafe(method(textureNamed:))]
108 #[unsafe(method_family = none)]
109 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
110
111 #[unsafe(method(textureNamed:bundle:))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn textureNamed_bundle(
114 name: &NSString,
115 bundle_or_nil: Option<&NSBundle>,
116 ) -> Option<Retained<Self>>;
117
118 #[cfg(feature = "MDLAssetResolver")]
119 #[unsafe(method(textureNamed:assetResolver:))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn textureNamed_assetResolver(
122 name: &NSString,
123 resolver: &ProtocolObject<dyn MDLAssetResolver>,
124 ) -> Option<Retained<Self>>;
125
126 #[unsafe(method(textureCubeWithImagesNamed:))]
142 #[unsafe(method_family = none)]
143 pub unsafe fn textureCubeWithImagesNamed(
144 names: &NSArray<NSString>,
145 ) -> Option<Retained<Self>>;
146
147 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
148 #[unsafe(method_family = none)]
149 pub unsafe fn textureCubeWithImagesNamed_bundle(
150 names: &NSArray<NSString>,
151 bundle_or_nil: Option<&NSBundle>,
152 ) -> Option<Retained<Self>>;
153
154 #[unsafe(method(writeToURL:))]
156 #[unsafe(method_family = none)]
157 pub unsafe fn writeToURL(&self, url: &NSURL) -> bool;
158
159 #[unsafe(method(writeToURL:level:))]
161 #[unsafe(method_family = none)]
162 pub unsafe fn writeToURL_level(&self, url: &NSURL, level: NSUInteger) -> bool;
163
164 #[cfg(feature = "objc2-core-foundation")]
165 #[unsafe(method(writeToURL:type:))]
167 #[unsafe(method_family = none)]
168 pub unsafe fn writeToURL_type(&self, nsurl: &NSURL, r#type: &CFString) -> bool;
169
170 #[cfg(feature = "objc2-core-foundation")]
171 #[unsafe(method(writeToURL:type:level:))]
173 #[unsafe(method_family = none)]
174 pub unsafe fn writeToURL_type_level(
175 &self,
176 nsurl: &NSURL,
177 r#type: &CFString,
178 level: NSUInteger,
179 ) -> bool;
180
181 #[cfg(feature = "objc2-core-graphics")]
182 #[unsafe(method(imageFromTexture))]
183 #[unsafe(method_family = none)]
184 pub unsafe fn imageFromTexture(&self) -> Option<Retained<CGImage>>;
185
186 #[cfg(feature = "objc2-core-graphics")]
187 #[unsafe(method(imageFromTextureAtLevel:))]
188 #[unsafe(method_family = none)]
189 pub unsafe fn imageFromTextureAtLevel(
190 &self,
191 level: NSUInteger,
192 ) -> Option<Retained<CGImage>>;
193
194 #[unsafe(method(texelDataWithTopLeftOrigin))]
195 #[unsafe(method_family = none)]
196 pub unsafe fn texelDataWithTopLeftOrigin(&self) -> Option<Retained<NSData>>;
197
198 #[unsafe(method(texelDataWithBottomLeftOrigin))]
199 #[unsafe(method_family = none)]
200 pub unsafe fn texelDataWithBottomLeftOrigin(&self) -> Option<Retained<NSData>>;
201
202 #[unsafe(method(texelDataWithTopLeftOriginAtMipLevel:create:))]
203 #[unsafe(method_family = none)]
204 pub unsafe fn texelDataWithTopLeftOriginAtMipLevel_create(
205 &self,
206 level: NSInteger,
207 create: bool,
208 ) -> Option<Retained<NSData>>;
209
210 #[unsafe(method(texelDataWithBottomLeftOriginAtMipLevel:create:))]
211 #[unsafe(method_family = none)]
212 pub unsafe fn texelDataWithBottomLeftOriginAtMipLevel_create(
213 &self,
214 level: NSInteger,
215 create: bool,
216 ) -> Option<Retained<NSData>>;
217
218 #[unsafe(method(rowStride))]
219 #[unsafe(method_family = none)]
220 pub unsafe fn rowStride(&self) -> NSInteger;
221
222 #[unsafe(method(channelCount))]
223 #[unsafe(method_family = none)]
224 pub unsafe fn channelCount(&self) -> NSUInteger;
225
226 #[unsafe(method(mipLevelCount))]
227 #[unsafe(method_family = none)]
228 pub unsafe fn mipLevelCount(&self) -> NSUInteger;
229
230 #[unsafe(method(channelEncoding))]
231 #[unsafe(method_family = none)]
232 pub unsafe fn channelEncoding(&self) -> MDLTextureChannelEncoding;
233
234 #[unsafe(method(isCube))]
235 #[unsafe(method_family = none)]
236 pub unsafe fn isCube(&self) -> bool;
237
238 #[unsafe(method(setIsCube:))]
240 #[unsafe(method_family = none)]
241 pub unsafe fn setIsCube(&self, is_cube: bool);
242
243 #[unsafe(method(hasAlphaValues))]
248 #[unsafe(method_family = none)]
249 pub unsafe fn hasAlphaValues(&self) -> bool;
250
251 #[unsafe(method(setHasAlphaValues:))]
253 #[unsafe(method_family = none)]
254 pub unsafe fn setHasAlphaValues(&self, has_alpha_values: bool);
255 );
256}
257
258impl MDLTexture {
260 extern_methods!(
261 #[unsafe(method(new))]
262 #[unsafe(method_family = new)]
263 pub unsafe fn new() -> Retained<Self>;
264 );
265}
266
267extern_class!(
268 #[unsafe(super(MDLTexture, NSObject))]
277 #[derive(Debug, PartialEq, Eq, Hash)]
278 pub struct MDLURLTexture;
279);
280
281#[cfg(feature = "MDLTypes")]
282extern_conformance!(
283 unsafe impl MDLNamed for MDLURLTexture {}
284);
285
286extern_conformance!(
287 unsafe impl NSObjectProtocol for MDLURLTexture {}
288);
289
290impl MDLURLTexture {
291 extern_methods!(
292 #[unsafe(method(initWithURL:name:))]
293 #[unsafe(method_family = init)]
294 pub unsafe fn initWithURL_name(
295 this: Allocated<Self>,
296 url: &NSURL,
297 name: Option<&NSString>,
298 ) -> Retained<Self>;
299
300 #[unsafe(method(URL))]
301 #[unsafe(method_family = none)]
302 pub unsafe fn URL(&self) -> Retained<NSURL>;
303
304 #[unsafe(method(setURL:))]
308 #[unsafe(method_family = none)]
309 pub unsafe fn setURL(&self, url: &NSURL);
310 );
311}
312
313impl MDLURLTexture {
315 extern_methods!(
316 #[unsafe(method(init))]
317 #[unsafe(method_family = init)]
318 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
319
320 #[unsafe(method(textureNamed:))]
323 #[unsafe(method_family = none)]
324 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
325
326 #[unsafe(method(textureNamed:bundle:))]
327 #[unsafe(method_family = none)]
328 pub unsafe fn textureNamed_bundle(
329 name: &NSString,
330 bundle_or_nil: Option<&NSBundle>,
331 ) -> Option<Retained<Self>>;
332
333 #[cfg(feature = "MDLAssetResolver")]
334 #[unsafe(method(textureNamed:assetResolver:))]
335 #[unsafe(method_family = none)]
336 pub unsafe fn textureNamed_assetResolver(
337 name: &NSString,
338 resolver: &ProtocolObject<dyn MDLAssetResolver>,
339 ) -> Option<Retained<Self>>;
340
341 #[unsafe(method(textureCubeWithImagesNamed:))]
357 #[unsafe(method_family = none)]
358 pub unsafe fn textureCubeWithImagesNamed(
359 names: &NSArray<NSString>,
360 ) -> Option<Retained<Self>>;
361
362 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
363 #[unsafe(method_family = none)]
364 pub unsafe fn textureCubeWithImagesNamed_bundle(
365 names: &NSArray<NSString>,
366 bundle_or_nil: Option<&NSBundle>,
367 ) -> Option<Retained<Self>>;
368 );
369}
370
371impl MDLURLTexture {
373 extern_methods!(
374 #[unsafe(method(new))]
375 #[unsafe(method_family = new)]
376 pub unsafe fn new() -> Retained<Self>;
377 );
378}
379
380extern_class!(
381 #[unsafe(super(MDLTexture, NSObject))]
390 #[derive(Debug, PartialEq, Eq, Hash)]
391 pub struct MDLCheckerboardTexture;
392);
393
394#[cfg(feature = "MDLTypes")]
395extern_conformance!(
396 unsafe impl MDLNamed for MDLCheckerboardTexture {}
397);
398
399extern_conformance!(
400 unsafe impl NSObjectProtocol for MDLCheckerboardTexture {}
401);
402
403impl MDLCheckerboardTexture {
404 extern_methods!(
405 #[unsafe(method(divisions))]
406 #[unsafe(method_family = none)]
407 pub unsafe fn divisions(&self) -> c_float;
408
409 #[unsafe(method(setDivisions:))]
411 #[unsafe(method_family = none)]
412 pub unsafe fn setDivisions(&self, divisions: c_float);
413
414 #[cfg(feature = "objc2-core-graphics")]
415 #[unsafe(method(color1))]
416 #[unsafe(method_family = none)]
417 pub unsafe fn color1(&self) -> Option<Retained<CGColor>>;
418
419 #[cfg(feature = "objc2-core-graphics")]
420 #[unsafe(method(setColor1:))]
422 #[unsafe(method_family = none)]
423 pub unsafe fn setColor1(&self, color1: Option<&CGColor>);
424
425 #[cfg(feature = "objc2-core-graphics")]
426 #[unsafe(method(color2))]
427 #[unsafe(method_family = none)]
428 pub unsafe fn color2(&self) -> Option<Retained<CGColor>>;
429
430 #[cfg(feature = "objc2-core-graphics")]
431 #[unsafe(method(setColor2:))]
433 #[unsafe(method_family = none)]
434 pub unsafe fn setColor2(&self, color2: Option<&CGColor>);
435 );
436}
437
438impl MDLCheckerboardTexture {
440 extern_methods!(
441 #[unsafe(method(init))]
442 #[unsafe(method_family = init)]
443 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
444
445 #[unsafe(method(textureNamed:))]
448 #[unsafe(method_family = none)]
449 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
450
451 #[unsafe(method(textureNamed:bundle:))]
452 #[unsafe(method_family = none)]
453 pub unsafe fn textureNamed_bundle(
454 name: &NSString,
455 bundle_or_nil: Option<&NSBundle>,
456 ) -> Option<Retained<Self>>;
457
458 #[cfg(feature = "MDLAssetResolver")]
459 #[unsafe(method(textureNamed:assetResolver:))]
460 #[unsafe(method_family = none)]
461 pub unsafe fn textureNamed_assetResolver(
462 name: &NSString,
463 resolver: &ProtocolObject<dyn MDLAssetResolver>,
464 ) -> Option<Retained<Self>>;
465
466 #[unsafe(method(textureCubeWithImagesNamed:))]
482 #[unsafe(method_family = none)]
483 pub unsafe fn textureCubeWithImagesNamed(
484 names: &NSArray<NSString>,
485 ) -> Option<Retained<Self>>;
486
487 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
488 #[unsafe(method_family = none)]
489 pub unsafe fn textureCubeWithImagesNamed_bundle(
490 names: &NSArray<NSString>,
491 bundle_or_nil: Option<&NSBundle>,
492 ) -> Option<Retained<Self>>;
493 );
494}
495
496impl MDLCheckerboardTexture {
498 extern_methods!(
499 #[unsafe(method(new))]
500 #[unsafe(method_family = new)]
501 pub unsafe fn new() -> Retained<Self>;
502 );
503}
504
505extern_class!(
506 #[unsafe(super(MDLTexture, NSObject))]
556 #[derive(Debug, PartialEq, Eq, Hash)]
557 pub struct MDLSkyCubeTexture;
558);
559
560#[cfg(feature = "MDLTypes")]
561extern_conformance!(
562 unsafe impl MDLNamed for MDLSkyCubeTexture {}
563);
564
565extern_conformance!(
566 unsafe impl NSObjectProtocol for MDLSkyCubeTexture {}
567);
568
569impl MDLSkyCubeTexture {
570 extern_methods!(
571 #[unsafe(method(updateTexture))]
573 #[unsafe(method_family = none)]
574 pub unsafe fn updateTexture(&self);
575
576 #[unsafe(method(turbidity))]
577 #[unsafe(method_family = none)]
578 pub unsafe fn turbidity(&self) -> c_float;
579
580 #[unsafe(method(setTurbidity:))]
582 #[unsafe(method_family = none)]
583 pub unsafe fn setTurbidity(&self, turbidity: c_float);
584
585 #[unsafe(method(sunElevation))]
586 #[unsafe(method_family = none)]
587 pub unsafe fn sunElevation(&self) -> c_float;
588
589 #[unsafe(method(setSunElevation:))]
591 #[unsafe(method_family = none)]
592 pub unsafe fn setSunElevation(&self, sun_elevation: c_float);
593
594 #[unsafe(method(sunAzimuth))]
595 #[unsafe(method_family = none)]
596 pub unsafe fn sunAzimuth(&self) -> c_float;
597
598 #[unsafe(method(setSunAzimuth:))]
600 #[unsafe(method_family = none)]
601 pub unsafe fn setSunAzimuth(&self, sun_azimuth: c_float);
602
603 #[unsafe(method(upperAtmosphereScattering))]
604 #[unsafe(method_family = none)]
605 pub unsafe fn upperAtmosphereScattering(&self) -> c_float;
606
607 #[unsafe(method(setUpperAtmosphereScattering:))]
609 #[unsafe(method_family = none)]
610 pub unsafe fn setUpperAtmosphereScattering(&self, upper_atmosphere_scattering: c_float);
611
612 #[unsafe(method(groundAlbedo))]
613 #[unsafe(method_family = none)]
614 pub unsafe fn groundAlbedo(&self) -> c_float;
615
616 #[unsafe(method(setGroundAlbedo:))]
618 #[unsafe(method_family = none)]
619 pub unsafe fn setGroundAlbedo(&self, ground_albedo: c_float);
620
621 #[unsafe(method(horizonElevation))]
622 #[unsafe(method_family = none)]
623 pub unsafe fn horizonElevation(&self) -> c_float;
624
625 #[unsafe(method(setHorizonElevation:))]
627 #[unsafe(method_family = none)]
628 pub unsafe fn setHorizonElevation(&self, horizon_elevation: c_float);
629
630 #[cfg(feature = "objc2-core-graphics")]
631 #[unsafe(method(groundColor))]
632 #[unsafe(method_family = none)]
633 pub unsafe fn groundColor(&self) -> Option<Retained<CGColor>>;
634
635 #[cfg(feature = "objc2-core-graphics")]
636 #[unsafe(method(setGroundColor:))]
638 #[unsafe(method_family = none)]
639 pub unsafe fn setGroundColor(&self, ground_color: Option<&CGColor>);
640
641 #[unsafe(method(gamma))]
642 #[unsafe(method_family = none)]
643 pub unsafe fn gamma(&self) -> c_float;
644
645 #[unsafe(method(setGamma:))]
647 #[unsafe(method_family = none)]
648 pub unsafe fn setGamma(&self, gamma: c_float);
649
650 #[unsafe(method(exposure))]
651 #[unsafe(method_family = none)]
652 pub unsafe fn exposure(&self) -> c_float;
653
654 #[unsafe(method(setExposure:))]
656 #[unsafe(method_family = none)]
657 pub unsafe fn setExposure(&self, exposure: c_float);
658
659 #[unsafe(method(brightness))]
660 #[unsafe(method_family = none)]
661 pub unsafe fn brightness(&self) -> c_float;
662
663 #[unsafe(method(setBrightness:))]
665 #[unsafe(method_family = none)]
666 pub unsafe fn setBrightness(&self, brightness: c_float);
667
668 #[unsafe(method(contrast))]
669 #[unsafe(method_family = none)]
670 pub unsafe fn contrast(&self) -> c_float;
671
672 #[unsafe(method(setContrast:))]
674 #[unsafe(method_family = none)]
675 pub unsafe fn setContrast(&self, contrast: c_float);
676
677 #[unsafe(method(saturation))]
678 #[unsafe(method_family = none)]
679 pub unsafe fn saturation(&self) -> c_float;
680
681 #[unsafe(method(setSaturation:))]
683 #[unsafe(method_family = none)]
684 pub unsafe fn setSaturation(&self, saturation: c_float);
685 );
686}
687
688impl MDLSkyCubeTexture {
690 extern_methods!(
691 #[unsafe(method(init))]
692 #[unsafe(method_family = init)]
693 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
694
695 #[unsafe(method(textureNamed:))]
698 #[unsafe(method_family = none)]
699 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
700
701 #[unsafe(method(textureNamed:bundle:))]
702 #[unsafe(method_family = none)]
703 pub unsafe fn textureNamed_bundle(
704 name: &NSString,
705 bundle_or_nil: Option<&NSBundle>,
706 ) -> Option<Retained<Self>>;
707
708 #[cfg(feature = "MDLAssetResolver")]
709 #[unsafe(method(textureNamed:assetResolver:))]
710 #[unsafe(method_family = none)]
711 pub unsafe fn textureNamed_assetResolver(
712 name: &NSString,
713 resolver: &ProtocolObject<dyn MDLAssetResolver>,
714 ) -> Option<Retained<Self>>;
715
716 #[unsafe(method(textureCubeWithImagesNamed:))]
732 #[unsafe(method_family = none)]
733 pub unsafe fn textureCubeWithImagesNamed(
734 names: &NSArray<NSString>,
735 ) -> Option<Retained<Self>>;
736
737 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
738 #[unsafe(method_family = none)]
739 pub unsafe fn textureCubeWithImagesNamed_bundle(
740 names: &NSArray<NSString>,
741 bundle_or_nil: Option<&NSBundle>,
742 ) -> Option<Retained<Self>>;
743 );
744}
745
746impl MDLSkyCubeTexture {
748 extern_methods!(
749 #[unsafe(method(new))]
750 #[unsafe(method_family = new)]
751 pub unsafe fn new() -> Retained<Self>;
752 );
753}
754
755extern_class!(
756 #[unsafe(super(MDLTexture, NSObject))]
758 #[derive(Debug, PartialEq, Eq, Hash)]
759 pub struct MDLColorSwatchTexture;
760);
761
762#[cfg(feature = "MDLTypes")]
763extern_conformance!(
764 unsafe impl MDLNamed for MDLColorSwatchTexture {}
765);
766
767extern_conformance!(
768 unsafe impl NSObjectProtocol for MDLColorSwatchTexture {}
769);
770
771impl MDLColorSwatchTexture {
772 extern_methods!();
773}
774
775impl MDLColorSwatchTexture {
777 extern_methods!(
778 #[unsafe(method(init))]
779 #[unsafe(method_family = init)]
780 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
781
782 #[unsafe(method(textureNamed:))]
785 #[unsafe(method_family = none)]
786 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
787
788 #[unsafe(method(textureNamed:bundle:))]
789 #[unsafe(method_family = none)]
790 pub unsafe fn textureNamed_bundle(
791 name: &NSString,
792 bundle_or_nil: Option<&NSBundle>,
793 ) -> Option<Retained<Self>>;
794
795 #[cfg(feature = "MDLAssetResolver")]
796 #[unsafe(method(textureNamed:assetResolver:))]
797 #[unsafe(method_family = none)]
798 pub unsafe fn textureNamed_assetResolver(
799 name: &NSString,
800 resolver: &ProtocolObject<dyn MDLAssetResolver>,
801 ) -> Option<Retained<Self>>;
802
803 #[unsafe(method(textureCubeWithImagesNamed:))]
819 #[unsafe(method_family = none)]
820 pub unsafe fn textureCubeWithImagesNamed(
821 names: &NSArray<NSString>,
822 ) -> Option<Retained<Self>>;
823
824 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
825 #[unsafe(method_family = none)]
826 pub unsafe fn textureCubeWithImagesNamed_bundle(
827 names: &NSArray<NSString>,
828 bundle_or_nil: Option<&NSBundle>,
829 ) -> Option<Retained<Self>>;
830 );
831}
832
833impl MDLColorSwatchTexture {
835 extern_methods!(
836 #[unsafe(method(new))]
837 #[unsafe(method_family = new)]
838 pub unsafe fn new() -> Retained<Self>;
839 );
840}
841
842extern_class!(
843 #[unsafe(super(MDLTexture, NSObject))]
851 #[derive(Debug, PartialEq, Eq, Hash)]
852 pub struct MDLNoiseTexture;
853);
854
855#[cfg(feature = "MDLTypes")]
856extern_conformance!(
857 unsafe impl MDLNamed for MDLNoiseTexture {}
858);
859
860extern_conformance!(
861 unsafe impl NSObjectProtocol for MDLNoiseTexture {}
862);
863
864impl MDLNoiseTexture {
865 extern_methods!();
866}
867
868impl MDLNoiseTexture {
870 extern_methods!(
871 #[unsafe(method(init))]
872 #[unsafe(method_family = init)]
873 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
874
875 #[unsafe(method(textureNamed:))]
878 #[unsafe(method_family = none)]
879 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
880
881 #[unsafe(method(textureNamed:bundle:))]
882 #[unsafe(method_family = none)]
883 pub unsafe fn textureNamed_bundle(
884 name: &NSString,
885 bundle_or_nil: Option<&NSBundle>,
886 ) -> Option<Retained<Self>>;
887
888 #[cfg(feature = "MDLAssetResolver")]
889 #[unsafe(method(textureNamed:assetResolver:))]
890 #[unsafe(method_family = none)]
891 pub unsafe fn textureNamed_assetResolver(
892 name: &NSString,
893 resolver: &ProtocolObject<dyn MDLAssetResolver>,
894 ) -> Option<Retained<Self>>;
895
896 #[unsafe(method(textureCubeWithImagesNamed:))]
912 #[unsafe(method_family = none)]
913 pub unsafe fn textureCubeWithImagesNamed(
914 names: &NSArray<NSString>,
915 ) -> Option<Retained<Self>>;
916
917 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
918 #[unsafe(method_family = none)]
919 pub unsafe fn textureCubeWithImagesNamed_bundle(
920 names: &NSArray<NSString>,
921 bundle_or_nil: Option<&NSBundle>,
922 ) -> Option<Retained<Self>>;
923 );
924}
925
926impl MDLNoiseTexture {
928 extern_methods!(
929 #[unsafe(method(new))]
930 #[unsafe(method_family = new)]
931 pub unsafe fn new() -> Retained<Self>;
932 );
933}
934
935extern_class!(
936 #[unsafe(super(MDLTexture, NSObject))]
938 #[derive(Debug, PartialEq, Eq, Hash)]
939 pub struct MDLNormalMapTexture;
940);
941
942#[cfg(feature = "MDLTypes")]
943extern_conformance!(
944 unsafe impl MDLNamed for MDLNormalMapTexture {}
945);
946
947extern_conformance!(
948 unsafe impl NSObjectProtocol for MDLNormalMapTexture {}
949);
950
951impl MDLNormalMapTexture {
952 extern_methods!(
953 #[unsafe(method(initByGeneratingNormalMapWithTexture:name:smoothness:contrast:))]
954 #[unsafe(method_family = init)]
955 pub unsafe fn initByGeneratingNormalMapWithTexture_name_smoothness_contrast(
956 this: Allocated<Self>,
957 source_texture: &MDLTexture,
958 name: Option<&NSString>,
959 smoothness: c_float,
960 contrast: c_float,
961 ) -> Retained<Self>;
962 );
963}
964
965impl MDLNormalMapTexture {
967 extern_methods!(
968 #[unsafe(method(init))]
969 #[unsafe(method_family = init)]
970 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
971
972 #[unsafe(method(textureNamed:))]
975 #[unsafe(method_family = none)]
976 pub unsafe fn textureNamed(name: &NSString) -> Option<Retained<Self>>;
977
978 #[unsafe(method(textureNamed:bundle:))]
979 #[unsafe(method_family = none)]
980 pub unsafe fn textureNamed_bundle(
981 name: &NSString,
982 bundle_or_nil: Option<&NSBundle>,
983 ) -> Option<Retained<Self>>;
984
985 #[cfg(feature = "MDLAssetResolver")]
986 #[unsafe(method(textureNamed:assetResolver:))]
987 #[unsafe(method_family = none)]
988 pub unsafe fn textureNamed_assetResolver(
989 name: &NSString,
990 resolver: &ProtocolObject<dyn MDLAssetResolver>,
991 ) -> Option<Retained<Self>>;
992
993 #[unsafe(method(textureCubeWithImagesNamed:))]
1009 #[unsafe(method_family = none)]
1010 pub unsafe fn textureCubeWithImagesNamed(
1011 names: &NSArray<NSString>,
1012 ) -> Option<Retained<Self>>;
1013
1014 #[unsafe(method(textureCubeWithImagesNamed:bundle:))]
1015 #[unsafe(method_family = none)]
1016 pub unsafe fn textureCubeWithImagesNamed_bundle(
1017 names: &NSArray<NSString>,
1018 bundle_or_nil: Option<&NSBundle>,
1019 ) -> Option<Retained<Self>>;
1020 );
1021}
1022
1023impl MDLNormalMapTexture {
1025 extern_methods!(
1026 #[unsafe(method(new))]
1027 #[unsafe(method_family = new)]
1028 pub unsafe fn new() -> Retained<Self>;
1029 );
1030}