objc2_metal_performance_shaders/generated/MPSRayIntersector/
MPSTriangleAccelerationStructure.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7use objc2_metal::*;
8
9use crate::*;
10
11extern_class!(
12 #[unsafe(super(
19 MPSPolygonAccelerationStructure,
20 MPSAccelerationStructure,
21 MPSKernel,
22 NSObject
23 ))]
24 #[derive(Debug, PartialEq, Eq, Hash)]
25 #[cfg(all(
26 feature = "MPSAccelerationStructure",
27 feature = "MPSCore",
28 feature = "MPSKernel",
29 feature = "MPSPolygonAccelerationStructure"
30 ))]
31 #[deprecated]
32 pub struct MPSTriangleAccelerationStructure;
33);
34
35#[cfg(all(
36 feature = "MPSAccelerationStructure",
37 feature = "MPSCore",
38 feature = "MPSKernel",
39 feature = "MPSPolygonAccelerationStructure"
40))]
41extern_conformance!(
42 unsafe impl NSCoding for MPSTriangleAccelerationStructure {}
43);
44
45#[cfg(all(
46 feature = "MPSAccelerationStructure",
47 feature = "MPSCore",
48 feature = "MPSKernel",
49 feature = "MPSPolygonAccelerationStructure"
50))]
51extern_conformance!(
52 unsafe impl NSCopying for MPSTriangleAccelerationStructure {}
53);
54
55#[cfg(all(
56 feature = "MPSAccelerationStructure",
57 feature = "MPSCore",
58 feature = "MPSKernel",
59 feature = "MPSPolygonAccelerationStructure"
60))]
61unsafe impl CopyingHelper for MPSTriangleAccelerationStructure {
62 type Result = Self;
63}
64
65#[cfg(all(
66 feature = "MPSAccelerationStructure",
67 feature = "MPSCore",
68 feature = "MPSKernel",
69 feature = "MPSPolygonAccelerationStructure"
70))]
71extern_conformance!(
72 unsafe impl NSObjectProtocol for MPSTriangleAccelerationStructure {}
73);
74
75#[cfg(all(
76 feature = "MPSAccelerationStructure",
77 feature = "MPSCore",
78 feature = "MPSKernel",
79 feature = "MPSPolygonAccelerationStructure"
80))]
81extern_conformance!(
82 unsafe impl NSSecureCoding for MPSTriangleAccelerationStructure {}
83);
84
85#[cfg(all(
86 feature = "MPSAccelerationStructure",
87 feature = "MPSCore",
88 feature = "MPSKernel",
89 feature = "MPSPolygonAccelerationStructure"
90))]
91impl MPSTriangleAccelerationStructure {
92 extern_methods!(
93 #[deprecated]
98 #[unsafe(method(triangleCount))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn triangleCount(&self) -> NSUInteger;
101
102 #[deprecated]
104 #[unsafe(method(setTriangleCount:))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn setTriangleCount(&self, triangle_count: NSUInteger);
107 );
108}
109
110#[cfg(all(
112 feature = "MPSAccelerationStructure",
113 feature = "MPSCore",
114 feature = "MPSKernel",
115 feature = "MPSPolygonAccelerationStructure"
116))]
117impl MPSTriangleAccelerationStructure {
118 extern_methods!(
119 #[deprecated]
120 #[unsafe(method(init))]
121 #[unsafe(method_family = init)]
122 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
123
124 #[deprecated]
126 #[unsafe(method(initWithDevice:))]
127 #[unsafe(method_family = init)]
128 pub unsafe fn initWithDevice(
129 this: Allocated<Self>,
130 device: &ProtocolObject<dyn MTLDevice>,
131 ) -> Retained<Self>;
132
133 #[deprecated]
141 #[unsafe(method(initWithCoder:device:))]
142 #[unsafe(method_family = init)]
143 pub unsafe fn initWithCoder_device(
144 this: Allocated<Self>,
145 a_decoder: &NSCoder,
146 device: &ProtocolObject<dyn MTLDevice>,
147 ) -> Option<Retained<Self>>;
148
149 #[cfg(feature = "MPSAccelerationStructureGroup")]
150 #[deprecated]
157 #[unsafe(method(initWithGroup:))]
158 #[unsafe(method_family = init)]
159 pub unsafe fn initWithGroup(
160 this: Allocated<Self>,
161 group: &MPSAccelerationStructureGroup,
162 ) -> Retained<Self>;
163
164 #[cfg(feature = "MPSAccelerationStructureGroup")]
165 #[deprecated]
175 #[unsafe(method(initWithCoder:group:))]
176 #[unsafe(method_family = init)]
177 pub unsafe fn initWithCoder_group(
178 this: Allocated<Self>,
179 a_decoder: &NSCoder,
180 group: &MPSAccelerationStructureGroup,
181 ) -> Option<Retained<Self>>;
182 );
183}
184
185#[cfg(all(
187 feature = "MPSAccelerationStructure",
188 feature = "MPSCore",
189 feature = "MPSKernel",
190 feature = "MPSPolygonAccelerationStructure"
191))]
192impl MPSTriangleAccelerationStructure {
193 extern_methods!(
194 #[unsafe(method(initWithCoder:))]
207 #[unsafe(method_family = init)]
208 pub unsafe fn initWithCoder(
209 this: Allocated<Self>,
210 a_decoder: &NSCoder,
211 ) -> Option<Retained<Self>>;
212 );
213}
214
215#[cfg(all(
217 feature = "MPSAccelerationStructure",
218 feature = "MPSCore",
219 feature = "MPSKernel",
220 feature = "MPSPolygonAccelerationStructure"
221))]
222impl MPSTriangleAccelerationStructure {
223 extern_methods!(
224 #[unsafe(method(new))]
225 #[unsafe(method_family = new)]
226 pub unsafe fn new() -> Retained<Self>;
227 );
228}