objc2_ar_kit/generated/
ARRaycastResult.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
7use crate::*;
8
9#[cfg(feature = "objc2")]
10extern_class!(
11    /// Result of a raycast on a single target.
12    ///
13    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arraycastresult?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    #[cfg(feature = "objc2")]
17    pub struct ARRaycastResult;
18);
19
20#[cfg(feature = "objc2")]
21extern_conformance!(
22    unsafe impl NSObjectProtocol for ARRaycastResult {}
23);
24
25#[cfg(feature = "objc2")]
26impl ARRaycastResult {
27    extern_methods!(
28        #[cfg(feature = "ARRaycastQuery")]
29        /// Type of the target where the ray terminated.
30        #[unsafe(method(target))]
31        #[unsafe(method_family = none)]
32        pub unsafe fn target(&self) -> ARRaycastTarget;
33
34        #[cfg(feature = "ARRaycastQuery")]
35        /// Alignment of the target.
36        #[unsafe(method(targetAlignment))]
37        #[unsafe(method_family = none)]
38        pub unsafe fn targetAlignment(&self) -> ARRaycastTargetAlignment;
39
40        #[cfg(feature = "ARAnchor")]
41        /// The anchor that the ray intersected.
42        ///
43        ///
44        /// In case of an existing plane target, an anchor will always be provided. In case of an estimated plane target,
45        /// an anchor may be provided if the ray hit an existing plane.
46        #[unsafe(method(anchor))]
47        #[unsafe(method_family = none)]
48        pub unsafe fn anchor(&self) -> Option<Retained<ARAnchor>>;
49
50        #[unsafe(method(init))]
51        #[unsafe(method_family = init)]
52        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
53
54        #[unsafe(method(new))]
55        #[unsafe(method_family = new)]
56        pub unsafe fn new(&self) -> Retained<Self>;
57    );
58}
59
60/// Methods declared on superclass `NSObject`.
61#[cfg(feature = "objc2")]
62impl ARRaycastResult {
63    extern_methods!(
64        #[unsafe(method(new))]
65        #[unsafe(method_family = new)]
66        pub unsafe fn new_class() -> Retained<Self>;
67    );
68}