objc2_ar_kit/generated/
AREnvironmentProbeAnchor.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-foundation")]
7use objc2_foundation::*;
8#[cfg(feature = "objc2-metal")]
9use objc2_metal::*;
10
11use crate::*;
12
13#[cfg(feature = "objc2")]
14extern_class!(
15    /// An object representing an environment probe in the world.
16    ///
17    /// Environment probes are used to light virtual geometry by producing environment
18    /// textures from the probe's location in the world.
19    ///
20    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arenvironmentprobeanchor?language=objc)
21    #[unsafe(super(ARAnchor, NSObject))]
22    #[derive(Debug, PartialEq, Eq, Hash)]
23    #[cfg(all(feature = "ARAnchor", feature = "objc2"))]
24    pub struct AREnvironmentProbeAnchor;
25);
26
27#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
28unsafe impl Send for AREnvironmentProbeAnchor {}
29
30#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
31unsafe impl Sync for AREnvironmentProbeAnchor {}
32
33#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
34extern_conformance!(
35    unsafe impl ARAnchorCopying for AREnvironmentProbeAnchor {}
36);
37
38#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
39extern_conformance!(
40    unsafe impl NSCoding for AREnvironmentProbeAnchor {}
41);
42
43#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
44extern_conformance!(
45    unsafe impl NSCopying for AREnvironmentProbeAnchor {}
46);
47
48#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
49unsafe impl CopyingHelper for AREnvironmentProbeAnchor {
50    type Result = Self;
51}
52
53#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
54extern_conformance!(
55    unsafe impl NSObjectProtocol for AREnvironmentProbeAnchor {}
56);
57
58#[cfg(all(feature = "ARAnchor", feature = "objc2", feature = "objc2-foundation"))]
59extern_conformance!(
60    unsafe impl NSSecureCoding for AREnvironmentProbeAnchor {}
61);
62
63#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
64impl AREnvironmentProbeAnchor {
65    extern_methods!(
66        #[cfg(feature = "objc2-metal")]
67        /// The environment texture of the probe.
68        ///
69        /// The texture is provided as a cube using MTLTextureTypeCube.
70        ///
71        /// This property is not atomic.
72        ///
73        /// # Safety
74        ///
75        /// This might not be thread-safe.
76        #[unsafe(method(environmentTexture))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn environmentTexture(&self)
79            -> Option<Retained<ProtocolObject<dyn MTLTexture>>>;
80    );
81}
82
83/// Methods declared on superclass `ARAnchor`.
84#[cfg(all(feature = "ARAnchor", feature = "objc2"))]
85impl AREnvironmentProbeAnchor {
86    extern_methods!(
87        /// Unavailable
88        #[unsafe(method(init))]
89        #[unsafe(method_family = init)]
90        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
91
92        #[unsafe(method(new))]
93        #[unsafe(method_family = new)]
94        pub unsafe fn new() -> Retained<Self>;
95    );
96}