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
280extern_conformance!(
281    unsafe impl NSCopying for MDLVertexBufferLayout {}
282);
283
284unsafe impl CopyingHelper for MDLVertexBufferLayout {
285    type Result = Self;
286}
287
288extern_conformance!(
289    unsafe impl NSObjectProtocol for MDLVertexBufferLayout {}
290);
291
292impl MDLVertexBufferLayout {
293    extern_methods!(
294        #[unsafe(method(initWithStride:))]
295        #[unsafe(method_family = init)]
296        pub unsafe fn initWithStride(this: Allocated<Self>, stride: NSUInteger) -> Retained<Self>;
297
298        /// stride in bytes of each vertex element in the buffer.
299        ///
300        /// - If you store multiple attributes interleaved in the vertex
301        /// buffer, the stride will be the sum of sizes of each attribute (and any padding).
302        /// - If you store multiple attributes non-interleaved (back to back),
303        /// the stride will be the size of an attribute (and all attributes are
304        /// required to have the same size).
305        #[unsafe(method(stride))]
306        #[unsafe(method_family = none)]
307        pub unsafe fn stride(&self) -> NSUInteger;
308
309        /// Setter for [`stride`][Self::stride].
310        #[unsafe(method(setStride:))]
311        #[unsafe(method_family = none)]
312        pub unsafe fn setStride(&self, stride: NSUInteger);
313    );
314}
315
316/// Methods declared on superclass `NSObject`.
317impl MDLVertexBufferLayout {
318    extern_methods!(
319        #[unsafe(method(init))]
320        #[unsafe(method_family = init)]
321        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
322
323        #[unsafe(method(new))]
324        #[unsafe(method_family = new)]
325        pub unsafe fn new() -> Retained<Self>;
326    );
327}
328
329extern_class!(
330    /// Structure with properties of a vertex attribute
331    ///
332    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexattribute?language=objc)
333    #[unsafe(super(NSObject))]
334    #[derive(Debug, PartialEq, Eq, Hash)]
335    pub struct MDLVertexAttribute;
336);
337
338extern_conformance!(
339    unsafe impl NSCopying for MDLVertexAttribute {}
340);
341
342unsafe impl CopyingHelper for MDLVertexAttribute {
343    type Result = Self;
344}
345
346extern_conformance!(
347    unsafe impl NSObjectProtocol for MDLVertexAttribute {}
348);
349
350impl MDLVertexAttribute {
351    extern_methods!(
352        /// Initialize attribute object with all properties
353        #[unsafe(method(initWithName:format:offset:bufferIndex:))]
354        #[unsafe(method_family = init)]
355        pub unsafe fn initWithName_format_offset_bufferIndex(
356            this: Allocated<Self>,
357            name: &NSString,
358            format: MDLVertexFormat,
359            offset: NSUInteger,
360            buffer_index: NSUInteger,
361        ) -> Retained<Self>;
362
363        /// Identifying name of the attribute derived from model file, or one of
364        /// the predefined MDLVertexAttribute strings
365        #[unsafe(method(name))]
366        #[unsafe(method_family = none)]
367        pub unsafe fn name(&self) -> Retained<NSString>;
368
369        /// Setter for [`name`][Self::name].
370        ///
371        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
372        #[unsafe(method(setName:))]
373        #[unsafe(method_family = none)]
374        pub unsafe fn setName(&self, name: &NSString);
375
376        /// Format (including number of components) of the attribute
377        ///
378        /// If the value is MDLVertexFormatInvalid.   Other values of this
379        /// object will be ignored when setting the MDLVertexDescriptor object
380        /// in a Mesh. The initial value is MDLVertexFormatInvalid.
381        #[unsafe(method(format))]
382        #[unsafe(method_family = none)]
383        pub unsafe fn format(&self) -> MDLVertexFormat;
384
385        /// Setter for [`format`][Self::format].
386        #[unsafe(method(setFormat:))]
387        #[unsafe(method_family = none)]
388        pub unsafe fn setFormat(&self, format: MDLVertexFormat);
389
390        /// offset in bytes of the attrbute in each element of the vertex buffer
391        #[unsafe(method(offset))]
392        #[unsafe(method_family = none)]
393        pub unsafe fn offset(&self) -> NSUInteger;
394
395        /// Setter for [`offset`][Self::offset].
396        #[unsafe(method(setOffset:))]
397        #[unsafe(method_family = none)]
398        pub unsafe fn setOffset(&self, offset: NSUInteger);
399
400        /// index of the buffer in mesh's vertexBuffer array in which this
401        /// attribute resides
402        #[unsafe(method(bufferIndex))]
403        #[unsafe(method_family = none)]
404        pub unsafe fn bufferIndex(&self) -> NSUInteger;
405
406        /// Setter for [`bufferIndex`][Self::bufferIndex].
407        #[unsafe(method(setBufferIndex:))]
408        #[unsafe(method_family = none)]
409        pub unsafe fn setBufferIndex(&self, buffer_index: NSUInteger);
410
411        /// the time the attribute is intended for.
412        ///
413        /// morph targets would store their times here
414        #[unsafe(method(time))]
415        #[unsafe(method_family = none)]
416        pub unsafe fn time(&self) -> NSTimeInterval;
417
418        /// Setter for [`time`][Self::time].
419        #[unsafe(method(setTime:))]
420        #[unsafe(method_family = none)]
421        pub unsafe fn setTime(&self, time: NSTimeInterval);
422    );
423}
424
425/// Methods declared on superclass `NSObject`.
426impl MDLVertexAttribute {
427    extern_methods!(
428        #[unsafe(method(init))]
429        #[unsafe(method_family = init)]
430        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
431
432        #[unsafe(method(new))]
433        #[unsafe(method_family = new)]
434        pub unsafe fn new() -> Retained<Self>;
435    );
436}
437
438extern_class!(
439    /// Describes the layout of vertex buffers in MDLMesh objects
440    ///
441    /// This object is a property of MDLMesh describing the current state of
442    /// attributes and buffer layouts of the vertex buffers in the mesh. This must be
443    /// immutable otherwise even small changes could cause the buffers to be out of sync
444    /// with the layout described here.
445    ///
446    /// Designed to be very similar to MTLVertexDescriptor to ease creation of one from
447    /// the other
448    ///
449    /// See also [Apple's documentation](https://developer.apple.com/documentation/modelio/mdlvertexdescriptor?language=objc)
450    #[unsafe(super(NSObject))]
451    #[derive(Debug, PartialEq, Eq, Hash)]
452    pub struct MDLVertexDescriptor;
453);
454
455extern_conformance!(
456    unsafe impl NSCopying for MDLVertexDescriptor {}
457);
458
459unsafe impl CopyingHelper for MDLVertexDescriptor {
460    type Result = Self;
461}
462
463extern_conformance!(
464    unsafe impl NSObjectProtocol for MDLVertexDescriptor {}
465);
466
467impl MDLVertexDescriptor {
468    extern_methods!(
469        /// Initializes the object with values from supplied vertexDescriptor
470        ///
471        /// This performs a deep copy of all data in the supplied descriptor.
472        #[unsafe(method(initWithVertexDescriptor:))]
473        #[unsafe(method_family = init)]
474        pub unsafe fn initWithVertexDescriptor(
475            this: Allocated<Self>,
476            vertex_descriptor: &MDLVertexDescriptor,
477        ) -> Retained<Self>;
478
479        /// Retrieves the attribute with the given name
480        ///
481        /// Returns: The attribute with the supplied name or nil if attribute with the given
482        /// name does not exist in the descriptor object
483        #[unsafe(method(attributeNamed:))]
484        #[unsafe(method_family = none)]
485        pub unsafe fn attributeNamed(
486            &self,
487            name: &NSString,
488        ) -> Option<Retained<MDLVertexAttribute>>;
489
490        /// Replace any attribute with the same name and time, or add it if it does not
491        /// already exist.
492        #[unsafe(method(addOrReplaceAttribute:))]
493        #[unsafe(method_family = none)]
494        pub unsafe fn addOrReplaceAttribute(&self, attribute: &MDLVertexAttribute);
495
496        /// Remove the named attribute if it exists
497        #[unsafe(method(removeAttributeNamed:))]
498        #[unsafe(method_family = none)]
499        pub unsafe fn removeAttributeNamed(&self, name: &NSString);
500
501        /// An array of MDLVertexAttribute objects
502        ///
503        /// ay describing the current attribute state of vertex buffers in an
504        /// MDLMesh mesh
505        #[unsafe(method(attributes))]
506        #[unsafe(method_family = none)]
507        pub unsafe fn attributes(&self) -> Retained<NSMutableArray<MDLVertexAttribute>>;
508
509        /// Setter for [`attributes`][Self::attributes].
510        #[unsafe(method(setAttributes:))]
511        #[unsafe(method_family = none)]
512        pub unsafe fn setAttributes(&self, attributes: &NSMutableArray<MDLVertexAttribute>);
513
514        /// An array of MDLVertexBufferLayout
515        ///
516        /// An array describing the current layout state of vertex buffers in an
517        /// MDLMesh mesh
518        #[unsafe(method(layouts))]
519        #[unsafe(method_family = none)]
520        pub unsafe fn layouts(&self) -> Retained<NSMutableArray<MDLVertexBufferLayout>>;
521
522        /// Setter for [`layouts`][Self::layouts].
523        #[unsafe(method(setLayouts:))]
524        #[unsafe(method_family = none)]
525        pub unsafe fn setLayouts(&self, layouts: &NSMutableArray<MDLVertexBufferLayout>);
526
527        /// Tesets the descriptor to initial values
528        #[unsafe(method(reset))]
529        #[unsafe(method_family = none)]
530        pub unsafe fn reset(&self);
531
532        /// Sets the stride in each VertexBufferLout in the layouts array to the
533        /// minimum value encompassing all attributes in the vertex buffer
534        #[unsafe(method(setPackedStrides))]
535        #[unsafe(method_family = none)]
536        pub unsafe fn setPackedStrides(&self);
537
538        /// Sets the stride in each VertexAttribute in the attributes array to
539        /// the minimum value to pack each attribute next to each other in its
540        /// vertexbuffer
541        #[unsafe(method(setPackedOffsets))]
542        #[unsafe(method_family = none)]
543        pub unsafe fn setPackedOffsets(&self);
544    );
545}
546
547/// Methods declared on superclass `NSObject`.
548impl MDLVertexDescriptor {
549    extern_methods!(
550        #[unsafe(method(init))]
551        #[unsafe(method_family = init)]
552        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
553
554        #[unsafe(method(new))]
555        #[unsafe(method_family = new)]
556        pub unsafe fn new() -> Retained<Self>;
557    );
558}