objc2_ar_kit/generated/
ARMeshGeometry.rs1use core::ptr::NonNull;
4#[cfg(feature = "objc2")]
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-foundation")]
7use objc2_foundation::*;
8#[cfg(feature = "objc2-metal")]
9use objc2_metal::*;
10
11use crate::*;
12
13#[cfg(feature = "objc2")]
14extern_class!(
15 #[unsafe(super(NSObject))]
19 #[derive(Debug, PartialEq, Eq, Hash)]
20 #[cfg(feature = "objc2")]
21 pub struct ARGeometrySource;
22);
23
24#[cfg(feature = "objc2")]
25unsafe impl Send for ARGeometrySource {}
26
27#[cfg(feature = "objc2")]
28unsafe impl Sync for ARGeometrySource {}
29
30#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
31unsafe impl NSCoding for ARGeometrySource {}
32
33#[cfg(feature = "objc2")]
34unsafe impl NSObjectProtocol for ARGeometrySource {}
35
36#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
37unsafe impl NSSecureCoding for ARGeometrySource {}
38
39#[cfg(feature = "objc2")]
40impl ARGeometrySource {
41 extern_methods!(
42 #[cfg(feature = "objc2-metal")]
43 #[unsafe(method(buffer))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn buffer(&self) -> Retained<ProtocolObject<dyn MTLBuffer>>;
47
48 #[unsafe(method(count))]
50 #[unsafe(method_family = none)]
51 pub unsafe fn count(&self) -> NSInteger;
52
53 #[cfg(feature = "objc2-metal")]
54 #[unsafe(method(format))]
56 #[unsafe(method_family = none)]
57 pub unsafe fn format(&self) -> MTLVertexFormat;
58
59 #[unsafe(method(componentsPerVector))]
61 #[unsafe(method_family = none)]
62 pub unsafe fn componentsPerVector(&self) -> NSInteger;
63
64 #[unsafe(method(offset))]
66 #[unsafe(method_family = none)]
67 pub unsafe fn offset(&self) -> NSInteger;
68
69 #[unsafe(method(stride))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn stride(&self) -> NSInteger;
73
74 #[unsafe(method(init))]
76 #[unsafe(method_family = init)]
77 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
78
79 #[unsafe(method(new))]
80 #[unsafe(method_family = new)]
81 pub unsafe fn new() -> Retained<Self>;
82 );
83}
84
85#[cfg(feature = "objc2")]
90#[repr(transparent)]
91#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
92pub struct ARGeometryPrimitiveType(pub NSInteger);
93#[cfg(feature = "objc2")]
94impl ARGeometryPrimitiveType {
95 #[doc(alias = "ARGeometryPrimitiveTypeLine")]
97 pub const Line: Self = Self(0);
98 #[doc(alias = "ARGeometryPrimitiveTypeTriangle")]
100 pub const Triangle: Self = Self(1);
101}
102
103#[cfg(feature = "objc2")]
104unsafe impl Encode for ARGeometryPrimitiveType {
105 const ENCODING: Encoding = NSInteger::ENCODING;
106}
107
108#[cfg(feature = "objc2")]
109unsafe impl RefEncode for ARGeometryPrimitiveType {
110 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
111}
112
113#[cfg(feature = "objc2")]
114extern_class!(
115 #[unsafe(super(NSObject))]
119 #[derive(Debug, PartialEq, Eq, Hash)]
120 #[cfg(feature = "objc2")]
121 pub struct ARGeometryElement;
122);
123
124#[cfg(feature = "objc2")]
125unsafe impl Send for ARGeometryElement {}
126
127#[cfg(feature = "objc2")]
128unsafe impl Sync for ARGeometryElement {}
129
130#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
131unsafe impl NSCoding for ARGeometryElement {}
132
133#[cfg(feature = "objc2")]
134unsafe impl NSObjectProtocol for ARGeometryElement {}
135
136#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
137unsafe impl NSSecureCoding for ARGeometryElement {}
138
139#[cfg(feature = "objc2")]
140impl ARGeometryElement {
141 extern_methods!(
142 #[cfg(feature = "objc2-metal")]
143 #[unsafe(method(buffer))]
145 #[unsafe(method_family = none)]
146 pub unsafe fn buffer(&self) -> Retained<ProtocolObject<dyn MTLBuffer>>;
147
148 #[unsafe(method(count))]
150 #[unsafe(method_family = none)]
151 pub unsafe fn count(&self) -> NSInteger;
152
153 #[unsafe(method(bytesPerIndex))]
155 #[unsafe(method_family = none)]
156 pub unsafe fn bytesPerIndex(&self) -> NSInteger;
157
158 #[unsafe(method(indexCountPerPrimitive))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn indexCountPerPrimitive(&self) -> NSInteger;
166
167 #[unsafe(method(primitiveType))]
169 #[unsafe(method_family = none)]
170 pub unsafe fn primitiveType(&self) -> ARGeometryPrimitiveType;
171
172 #[unsafe(method(init))]
174 #[unsafe(method_family = init)]
175 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
176
177 #[unsafe(method(new))]
178 #[unsafe(method_family = new)]
179 pub unsafe fn new() -> Retained<Self>;
180 );
181}
182
183#[cfg(feature = "objc2")]
188#[repr(transparent)]
189#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
190pub struct ARMeshClassification(pub NSInteger);
191#[cfg(feature = "objc2")]
192impl ARMeshClassification {
193 #[doc(alias = "ARMeshClassificationNone")]
194 pub const None: Self = Self(0);
195 #[doc(alias = "ARMeshClassificationWall")]
196 pub const Wall: Self = Self(1);
197 #[doc(alias = "ARMeshClassificationFloor")]
198 pub const Floor: Self = Self(2);
199 #[doc(alias = "ARMeshClassificationCeiling")]
200 pub const Ceiling: Self = Self(3);
201 #[doc(alias = "ARMeshClassificationTable")]
202 pub const Table: Self = Self(4);
203 #[doc(alias = "ARMeshClassificationSeat")]
204 pub const Seat: Self = Self(5);
205 #[doc(alias = "ARMeshClassificationWindow")]
206 pub const Window: Self = Self(6);
207 #[doc(alias = "ARMeshClassificationDoor")]
208 pub const Door: Self = Self(7);
209}
210
211#[cfg(feature = "objc2")]
212unsafe impl Encode for ARMeshClassification {
213 const ENCODING: Encoding = NSInteger::ENCODING;
214}
215
216#[cfg(feature = "objc2")]
217unsafe impl RefEncode for ARMeshClassification {
218 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
219}
220
221#[cfg(feature = "objc2")]
222extern_class!(
223 #[unsafe(super(NSObject))]
227 #[derive(Debug, PartialEq, Eq, Hash)]
228 #[cfg(feature = "objc2")]
229 pub struct ARMeshGeometry;
230);
231
232#[cfg(feature = "objc2")]
233unsafe impl Send for ARMeshGeometry {}
234
235#[cfg(feature = "objc2")]
236unsafe impl Sync for ARMeshGeometry {}
237
238#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
239unsafe impl NSCoding for ARMeshGeometry {}
240
241#[cfg(feature = "objc2")]
242unsafe impl NSObjectProtocol for ARMeshGeometry {}
243
244#[cfg(all(feature = "objc2", feature = "objc2-foundation"))]
245unsafe impl NSSecureCoding for ARMeshGeometry {}
246
247#[cfg(feature = "objc2")]
248impl ARMeshGeometry {
249 extern_methods!(
250 #[unsafe(method(vertices))]
252 #[unsafe(method_family = none)]
253 pub unsafe fn vertices(&self) -> Retained<ARGeometrySource>;
254
255 #[unsafe(method(normals))]
257 #[unsafe(method_family = none)]
258 pub unsafe fn normals(&self) -> Retained<ARGeometrySource>;
259
260 #[unsafe(method(faces))]
262 #[unsafe(method_family = none)]
263 pub unsafe fn faces(&self) -> Retained<ARGeometryElement>;
264
265 #[unsafe(method(classification))]
267 #[unsafe(method_family = none)]
268 pub unsafe fn classification(&self) -> Option<Retained<ARGeometrySource>>;
269
270 #[unsafe(method(init))]
272 #[unsafe(method_family = init)]
273 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
274
275 #[unsafe(method(new))]
276 #[unsafe(method_family = new)]
277 pub unsafe fn new() -> Retained<Self>;
278 );
279}