objc2_ar_kit/generated/
ARHitTestResult.rs1use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8
9use crate::*;
10
11#[cfg(feature = "objc2")]
16#[repr(transparent)]
17#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
18pub struct ARHitTestResultType(pub NSUInteger);
19#[cfg(feature = "objc2")]
20bitflags::bitflags! {
21 impl ARHitTestResultType: NSUInteger {
22#[doc(alias = "ARHitTestResultTypeFeaturePoint")]
24 const FeaturePoint = 1<<0;
25#[doc(alias = "ARHitTestResultTypeEstimatedHorizontalPlane")]
27 const EstimatedHorizontalPlane = 1<<1;
28#[doc(alias = "ARHitTestResultTypeEstimatedVerticalPlane")]
30 const EstimatedVerticalPlane = 1<<2;
31#[doc(alias = "ARHitTestResultTypeExistingPlane")]
33 const ExistingPlane = 1<<3;
34#[doc(alias = "ARHitTestResultTypeExistingPlaneUsingExtent")]
36 const ExistingPlaneUsingExtent = 1<<4;
37#[doc(alias = "ARHitTestResultTypeExistingPlaneUsingGeometry")]
39 const ExistingPlaneUsingGeometry = 1<<5;
40 }
41}
42
43#[cfg(feature = "objc2")]
44unsafe impl Encode for ARHitTestResultType {
45 const ENCODING: Encoding = NSUInteger::ENCODING;
46}
47
48#[cfg(feature = "objc2")]
49unsafe impl RefEncode for ARHitTestResultType {
50 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
51}
52
53#[cfg(feature = "objc2")]
54extern_class!(
55 #[unsafe(super(NSObject))]
59 #[derive(Debug, PartialEq, Eq, Hash)]
60 #[cfg(feature = "objc2")]
61 #[deprecated = "Use raycasting"]
62 pub struct ARHitTestResult;
63);
64
65#[cfg(feature = "objc2")]
66unsafe impl NSObjectProtocol for ARHitTestResult {}
67
68#[cfg(feature = "objc2")]
69impl ARHitTestResult {
70 extern_methods!(
71 #[deprecated = "Use raycasting"]
73 #[unsafe(method(type))]
74 #[unsafe(method_family = none)]
75 pub unsafe fn r#type(&self) -> ARHitTestResultType;
76
77 #[cfg(feature = "objc2-core-foundation")]
78 #[deprecated = "Use raycasting"]
80 #[unsafe(method(distance))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn distance(&self) -> CGFloat;
83
84 #[cfg(feature = "ARAnchor")]
85 #[deprecated = "Use raycasting"]
90 #[unsafe(method(anchor))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn anchor(&self) -> Option<Retained<ARAnchor>>;
93
94 #[deprecated = "Use raycasting"]
96 #[unsafe(method(init))]
97 #[unsafe(method_family = init)]
98 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
99
100 #[deprecated = "Use raycasting"]
101 #[unsafe(method(new))]
102 #[unsafe(method_family = new)]
103 pub unsafe fn new() -> Retained<Self>;
104 );
105}