use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;
#[cfg(feature = "objc2-core-foundation")]
use objc2_core_foundation::*;
use crate::*;
#[cfg(feature = "objc2")]
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct ARHitTestResultType(pub NSUInteger);
#[cfg(feature = "objc2")]
bitflags::bitflags! {
impl ARHitTestResultType: NSUInteger {
#[doc(alias = "ARHitTestResultTypeFeaturePoint")]
const FeaturePoint = 1<<0;
#[doc(alias = "ARHitTestResultTypeEstimatedHorizontalPlane")]
const EstimatedHorizontalPlane = 1<<1;
#[doc(alias = "ARHitTestResultTypeEstimatedVerticalPlane")]
const EstimatedVerticalPlane = 1<<2;
#[doc(alias = "ARHitTestResultTypeExistingPlane")]
const ExistingPlane = 1<<3;
#[doc(alias = "ARHitTestResultTypeExistingPlaneUsingExtent")]
const ExistingPlaneUsingExtent = 1<<4;
#[doc(alias = "ARHitTestResultTypeExistingPlaneUsingGeometry")]
const ExistingPlaneUsingGeometry = 1<<5;
}
}
#[cfg(feature = "objc2")]
unsafe impl Encode for ARHitTestResultType {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
#[cfg(feature = "objc2")]
unsafe impl RefEncode for ARHitTestResultType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[cfg(feature = "objc2")]
extern_class!(
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
#[cfg(feature = "objc2")]
#[deprecated = "Use raycasting"]
pub struct ARHitTestResult;
);
#[cfg(feature = "objc2")]
extern_conformance!(
unsafe impl NSObjectProtocol for ARHitTestResult {}
);
#[cfg(feature = "objc2")]
impl ARHitTestResult {
extern_methods!(
#[deprecated = "Use raycasting"]
#[unsafe(method(type))]
#[unsafe(method_family = none)]
pub unsafe fn r#type(&self) -> ARHitTestResultType;
#[cfg(feature = "objc2-core-foundation")]
#[deprecated = "Use raycasting"]
#[unsafe(method(distance))]
#[unsafe(method_family = none)]
pub unsafe fn distance(&self) -> CGFloat;
#[cfg(feature = "ARAnchor")]
#[deprecated = "Use raycasting"]
#[unsafe(method(anchor))]
#[unsafe(method_family = none)]
pub unsafe fn anchor(&self) -> Option<Retained<ARAnchor>>;
#[deprecated = "Use raycasting"]
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
#[deprecated = "Use raycasting"]
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}