use crate::{ar, define_cls, define_obj_type, objc, simd};
#[doc(alias = "ARPlaneAnchorAlignment")]
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
#[repr(isize)]
pub enum PlaneAnchorAlignment {
Horizontal,
Vertical,
}
#[doc(alias = "ARPlaneClassificationStatus")]
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
#[repr(isize)]
pub enum PlaneClassificationStatus {
NotAvailable = 0,
Undetermined,
Unknown,
Known,
}
#[doc(alias = "ARPlaneClassification")]
#[derive(Debug, PartialEq, Eq, Copy, Clone)]
#[repr(isize)]
pub enum PlaneClassification {
None = 0,
Wall,
Floor,
Ceiling,
Table,
Seat,
Window,
Door,
}
define_obj_type!(
#[doc(alias = "ARPlaneAnchor")]
pub PlaneAnchor(ar::Anchor)
);
impl PlaneAnchor {
define_cls!(AR_PLANE_ANCHOR);
#[objc::msg_send(isClassificationSupported)]
#[objc::available(ios = 12.0)]
pub fn is_classification_supported() -> bool;
#[objc::msg_send(alignment)]
pub fn alignment(&self) -> PlaneAnchorAlignment;
#[objc::msg_send(center)]
pub fn center(&self) -> simd::f32x3;
#[objc::msg_send(extent)]
pub fn extent(&self) -> simd::f32x3;
#[objc::msg_send(classificationStatus)]
#[objc::available(ios = 12.0)]
pub fn classification_status(&self) -> PlaneClassificationStatus;
#[objc::msg_send(classification)]
#[objc::available(ios = 12.0)]
pub fn classification(&self) -> PlaneClassification;
}
unsafe extern "C" {
static AR_PLANE_ANCHOR: &'static objc::Class<PlaneAnchor>;
}