objc2_model_io/generated/
MDLVertexDescriptor.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern "C" {
11    /// The attribute data describes the degree to which a surface’s appearance
12    /// changes in appearance when rotated about its normal vector.
13    ///
14    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributeanisotropy?language=objc)
15    pub static MDLVertexAttributeAnisotropy: &'static NSString;
16}
17
18extern "C" {
19    /// The normal to a curve at a vertex position
20    ///
21    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributebinormal?language=objc)
22    pub static MDLVertexAttributeBinormal: &'static NSString;
23}
24
25extern "C" {
26    /// The vector completing a tangent basis at a vertex
27    ///
28    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributebitangent?language=objc)
29    pub static MDLVertexAttributeBitangent: &'static NSString;
30}
31
32extern "C" {
33    /// Color of a vertex
34    ///
35    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributecolor?language=objc)
36    pub static MDLVertexAttributeColor: &'static NSString;
37}
38
39extern "C" {
40    /// A crease value along an edge to be applied during subdivision.
41    /// A zero value indicates an edge is smooth, one is sharply creased.
42    ///
43    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributeedgecrease?language=objc)
44    pub static MDLVertexAttributeEdgeCrease: &'static NSString;
45}
46
47extern "C" {
48    /// Indices of joints in an animation rig corresponding to weighting information
49    ///
50    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributejointindices?language=objc)
51    pub static MDLVertexAttributeJointIndices: &'static NSString;
52}
53
54extern "C" {
55    /// Weights corresponding to joints for the purpose of blending animation
56    ///
57    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributejointweights?language=objc)
58    pub static MDLVertexAttributeJointWeights: &'static NSString;
59}
60
61extern "C" {
62    /// The direction of a normal at a vertex
63    ///
64    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributenormal?language=objc)
65    pub static MDLVertexAttributeNormal: &'static NSString;
66}
67
68extern "C" {
69    /// A value indicating the degree to which a vertex is occluded by surrounding geometry
70    ///
71    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributeocclusionvalue?language=objc)
72    pub static MDLVertexAttributeOcclusionValue: &'static NSString;
73}
74
75extern "C" {
76    /// The position of a vertex
77    ///
78    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributeposition?language=objc)
79    pub static MDLVertexAttributePosition: &'static NSString;
80}
81
82extern "C" {
83    /// The u direction of a shading basis at a vertex
84    ///
85    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributeshadingbasisu?language=objc)
86    pub static MDLVertexAttributeShadingBasisU: &'static NSString;
87}
88
89extern "C" {
90    /// The v direction of a shading basis at a vertex
91    ///
92    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributeshadingbasisv?language=objc)
93    pub static MDLVertexAttributeShadingBasisV: &'static NSString;
94}
95
96extern "C" {
97    /// Stencil values for subdivision at a vertex
98    ///
99    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributesubdivisionstencil?language=objc)
100    pub static MDLVertexAttributeSubdivisionStencil: &'static NSString;
101}
102
103extern "C" {
104    /// A vector tangent to a vertex
105    ///
106    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributetangent?language=objc)
107    pub static MDLVertexAttributeTangent: &'static NSString;
108}
109
110extern "C" {
111    /// Texture coordinate mapping at a vertex
112    ///
113    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattributetexturecoordinate?language=objc)
114    pub static MDLVertexAttributeTextureCoordinate: &'static NSString;
115}
116
117/// Describes the format of a an attribute in a vertex buffer
118///
119/// Designed to be very similar to MTLVertexDescriptor to ease the
120/// translation from one to the other. Values are chosen such that
121/// packed types would all be less than 0x1000 and the bottom 5 bits
122/// can be used to determine the number of channels/components in the
123/// format.
124///
125/// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexformat?language=objc)
126// NS_ENUM
127#[repr(transparent)]
128#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
129pub struct MDLVertexFormat(pub NSUInteger);
130impl MDLVertexFormat {
131    #[doc(alias = "MDLVertexFormatInvalid")]
132    pub const Invalid: Self = Self(0);
133    #[doc(alias = "MDLVertexFormatPackedBit")]
134    pub const PackedBit: Self = Self(0x1000);
135    #[doc(alias = "MDLVertexFormatUCharBits")]
136    pub const UCharBits: Self = Self(0x10000);
137    #[doc(alias = "MDLVertexFormatCharBits")]
138    pub const CharBits: Self = Self(0x20000);
139    #[doc(alias = "MDLVertexFormatUCharNormalizedBits")]
140    pub const UCharNormalizedBits: Self = Self(0x30000);
141    #[doc(alias = "MDLVertexFormatCharNormalizedBits")]
142    pub const CharNormalizedBits: Self = Self(0x40000);
143    #[doc(alias = "MDLVertexFormatUShortBits")]
144    pub const UShortBits: Self = Self(0x50000);
145    #[doc(alias = "MDLVertexFormatShortBits")]
146    pub const ShortBits: Self = Self(0x60000);
147    #[doc(alias = "MDLVertexFormatUShortNormalizedBits")]
148    pub const UShortNormalizedBits: Self = Self(0x70000);
149    #[doc(alias = "MDLVertexFormatShortNormalizedBits")]
150    pub const ShortNormalizedBits: Self = Self(0x80000);
151    #[doc(alias = "MDLVertexFormatUIntBits")]
152    pub const UIntBits: Self = Self(0x90000);
153    #[doc(alias = "MDLVertexFormatIntBits")]
154    pub const IntBits: Self = Self(0xA0000);
155    #[doc(alias = "MDLVertexFormatHalfBits")]
156    pub const HalfBits: Self = Self(0xB0000);
157    #[doc(alias = "MDLVertexFormatFloatBits")]
158    pub const FloatBits: Self = Self(0xC0000);
159    #[doc(alias = "MDLVertexFormatUChar")]
160    pub const UChar: Self = Self(MDLVertexFormat::UCharBits.0 | 1);
161    #[doc(alias = "MDLVertexFormatUChar2")]
162    pub const UChar2: Self = Self(MDLVertexFormat::UCharBits.0 | 2);
163    #[doc(alias = "MDLVertexFormatUChar3")]
164    pub const UChar3: Self = Self(MDLVertexFormat::UCharBits.0 | 3);
165    #[doc(alias = "MDLVertexFormatUChar4")]
166    pub const UChar4: Self = Self(MDLVertexFormat::UCharBits.0 | 4);
167    #[doc(alias = "MDLVertexFormatChar")]
168    pub const Char: Self = Self(MDLVertexFormat::CharBits.0 | 1);
169    #[doc(alias = "MDLVertexFormatChar2")]
170    pub const Char2: Self = Self(MDLVertexFormat::CharBits.0 | 2);
171    #[doc(alias = "MDLVertexFormatChar3")]
172    pub const Char3: Self = Self(MDLVertexFormat::CharBits.0 | 3);
173    #[doc(alias = "MDLVertexFormatChar4")]
174    pub const Char4: Self = Self(MDLVertexFormat::CharBits.0 | 4);
175    #[doc(alias = "MDLVertexFormatUCharNormalized")]
176    pub const UCharNormalized: Self = Self(MDLVertexFormat::UCharNormalizedBits.0 | 1);
177    #[doc(alias = "MDLVertexFormatUChar2Normalized")]
178    pub const UChar2Normalized: Self = Self(MDLVertexFormat::UCharNormalizedBits.0 | 2);
179    #[doc(alias = "MDLVertexFormatUChar3Normalized")]
180    pub const UChar3Normalized: Self = Self(MDLVertexFormat::UCharNormalizedBits.0 | 3);
181    #[doc(alias = "MDLVertexFormatUChar4Normalized")]
182    pub const UChar4Normalized: Self = Self(MDLVertexFormat::UCharNormalizedBits.0 | 4);
183    #[doc(alias = "MDLVertexFormatCharNormalized")]
184    pub const CharNormalized: Self = Self(MDLVertexFormat::CharNormalizedBits.0 | 1);
185    #[doc(alias = "MDLVertexFormatChar2Normalized")]
186    pub const Char2Normalized: Self = Self(MDLVertexFormat::CharNormalizedBits.0 | 2);
187    #[doc(alias = "MDLVertexFormatChar3Normalized")]
188    pub const Char3Normalized: Self = Self(MDLVertexFormat::CharNormalizedBits.0 | 3);
189    #[doc(alias = "MDLVertexFormatChar4Normalized")]
190    pub const Char4Normalized: Self = Self(MDLVertexFormat::CharNormalizedBits.0 | 4);
191    #[doc(alias = "MDLVertexFormatUShort")]
192    pub const UShort: Self = Self(MDLVertexFormat::UShortBits.0 | 1);
193    #[doc(alias = "MDLVertexFormatUShort2")]
194    pub const UShort2: Self = Self(MDLVertexFormat::UShortBits.0 | 2);
195    #[doc(alias = "MDLVertexFormatUShort3")]
196    pub const UShort3: Self = Self(MDLVertexFormat::UShortBits.0 | 3);
197    #[doc(alias = "MDLVertexFormatUShort4")]
198    pub const UShort4: Self = Self(MDLVertexFormat::UShortBits.0 | 4);
199    #[doc(alias = "MDLVertexFormatShort")]
200    pub const Short: Self = Self(MDLVertexFormat::ShortBits.0 | 1);
201    #[doc(alias = "MDLVertexFormatShort2")]
202    pub const Short2: Self = Self(MDLVertexFormat::ShortBits.0 | 2);
203    #[doc(alias = "MDLVertexFormatShort3")]
204    pub const Short3: Self = Self(MDLVertexFormat::ShortBits.0 | 3);
205    #[doc(alias = "MDLVertexFormatShort4")]
206    pub const Short4: Self = Self(MDLVertexFormat::ShortBits.0 | 4);
207    #[doc(alias = "MDLVertexFormatUShortNormalized")]
208    pub const UShortNormalized: Self = Self(MDLVertexFormat::UShortNormalizedBits.0 | 1);
209    #[doc(alias = "MDLVertexFormatUShort2Normalized")]
210    pub const UShort2Normalized: Self = Self(MDLVertexFormat::UShortNormalizedBits.0 | 2);
211    #[doc(alias = "MDLVertexFormatUShort3Normalized")]
212    pub const UShort3Normalized: Self = Self(MDLVertexFormat::UShortNormalizedBits.0 | 3);
213    #[doc(alias = "MDLVertexFormatUShort4Normalized")]
214    pub const UShort4Normalized: Self = Self(MDLVertexFormat::UShortNormalizedBits.0 | 4);
215    #[doc(alias = "MDLVertexFormatShortNormalized")]
216    pub const ShortNormalized: Self = Self(MDLVertexFormat::ShortNormalizedBits.0 | 1);
217    #[doc(alias = "MDLVertexFormatShort2Normalized")]
218    pub const Short2Normalized: Self = Self(MDLVertexFormat::ShortNormalizedBits.0 | 2);
219    #[doc(alias = "MDLVertexFormatShort3Normalized")]
220    pub const Short3Normalized: Self = Self(MDLVertexFormat::ShortNormalizedBits.0 | 3);
221    #[doc(alias = "MDLVertexFormatShort4Normalized")]
222    pub const Short4Normalized: Self = Self(MDLVertexFormat::ShortNormalizedBits.0 | 4);
223    #[doc(alias = "MDLVertexFormatUInt")]
224    pub const UInt: Self = Self(MDLVertexFormat::UIntBits.0 | 1);
225    #[doc(alias = "MDLVertexFormatUInt2")]
226    pub const UInt2: Self = Self(MDLVertexFormat::UIntBits.0 | 2);
227    #[doc(alias = "MDLVertexFormatUInt3")]
228    pub const UInt3: Self = Self(MDLVertexFormat::UIntBits.0 | 3);
229    #[doc(alias = "MDLVertexFormatUInt4")]
230    pub const UInt4: Self = Self(MDLVertexFormat::UIntBits.0 | 4);
231    #[doc(alias = "MDLVertexFormatInt")]
232    pub const Int: Self = Self(MDLVertexFormat::IntBits.0 | 1);
233    #[doc(alias = "MDLVertexFormatInt2")]
234    pub const Int2: Self = Self(MDLVertexFormat::IntBits.0 | 2);
235    #[doc(alias = "MDLVertexFormatInt3")]
236    pub const Int3: Self = Self(MDLVertexFormat::IntBits.0 | 3);
237    #[doc(alias = "MDLVertexFormatInt4")]
238    pub const Int4: Self = Self(MDLVertexFormat::IntBits.0 | 4);
239    #[doc(alias = "MDLVertexFormatHalf")]
240    pub const Half: Self = Self(MDLVertexFormat::HalfBits.0 | 1);
241    #[doc(alias = "MDLVertexFormatHalf2")]
242    pub const Half2: Self = Self(MDLVertexFormat::HalfBits.0 | 2);
243    #[doc(alias = "MDLVertexFormatHalf3")]
244    pub const Half3: Self = Self(MDLVertexFormat::HalfBits.0 | 3);
245    #[doc(alias = "MDLVertexFormatHalf4")]
246    pub const Half4: Self = Self(MDLVertexFormat::HalfBits.0 | 4);
247    #[doc(alias = "MDLVertexFormatFloat")]
248    pub const Float: Self = Self(MDLVertexFormat::FloatBits.0 | 1);
249    #[doc(alias = "MDLVertexFormatFloat2")]
250    pub const Float2: Self = Self(MDLVertexFormat::FloatBits.0 | 2);
251    #[doc(alias = "MDLVertexFormatFloat3")]
252    pub const Float3: Self = Self(MDLVertexFormat::FloatBits.0 | 3);
253    #[doc(alias = "MDLVertexFormatFloat4")]
254    pub const Float4: Self = Self(MDLVertexFormat::FloatBits.0 | 4);
255    #[doc(alias = "MDLVertexFormatInt1010102Normalized")]
256    pub const Int1010102Normalized: Self =
257        Self(MDLVertexFormat::IntBits.0 | MDLVertexFormat::PackedBit.0 | 4);
258    #[doc(alias = "MDLVertexFormatUInt1010102Normalized")]
259    pub const UInt1010102Normalized: Self =
260        Self(MDLVertexFormat::UIntBits.0 | MDLVertexFormat::PackedBit.0 | 4);
261}
262
263unsafe impl Encode for MDLVertexFormat {
264    const ENCODING: Encoding = NSUInteger::ENCODING;
265}
266
267unsafe impl RefEncode for MDLVertexFormat {
268    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
269}
270
271extern_class!(
272    /// Describes a vertex buffer's layout
273    ///
274    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexbufferlayout?language=objc)
275    #[unsafe(super(NSObject))]
276    #[derive(Debug, PartialEq, Eq, Hash)]
277    pub struct MDLVertexBufferLayout;
278);
279
280unsafe impl NSCopying for MDLVertexBufferLayout {}
281
282unsafe impl CopyingHelper for MDLVertexBufferLayout {
283    type Result = Self;
284}
285
286unsafe impl NSObjectProtocol for MDLVertexBufferLayout {}
287
288impl MDLVertexBufferLayout {
289    extern_methods!(
290        #[unsafe(method(initWithStride:))]
291        #[unsafe(method_family = init)]
292        pub unsafe fn initWithStride(this: Allocated<Self>, stride: NSUInteger) -> Retained<Self>;
293
294        /// stride in bytes of each vertex element in the buffer.
295        ///
296        /// - If you store multiple attributes interleaved in the vertex
297        /// buffer, the stride will be the sum of sizes of each attribute (and any padding).
298        /// - If you store multiple attributes non-interleaved (back to back),
299        /// the stride will be the size of an attribute (and all attributes are
300        /// required to have the same size).
301        #[unsafe(method(stride))]
302        #[unsafe(method_family = none)]
303        pub unsafe fn stride(&self) -> NSUInteger;
304
305        /// Setter for [`stride`][Self::stride].
306        #[unsafe(method(setStride:))]
307        #[unsafe(method_family = none)]
308        pub unsafe fn setStride(&self, stride: NSUInteger);
309    );
310}
311
312/// Methods declared on superclass `NSObject`.
313impl MDLVertexBufferLayout {
314    extern_methods!(
315        #[unsafe(method(init))]
316        #[unsafe(method_family = init)]
317        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
318
319        #[unsafe(method(new))]
320        #[unsafe(method_family = new)]
321        pub unsafe fn new() -> Retained<Self>;
322    );
323}
324
325extern_class!(
326    /// Structure with properties of a vertex attribute
327    ///
328    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattribute?language=objc)
329    #[unsafe(super(NSObject))]
330    #[derive(Debug, PartialEq, Eq, Hash)]
331    pub struct MDLVertexAttribute;
332);
333
334unsafe impl NSCopying for MDLVertexAttribute {}
335
336unsafe impl CopyingHelper for MDLVertexAttribute {
337    type Result = Self;
338}
339
340unsafe impl NSObjectProtocol for MDLVertexAttribute {}
341
342impl MDLVertexAttribute {
343    extern_methods!(
344        /// Initialize attribute object with all properties
345        #[unsafe(method(initWithName:format:offset:bufferIndex:))]
346        #[unsafe(method_family = init)]
347        pub unsafe fn initWithName_format_offset_bufferIndex(
348            this: Allocated<Self>,
349            name: &NSString,
350            format: MDLVertexFormat,
351            offset: NSUInteger,
352            buffer_index: NSUInteger,
353        ) -> Retained<Self>;
354
355        /// Identifying name of the attribute derived from model file, or one of
356        /// the predefined MDLVertexAttribute strings
357        #[unsafe(method(name))]
358        #[unsafe(method_family = none)]
359        pub unsafe fn name(&self) -> Retained<NSString>;
360
361        /// Setter for [`name`][Self::name].
362        #[unsafe(method(setName:))]
363        #[unsafe(method_family = none)]
364        pub unsafe fn setName(&self, name: &NSString);
365
366        /// Format (including number of components) of the attribute
367        ///
368        /// If the value is MDLVertexFormatInvalid.   Other values of this
369        /// object will be ignored when setting the MDLVertexDescriptor object
370        /// in a Mesh. The initial value is MDLVertexFormatInvalid.
371        #[unsafe(method(format))]
372        #[unsafe(method_family = none)]
373        pub unsafe fn format(&self) -> MDLVertexFormat;
374
375        /// Setter for [`format`][Self::format].
376        #[unsafe(method(setFormat:))]
377        #[unsafe(method_family = none)]
378        pub unsafe fn setFormat(&self, format: MDLVertexFormat);
379
380        /// offset in bytes of the attrbute in each element of the vertex buffer
381        #[unsafe(method(offset))]
382        #[unsafe(method_family = none)]
383        pub unsafe fn offset(&self) -> NSUInteger;
384
385        /// Setter for [`offset`][Self::offset].
386        #[unsafe(method(setOffset:))]
387        #[unsafe(method_family = none)]
388        pub unsafe fn setOffset(&self, offset: NSUInteger);
389
390        /// index of the buffer in mesh's vertexBuffer array in which this
391        /// attribute resides
392        #[unsafe(method(bufferIndex))]
393        #[unsafe(method_family = none)]
394        pub unsafe fn bufferIndex(&self) -> NSUInteger;
395
396        /// Setter for [`bufferIndex`][Self::bufferIndex].
397        #[unsafe(method(setBufferIndex:))]
398        #[unsafe(method_family = none)]
399        pub unsafe fn setBufferIndex(&self, buffer_index: NSUInteger);
400
401        /// the time the attribute is intended for.
402        ///
403        /// morph targets would store their times here
404        #[unsafe(method(time))]
405        #[unsafe(method_family = none)]
406        pub unsafe fn time(&self) -> NSTimeInterval;
407
408        /// Setter for [`time`][Self::time].
409        #[unsafe(method(setTime:))]
410        #[unsafe(method_family = none)]
411        pub unsafe fn setTime(&self, time: NSTimeInterval);
412    );
413}
414
415/// Methods declared on superclass `NSObject`.
416impl MDLVertexAttribute {
417    extern_methods!(
418        #[unsafe(method(init))]
419        #[unsafe(method_family = init)]
420        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
421
422        #[unsafe(method(new))]
423        #[unsafe(method_family = new)]
424        pub unsafe fn new() -> Retained<Self>;
425    );
426}
427
428extern_class!(
429    /// Describes the layout of vertex buffers in MDLMesh objects
430    ///
431    /// This object is a property of MDLMesh describing the current state of
432    /// attributes and buffer layouts of the vertex buffers in the mesh. This must be
433    /// immutable otherwise even small changes could cause the buffers to be out of sync
434    /// with the layout described here.
435    ///
436    /// Designed to be very similar to MTLVertexDescriptor to ease creation of one from
437    /// the other
438    ///
439    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexdescriptor?language=objc)
440    #[unsafe(super(NSObject))]
441    #[derive(Debug, PartialEq, Eq, Hash)]
442    pub struct MDLVertexDescriptor;
443);
444
445unsafe impl NSCopying for MDLVertexDescriptor {}
446
447unsafe impl CopyingHelper for MDLVertexDescriptor {
448    type Result = Self;
449}
450
451unsafe impl NSObjectProtocol for MDLVertexDescriptor {}
452
453impl MDLVertexDescriptor {
454    extern_methods!(
455        /// Initializes the object with values from supplied vertexDescriptor
456        ///
457        /// This performs a deep copy of all data in the supplied descriptor.
458        #[unsafe(method(initWithVertexDescriptor:))]
459        #[unsafe(method_family = init)]
460        pub unsafe fn initWithVertexDescriptor(
461            this: Allocated<Self>,
462            vertex_descriptor: &MDLVertexDescriptor,
463        ) -> Retained<Self>;
464
465        /// Retrieves the attribute with the given name
466        ///
467        /// Returns: The attribute with the supplied name or nil if attribute with the given
468        /// name does not exist in the descriptor object
469        #[unsafe(method(attributeNamed:))]
470        #[unsafe(method_family = none)]
471        pub unsafe fn attributeNamed(
472            &self,
473            name: &NSString,
474        ) -> Option<Retained<MDLVertexAttribute>>;
475
476        /// Replace any attribute with the same name and time, or add it if it does not
477        /// already exist.
478        #[unsafe(method(addOrReplaceAttribute:))]
479        #[unsafe(method_family = none)]
480        pub unsafe fn addOrReplaceAttribute(&self, attribute: &MDLVertexAttribute);
481
482        /// Remove the named attribute if it exists
483        #[unsafe(method(removeAttributeNamed:))]
484        #[unsafe(method_family = none)]
485        pub unsafe fn removeAttributeNamed(&self, name: &NSString);
486
487        /// An array of MDLVertexAttribute objects
488        ///
489        /// ay describing the current attribute state of vertex buffers in an
490        /// MDLMesh mesh
491        #[unsafe(method(attributes))]
492        #[unsafe(method_family = none)]
493        pub unsafe fn attributes(&self) -> Retained<NSMutableArray<MDLVertexAttribute>>;
494
495        /// Setter for [`attributes`][Self::attributes].
496        #[unsafe(method(setAttributes:))]
497        #[unsafe(method_family = none)]
498        pub unsafe fn setAttributes(&self, attributes: &NSMutableArray<MDLVertexAttribute>);
499
500        /// An array of MDLVertexBufferLayout
501        ///
502        /// An array describing the current layout state of vertex buffers in an
503        /// MDLMesh mesh
504        #[unsafe(method(layouts))]
505        #[unsafe(method_family = none)]
506        pub unsafe fn layouts(&self) -> Retained<NSMutableArray<MDLVertexBufferLayout>>;
507
508        /// Setter for [`layouts`][Self::layouts].
509        #[unsafe(method(setLayouts:))]
510        #[unsafe(method_family = none)]
511        pub unsafe fn setLayouts(&self, layouts: &NSMutableArray<MDLVertexBufferLayout>);
512
513        /// Tesets the descriptor to initial values
514        #[unsafe(method(reset))]
515        #[unsafe(method_family = none)]
516        pub unsafe fn reset(&self);
517
518        /// Sets the stride in each VertexBufferLout in the layouts array to the
519        /// minimum value encompassing all attributes in the vertex buffer
520        #[unsafe(method(setPackedStrides))]
521        #[unsafe(method_family = none)]
522        pub unsafe fn setPackedStrides(&self);
523
524        /// Sets the stride in each VertexAttribute in the attributes array to
525        /// the minimum value to pack each attribute next to each other in its
526        /// vertexbuffer
527        #[unsafe(method(setPackedOffsets))]
528        #[unsafe(method_family = none)]
529        pub unsafe fn setPackedOffsets(&self);
530    );
531}
532
533/// Methods declared on superclass `NSObject`.
534impl MDLVertexDescriptor {
535    extern_methods!(
536        #[unsafe(method(init))]
537        #[unsafe(method_family = init)]
538        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
539
540        #[unsafe(method(new))]
541        #[unsafe(method_family = new)]
542        pub unsafe fn new() -> Retained<Self>;
543    );
544}