objc2_ar_kit/generated/
ARLightEstimate.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8#[cfg(feature = "objc2-foundation")]
9use objc2_foundation::*;
10
11use crate::*;
12
13#[cfg(feature = "objc2")]
14extern_class!(
15    /// A light estimate representing the light in the scene.
16    ///
17    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arlightestimate?language=objc)
18    #[unsafe(super(NSObject))]
19    #[derive(Debug, PartialEq, Eq, Hash)]
20    #[cfg(feature = "objc2")]
21    pub struct ARLightEstimate;
22);
23
24#[cfg(feature = "objc2")]
25unsafe impl Send for ARLightEstimate {}
26
27#[cfg(feature = "objc2")]
28unsafe impl Sync for ARLightEstimate {}
29
30#[cfg(feature = "objc2")]
31extern_conformance!(
32    unsafe impl NSObjectProtocol for ARLightEstimate {}
33);
34
35#[cfg(feature = "objc2")]
36impl ARLightEstimate {
37    extern_methods!(
38        #[cfg(feature = "objc2-core-foundation")]
39        /// Ambient intensity of the lighting.
40        ///
41        ///
42        /// In a well lit environment, this value is close to 1000. It typically ranges from 0 (very dark) to around 2000 (very bright).
43        ///
44        /// This property is not atomic.
45        ///
46        /// # Safety
47        ///
48        /// This might not be thread-safe.
49        #[unsafe(method(ambientIntensity))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn ambientIntensity(&self) -> CGFloat;
52
53        #[cfg(feature = "objc2-core-foundation")]
54        /// The ambient color temperature of the lighting.
55        ///
56        ///
57        /// This specifies the ambient color temperature of the lighting in Kelvin (6500 corresponds to pure white).
58        ///
59        /// This property is not atomic.
60        ///
61        /// # Safety
62        ///
63        /// This might not be thread-safe.
64        #[unsafe(method(ambientColorTemperature))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn ambientColorTemperature(&self) -> CGFloat;
67
68        /// Unavailable
69        #[unsafe(method(init))]
70        #[unsafe(method_family = init)]
71        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
72
73        #[unsafe(method(new))]
74        #[unsafe(method_family = new)]
75        pub unsafe fn new() -> Retained<Self>;
76    );
77}
78
79#[cfg(feature = "objc2")]
80extern_class!(
81    /// A directional light estimate representing the light intensity and direction in the scene.
82    ///
83    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/ardirectionallightestimate?language=objc)
84    #[unsafe(super(ARLightEstimate, NSObject))]
85    #[derive(Debug, PartialEq, Eq, Hash)]
86    #[cfg(feature = "objc2")]
87    pub struct ARDirectionalLightEstimate;
88);
89
90#[cfg(feature = "objc2")]
91unsafe impl Send for ARDirectionalLightEstimate {}
92
93#[cfg(feature = "objc2")]
94unsafe impl Sync for ARDirectionalLightEstimate {}
95
96#[cfg(feature = "objc2")]
97extern_conformance!(
98    unsafe impl NSObjectProtocol for ARDirectionalLightEstimate {}
99);
100
101#[cfg(feature = "objc2")]
102impl ARDirectionalLightEstimate {
103    extern_methods!(
104        #[cfg(feature = "objc2-foundation")]
105        /// Second degree spherical harmonics coefficients representing the intensity of light.
106        ///
107        ///
108        /// The data is an array of 27 32-bit floating-point values, containing three non-interleaved data sets
109        /// corresponding to the red, green, and blue sets of coefficients.
110        ///
111        /// This property is not atomic.
112        ///
113        /// # Safety
114        ///
115        /// This might not be thread-safe.
116        #[unsafe(method(sphericalHarmonicsCoefficients))]
117        #[unsafe(method_family = none)]
118        pub unsafe fn sphericalHarmonicsCoefficients(&self) -> Retained<NSData>;
119
120        #[cfg(feature = "objc2-core-foundation")]
121        /// The intensity of light in the primary direction.
122        ///
123        /// This property is not atomic.
124        ///
125        /// # Safety
126        ///
127        /// This might not be thread-safe.
128        #[unsafe(method(primaryLightIntensity))]
129        #[unsafe(method_family = none)]
130        pub unsafe fn primaryLightIntensity(&self) -> CGFloat;
131    );
132}
133
134/// Methods declared on superclass `ARLightEstimate`.
135#[cfg(feature = "objc2")]
136impl ARDirectionalLightEstimate {
137    extern_methods!(
138        /// Unavailable
139        #[unsafe(method(init))]
140        #[unsafe(method_family = init)]
141        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
142
143        #[unsafe(method(new))]
144        #[unsafe(method_family = new)]
145        pub unsafe fn new() -> Retained<Self>;
146    );
147}