objc2_gameplay_kit/generated/
GKNoiseMap.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5
6use crate::*;
7
8extern_class!(
9    /// GKNoiseMap represents an extracted portion of sampled points from continuous 3D noise.  Extracted values are useful
10    /// for 2D and 3D games.  Noise values may be queried, set to explicit values or used as input for other uses,
11    /// including textures and tile maps.
12    ///
13    ///
14    /// See: GKNoiseSource
15    ///
16    /// See: GKNoise
17    ///
18    /// See: SKTexture
19    ///
20    /// See: SKTileMapNode
21    ///
22    /// See also [Apple's documentation](https://developer.apple.com/documentation/gameplaykit/gknoisemap?language=objc)
23    #[unsafe(super(NSObject))]
24    #[derive(Debug, PartialEq, Eq, Hash)]
25    pub struct GKNoiseMap;
26);
27
28extern_conformance!(
29    unsafe impl NSObjectProtocol for GKNoiseMap {}
30);
31
32impl GKNoiseMap {
33    extern_methods!(
34        /// Whether the values at the edges of the 2D plane are modified to allow seamless tiling of the extracted noise map.
35        #[unsafe(method(isSeamless))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn isSeamless(&self) -> bool;
38
39        /// Initializes a noise map with constant noise of 0.0 at all positions.
40        #[unsafe(method(init))]
41        #[unsafe(method_family = init)]
42        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
43
44        #[cfg(feature = "GKNoise")]
45        /// Initializes a noise map with specified noise.
46        ///
47        ///
48        /// Parameter `noise`: The 3D noise from which to sample a 2D plane.
49        #[unsafe(method(noiseMapWithNoise:))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn noiseMapWithNoise(noise: &GKNoise) -> Retained<Self>;
52
53        #[cfg(feature = "GKNoise")]
54        /// Initializes a noise map with specified noise.
55        ///
56        ///
57        /// Parameter `noise`: The 3D noise from which to sample a 2D plane.
58        #[unsafe(method(initWithNoise:))]
59        #[unsafe(method_family = init)]
60        pub unsafe fn initWithNoise(this: Allocated<Self>, noise: &GKNoise) -> Retained<Self>;
61    );
62}
63
64/// Methods declared on superclass `NSObject`.
65impl GKNoiseMap {
66    extern_methods!(
67        #[unsafe(method(new))]
68        #[unsafe(method_family = new)]
69        pub unsafe fn new() -> Retained<Self>;
70    );
71}