objc2_model_io/generated/
MDLTypes.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern "C" {
11 pub static kUTTypeAlembic: &'static NSString;
13}
14
15extern "C" {
16 pub static kUTType3dObject: &'static NSString;
18}
19
20extern "C" {
21 pub static kUTTypePolygon: &'static NSString;
23}
24
25extern "C" {
26 pub static kUTTypeStereolithography: &'static NSString;
28}
29
30extern "C" {
31 pub static kUTTypeUniversalSceneDescription: &'static NSString;
33}
34
35extern "C" {
36 pub static kUTTypeUniversalSceneDescriptionMobile: &'static NSString;
38}
39
40#[repr(transparent)]
43#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
44pub struct MDLIndexBitDepth(pub NSUInteger);
45impl MDLIndexBitDepth {
46 #[doc(alias = "MDLIndexBitDepthInvalid")]
47 pub const Invalid: Self = Self(0);
48 #[doc(alias = "MDLIndexBitDepthUInt8")]
49 pub const UInt8: Self = Self(8);
50 #[doc(alias = "MDLIndexBitDepthUint8")]
51 pub const Uint8: Self = Self(8);
52 #[doc(alias = "MDLIndexBitDepthUInt16")]
53 pub const UInt16: Self = Self(16);
54 #[doc(alias = "MDLIndexBitDepthUint16")]
55 pub const Uint16: Self = Self(16);
56 #[doc(alias = "MDLIndexBitDepthUInt32")]
57 pub const UInt32: Self = Self(32);
58 #[doc(alias = "MDLIndexBitDepthUint32")]
59 pub const Uint32: Self = Self(32);
60}
61
62unsafe impl Encode for MDLIndexBitDepth {
63 const ENCODING: Encoding = NSUInteger::ENCODING;
64}
65
66unsafe impl RefEncode for MDLIndexBitDepth {
67 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
68}
69
70#[repr(transparent)]
73#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
74pub struct MDLGeometryType(pub NSInteger);
75impl MDLGeometryType {
76 #[doc(alias = "MDLGeometryTypePoints")]
77 pub const Points: Self = Self(0);
78 #[doc(alias = "MDLGeometryTypeLines")]
79 pub const Lines: Self = Self(1);
80 #[doc(alias = "MDLGeometryTypeTriangles")]
81 pub const Triangles: Self = Self(2);
82 #[doc(alias = "MDLGeometryTypeTriangleStrips")]
83 pub const TriangleStrips: Self = Self(3);
84 #[doc(alias = "MDLGeometryTypeQuads")]
85 pub const Quads: Self = Self(4);
86 #[doc(alias = "MDLGeometryTypeVariableTopology")]
87 pub const VariableTopology: Self = Self(5);
88}
89
90unsafe impl Encode for MDLGeometryType {
91 const ENCODING: Encoding = NSInteger::ENCODING;
92}
93
94unsafe impl RefEncode for MDLGeometryType {
95 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
96}
97
98#[repr(transparent)]
101#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
102pub struct MDLProbePlacement(pub NSInteger);
103impl MDLProbePlacement {
104 #[doc(alias = "MDLProbePlacementUniformGrid")]
105 pub const UniformGrid: Self = Self(0);
106 #[doc(alias = "MDLProbePlacementIrradianceDistribution")]
107 pub const IrradianceDistribution: Self = Self(1);
108}
109
110unsafe impl Encode for MDLProbePlacement {
111 const ENCODING: Encoding = NSInteger::ENCODING;
112}
113
114unsafe impl RefEncode for MDLProbePlacement {
115 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
116}
117
118#[repr(transparent)]
121#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
122pub struct MDLDataPrecision(pub NSUInteger);
123impl MDLDataPrecision {
124 #[doc(alias = "MDLDataPrecisionUndefined")]
125 pub const Undefined: Self = Self(0);
126 #[doc(alias = "MDLDataPrecisionFloat")]
127 pub const Float: Self = Self(1);
128 #[doc(alias = "MDLDataPrecisionDouble")]
129 pub const Double: Self = Self(2);
130}
131
132unsafe impl Encode for MDLDataPrecision {
133 const ENCODING: Encoding = NSUInteger::ENCODING;
134}
135
136unsafe impl RefEncode for MDLDataPrecision {
137 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
138}
139
140extern_protocol!(
141 pub unsafe trait MDLNamed {
143 #[unsafe(method(name))]
144 #[unsafe(method_family = none)]
145 unsafe fn name(&self) -> Retained<NSString>;
146
147 #[unsafe(method(setName:))]
151 #[unsafe(method_family = none)]
152 unsafe fn setName(&self, name: &NSString);
153 }
154);
155
156extern_protocol!(
157 pub unsafe trait MDLComponent: NSObjectProtocol {}
159);
160
161extern_protocol!(
162 pub unsafe trait MDLObjectContainerComponent: MDLComponent + NSFastEnumeration {
164 #[cfg(feature = "MDLObject")]
165 #[unsafe(method(addObject:))]
166 #[unsafe(method_family = none)]
167 unsafe fn addObject(&self, object: &MDLObject);
168
169 #[cfg(feature = "MDLObject")]
170 #[unsafe(method(removeObject:))]
171 #[unsafe(method_family = none)]
172 unsafe fn removeObject(&self, object: &MDLObject);
173
174 #[cfg(feature = "MDLObject")]
175 #[unsafe(method(objectAtIndexedSubscript:))]
176 #[unsafe(method_family = none)]
177 unsafe fn objectAtIndexedSubscript(&self, index: NSUInteger) -> Retained<MDLObject>;
178
179 #[unsafe(method(count))]
180 #[unsafe(method_family = none)]
181 unsafe fn count(&self) -> NSUInteger;
182
183 #[cfg(feature = "MDLObject")]
184 #[unsafe(method(objects))]
185 #[unsafe(method_family = none)]
186 unsafe fn objects(&self) -> Retained<NSArray<MDLObject>>;
187 }
188);