use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern "C" {
pub static kUTTypeAlembic: &'static NSString;
}
extern "C" {
pub static kUTType3dObject: &'static NSString;
}
extern "C" {
pub static kUTTypePolygon: &'static NSString;
}
extern "C" {
pub static kUTTypeStereolithography: &'static NSString;
}
extern "C" {
pub static kUTTypeUniversalSceneDescription: &'static NSString;
}
extern "C" {
pub static kUTTypeUniversalSceneDescriptionMobile: &'static NSString;
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MDLIndexBitDepth(pub NSUInteger);
impl MDLIndexBitDepth {
#[doc(alias = "MDLIndexBitDepthInvalid")]
pub const Invalid: Self = Self(0);
#[doc(alias = "MDLIndexBitDepthUInt8")]
pub const UInt8: Self = Self(8);
#[doc(alias = "MDLIndexBitDepthUint8")]
pub const Uint8: Self = Self(8);
#[doc(alias = "MDLIndexBitDepthUInt16")]
pub const UInt16: Self = Self(16);
#[doc(alias = "MDLIndexBitDepthUint16")]
pub const Uint16: Self = Self(16);
#[doc(alias = "MDLIndexBitDepthUInt32")]
pub const UInt32: Self = Self(32);
#[doc(alias = "MDLIndexBitDepthUint32")]
pub const Uint32: Self = Self(32);
}
unsafe impl Encode for MDLIndexBitDepth {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MDLIndexBitDepth {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MDLGeometryType(pub NSInteger);
impl MDLGeometryType {
#[doc(alias = "MDLGeometryTypePoints")]
pub const Points: Self = Self(0);
#[doc(alias = "MDLGeometryTypeLines")]
pub const Lines: Self = Self(1);
#[doc(alias = "MDLGeometryTypeTriangles")]
pub const Triangles: Self = Self(2);
#[doc(alias = "MDLGeometryTypeTriangleStrips")]
pub const TriangleStrips: Self = Self(3);
#[doc(alias = "MDLGeometryTypeQuads")]
pub const Quads: Self = Self(4);
#[doc(alias = "MDLGeometryTypeVariableTopology")]
pub const VariableTopology: Self = Self(5);
}
unsafe impl Encode for MDLGeometryType {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for MDLGeometryType {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MDLProbePlacement(pub NSInteger);
impl MDLProbePlacement {
#[doc(alias = "MDLProbePlacementUniformGrid")]
pub const UniformGrid: Self = Self(0);
#[doc(alias = "MDLProbePlacementIrradianceDistribution")]
pub const IrradianceDistribution: Self = Self(1);
}
unsafe impl Encode for MDLProbePlacement {
const ENCODING: Encoding = NSInteger::ENCODING;
}
unsafe impl RefEncode for MDLProbePlacement {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
#[repr(transparent)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub struct MDLDataPrecision(pub NSUInteger);
impl MDLDataPrecision {
#[doc(alias = "MDLDataPrecisionUndefined")]
pub const Undefined: Self = Self(0);
#[doc(alias = "MDLDataPrecisionFloat")]
pub const Float: Self = Self(1);
#[doc(alias = "MDLDataPrecisionDouble")]
pub const Double: Self = Self(2);
}
unsafe impl Encode for MDLDataPrecision {
const ENCODING: Encoding = NSUInteger::ENCODING;
}
unsafe impl RefEncode for MDLDataPrecision {
const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
}
extern_protocol!(
pub unsafe trait MDLNamed {
#[unsafe(method(name))]
#[unsafe(method_family = none)]
unsafe fn name(&self) -> Retained<NSString>;
#[unsafe(method(setName:))]
#[unsafe(method_family = none)]
unsafe fn setName(&self, name: &NSString);
}
);
extern_protocol!(
pub unsafe trait MDLComponent: NSObjectProtocol {}
);
extern_protocol!(
pub unsafe trait MDLObjectContainerComponent: MDLComponent + NSFastEnumeration {
#[cfg(feature = "MDLObject")]
#[unsafe(method(addObject:))]
#[unsafe(method_family = none)]
unsafe fn addObject(&self, object: &MDLObject);
#[cfg(feature = "MDLObject")]
#[unsafe(method(removeObject:))]
#[unsafe(method_family = none)]
unsafe fn removeObject(&self, object: &MDLObject);
#[cfg(feature = "MDLObject")]
#[unsafe(method(objectAtIndexedSubscript:))]
#[unsafe(method_family = none)]
unsafe fn objectAtIndexedSubscript(&self, index: NSUInteger) -> Retained<MDLObject>;
#[unsafe(method(count))]
#[unsafe(method_family = none)]
unsafe fn count(&self) -> NSUInteger;
#[cfg(feature = "MDLObject")]
#[unsafe(method(objects))]
#[unsafe(method_family = none)]
unsafe fn objects(&self) -> Retained<NSArray<MDLObject>>;
}
);