objc2-ar-kit 0.3.2

Bindings to the ARKit framework
Documentation
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ptr::NonNull;
#[cfg(feature = "objc2")]
use objc2::__framework_prelude::*;

use crate::*;

#[cfg(feature = "objc2")]
extern_class!(
    /// Result of a raycast on a single target.
    ///
    /// See also [Apple's documentation](https://developer.apple.com/documentation/arkit/arraycastresult?language=objc)
    #[unsafe(super(NSObject))]
    #[derive(Debug, PartialEq, Eq, Hash)]
    #[cfg(feature = "objc2")]
    pub struct ARRaycastResult;
);

#[cfg(feature = "objc2")]
extern_conformance!(
    unsafe impl NSObjectProtocol for ARRaycastResult {}
);

#[cfg(feature = "objc2")]
impl ARRaycastResult {
    extern_methods!(
        #[cfg(feature = "ARRaycastQuery")]
        /// Type of the target where the ray terminated.
        #[unsafe(method(target))]
        #[unsafe(method_family = none)]
        pub unsafe fn target(&self) -> ARRaycastTarget;

        #[cfg(feature = "ARRaycastQuery")]
        /// Alignment of the target.
        #[unsafe(method(targetAlignment))]
        #[unsafe(method_family = none)]
        pub unsafe fn targetAlignment(&self) -> ARRaycastTargetAlignment;

        #[cfg(feature = "ARAnchor")]
        /// The anchor that the ray intersected.
        ///
        ///
        /// In case of an existing plane target, an anchor will always be provided. In case of an estimated plane target,
        /// an anchor may be provided if the ray hit an existing plane.
        #[unsafe(method(anchor))]
        #[unsafe(method_family = none)]
        pub unsafe fn anchor(&self) -> Option<Retained<ARAnchor>>;

        #[unsafe(method(init))]
        #[unsafe(method_family = init)]
        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;

        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new(&self) -> Retained<Self>;
    );
}

/// Methods declared on superclass `NSObject`.
#[cfg(feature = "objc2")]
impl ARRaycastResult {
    extern_methods!(
        #[unsafe(method(new))]
        #[unsafe(method_family = new)]
        pub unsafe fn new_class() -> Retained<Self>;
    );
}