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")]
66extern_conformance!(
67 unsafe impl NSObjectProtocol for ARHitTestResult {}
68);
69
70#[cfg(feature = "objc2")]
71impl ARHitTestResult {
72 extern_methods!(
73 #[deprecated = "Use raycasting"]
75 #[unsafe(method(type))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn r#type(&self) -> ARHitTestResultType;
78
79 #[cfg(feature = "objc2-core-foundation")]
80 #[deprecated = "Use raycasting"]
82 #[unsafe(method(distance))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn distance(&self) -> CGFloat;
85
86 #[cfg(feature = "ARAnchor")]
87 #[deprecated = "Use raycasting"]
92 #[unsafe(method(anchor))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn anchor(&self) -> Option<Retained<ARAnchor>>;
95
96 #[deprecated = "Use raycasting"]
98 #[unsafe(method(init))]
99 #[unsafe(method_family = init)]
100 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
101
102 #[deprecated = "Use raycasting"]
103 #[unsafe(method(new))]
104 #[unsafe(method_family = new)]
105 pub unsafe fn new() -> Retained<Self>;
106 );
107}