objc2_scene_kit/generated/
SCNPhysicsBehavior.rs1use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6#[cfg(feature = "objc2-core-foundation")]
7use objc2_core_foundation::*;
8use objc2_foundation::*;
9
10use crate::*;
11
12extern_class!(
13 #[unsafe(super(NSObject))]
17 #[derive(Debug, PartialEq, Eq, Hash)]
18 pub struct SCNPhysicsBehavior;
19);
20
21extern_conformance!(
22 unsafe impl NSCoding for SCNPhysicsBehavior {}
23);
24
25extern_conformance!(
26 unsafe impl NSObjectProtocol for SCNPhysicsBehavior {}
27);
28
29extern_conformance!(
30 unsafe impl NSSecureCoding for SCNPhysicsBehavior {}
31);
32
33impl SCNPhysicsBehavior {
34 extern_methods!();
35}
36
37impl SCNPhysicsBehavior {
39 extern_methods!(
40 #[unsafe(method(init))]
41 #[unsafe(method_family = init)]
42 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
43
44 #[unsafe(method(new))]
45 #[unsafe(method_family = new)]
46 pub unsafe fn new() -> Retained<Self>;
47 );
48}
49
50extern_class!(
51 #[unsafe(super(SCNPhysicsBehavior, NSObject))]
55 #[derive(Debug, PartialEq, Eq, Hash)]
56 pub struct SCNPhysicsHingeJoint;
57);
58
59extern_conformance!(
60 unsafe impl NSCoding for SCNPhysicsHingeJoint {}
61);
62
63extern_conformance!(
64 unsafe impl NSObjectProtocol for SCNPhysicsHingeJoint {}
65);
66
67extern_conformance!(
68 unsafe impl NSSecureCoding for SCNPhysicsHingeJoint {}
69);
70
71impl SCNPhysicsHingeJoint {
72 extern_methods!(
73 #[cfg(all(
74 feature = "SCNPhysicsBody",
75 feature = "SceneKitTypes",
76 feature = "objc2-core-foundation"
77 ))]
78 #[unsafe(method(jointWithBodyA:axisA:anchorA:bodyB:axisB:anchorB:))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn jointWithBodyA_axisA_anchorA_bodyB_axisB_anchorB(
81 body_a: &SCNPhysicsBody,
82 axis_a: SCNVector3,
83 anchor_a: SCNVector3,
84 body_b: &SCNPhysicsBody,
85 axis_b: SCNVector3,
86 anchor_b: SCNVector3,
87 ) -> Retained<Self>;
88
89 #[cfg(all(
90 feature = "SCNPhysicsBody",
91 feature = "SceneKitTypes",
92 feature = "objc2-core-foundation"
93 ))]
94 #[unsafe(method(jointWithBody:axis:anchor:))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn jointWithBody_axis_anchor(
97 body: &SCNPhysicsBody,
98 axis: SCNVector3,
99 anchor: SCNVector3,
100 ) -> Retained<Self>;
101
102 #[cfg(feature = "SCNPhysicsBody")]
103 #[unsafe(method(bodyA))]
104 #[unsafe(method_family = none)]
105 pub unsafe fn bodyA(&self) -> Retained<SCNPhysicsBody>;
106
107 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
108 #[unsafe(method(axisA))]
109 #[unsafe(method_family = none)]
110 pub unsafe fn axisA(&self) -> SCNVector3;
111
112 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
113 #[unsafe(method(setAxisA:))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn setAxisA(&self, axis_a: SCNVector3);
117
118 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
119 #[unsafe(method(anchorA))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn anchorA(&self) -> SCNVector3;
122
123 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
124 #[unsafe(method(setAnchorA:))]
126 #[unsafe(method_family = none)]
127 pub unsafe fn setAnchorA(&self, anchor_a: SCNVector3);
128
129 #[cfg(feature = "SCNPhysicsBody")]
130 #[unsafe(method(bodyB))]
131 #[unsafe(method_family = none)]
132 pub unsafe fn bodyB(&self) -> Option<Retained<SCNPhysicsBody>>;
133
134 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
135 #[unsafe(method(axisB))]
136 #[unsafe(method_family = none)]
137 pub unsafe fn axisB(&self) -> SCNVector3;
138
139 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
140 #[unsafe(method(setAxisB:))]
142 #[unsafe(method_family = none)]
143 pub unsafe fn setAxisB(&self, axis_b: SCNVector3);
144
145 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
146 #[unsafe(method(anchorB))]
147 #[unsafe(method_family = none)]
148 pub unsafe fn anchorB(&self) -> SCNVector3;
149
150 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
151 #[unsafe(method(setAnchorB:))]
153 #[unsafe(method_family = none)]
154 pub unsafe fn setAnchorB(&self, anchor_b: SCNVector3);
155 );
156}
157
158impl SCNPhysicsHingeJoint {
160 extern_methods!(
161 #[unsafe(method(init))]
162 #[unsafe(method_family = init)]
163 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
164
165 #[unsafe(method(new))]
166 #[unsafe(method_family = new)]
167 pub unsafe fn new() -> Retained<Self>;
168 );
169}
170
171extern_class!(
172 #[unsafe(super(SCNPhysicsBehavior, NSObject))]
176 #[derive(Debug, PartialEq, Eq, Hash)]
177 pub struct SCNPhysicsBallSocketJoint;
178);
179
180extern_conformance!(
181 unsafe impl NSCoding for SCNPhysicsBallSocketJoint {}
182);
183
184extern_conformance!(
185 unsafe impl NSObjectProtocol for SCNPhysicsBallSocketJoint {}
186);
187
188extern_conformance!(
189 unsafe impl NSSecureCoding for SCNPhysicsBallSocketJoint {}
190);
191
192impl SCNPhysicsBallSocketJoint {
193 extern_methods!(
194 #[cfg(all(
195 feature = "SCNPhysicsBody",
196 feature = "SceneKitTypes",
197 feature = "objc2-core-foundation"
198 ))]
199 #[unsafe(method(jointWithBodyA:anchorA:bodyB:anchorB:))]
200 #[unsafe(method_family = none)]
201 pub unsafe fn jointWithBodyA_anchorA_bodyB_anchorB(
202 body_a: &SCNPhysicsBody,
203 anchor_a: SCNVector3,
204 body_b: &SCNPhysicsBody,
205 anchor_b: SCNVector3,
206 ) -> Retained<Self>;
207
208 #[cfg(all(
209 feature = "SCNPhysicsBody",
210 feature = "SceneKitTypes",
211 feature = "objc2-core-foundation"
212 ))]
213 #[unsafe(method(jointWithBody:anchor:))]
214 #[unsafe(method_family = none)]
215 pub unsafe fn jointWithBody_anchor(
216 body: &SCNPhysicsBody,
217 anchor: SCNVector3,
218 ) -> Retained<Self>;
219
220 #[cfg(feature = "SCNPhysicsBody")]
221 #[unsafe(method(bodyA))]
222 #[unsafe(method_family = none)]
223 pub unsafe fn bodyA(&self) -> Retained<SCNPhysicsBody>;
224
225 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
226 #[unsafe(method(anchorA))]
227 #[unsafe(method_family = none)]
228 pub unsafe fn anchorA(&self) -> SCNVector3;
229
230 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
231 #[unsafe(method(setAnchorA:))]
233 #[unsafe(method_family = none)]
234 pub unsafe fn setAnchorA(&self, anchor_a: SCNVector3);
235
236 #[cfg(feature = "SCNPhysicsBody")]
237 #[unsafe(method(bodyB))]
238 #[unsafe(method_family = none)]
239 pub unsafe fn bodyB(&self) -> Option<Retained<SCNPhysicsBody>>;
240
241 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
242 #[unsafe(method(anchorB))]
243 #[unsafe(method_family = none)]
244 pub unsafe fn anchorB(&self) -> SCNVector3;
245
246 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
247 #[unsafe(method(setAnchorB:))]
249 #[unsafe(method_family = none)]
250 pub unsafe fn setAnchorB(&self, anchor_b: SCNVector3);
251 );
252}
253
254impl SCNPhysicsBallSocketJoint {
256 extern_methods!(
257 #[unsafe(method(init))]
258 #[unsafe(method_family = init)]
259 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
260
261 #[unsafe(method(new))]
262 #[unsafe(method_family = new)]
263 pub unsafe fn new() -> Retained<Self>;
264 );
265}
266
267extern_class!(
268 #[unsafe(super(SCNPhysicsBehavior, NSObject))]
272 #[derive(Debug, PartialEq, Eq, Hash)]
273 pub struct SCNPhysicsSliderJoint;
274);
275
276extern_conformance!(
277 unsafe impl NSCoding for SCNPhysicsSliderJoint {}
278);
279
280extern_conformance!(
281 unsafe impl NSObjectProtocol for SCNPhysicsSliderJoint {}
282);
283
284extern_conformance!(
285 unsafe impl NSSecureCoding for SCNPhysicsSliderJoint {}
286);
287
288impl SCNPhysicsSliderJoint {
289 extern_methods!(
290 #[cfg(all(
291 feature = "SCNPhysicsBody",
292 feature = "SceneKitTypes",
293 feature = "objc2-core-foundation"
294 ))]
295 #[unsafe(method(jointWithBodyA:axisA:anchorA:bodyB:axisB:anchorB:))]
296 #[unsafe(method_family = none)]
297 pub unsafe fn jointWithBodyA_axisA_anchorA_bodyB_axisB_anchorB(
298 body_a: &SCNPhysicsBody,
299 axis_a: SCNVector3,
300 anchor_a: SCNVector3,
301 body_b: &SCNPhysicsBody,
302 axis_b: SCNVector3,
303 anchor_b: SCNVector3,
304 ) -> Retained<Self>;
305
306 #[cfg(all(
307 feature = "SCNPhysicsBody",
308 feature = "SceneKitTypes",
309 feature = "objc2-core-foundation"
310 ))]
311 #[unsafe(method(jointWithBody:axis:anchor:))]
312 #[unsafe(method_family = none)]
313 pub unsafe fn jointWithBody_axis_anchor(
314 body: &SCNPhysicsBody,
315 axis: SCNVector3,
316 anchor: SCNVector3,
317 ) -> Retained<Self>;
318
319 #[cfg(feature = "SCNPhysicsBody")]
320 #[unsafe(method(bodyA))]
321 #[unsafe(method_family = none)]
322 pub unsafe fn bodyA(&self) -> Retained<SCNPhysicsBody>;
323
324 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
325 #[unsafe(method(axisA))]
326 #[unsafe(method_family = none)]
327 pub unsafe fn axisA(&self) -> SCNVector3;
328
329 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
330 #[unsafe(method(setAxisA:))]
332 #[unsafe(method_family = none)]
333 pub unsafe fn setAxisA(&self, axis_a: SCNVector3);
334
335 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
336 #[unsafe(method(anchorA))]
337 #[unsafe(method_family = none)]
338 pub unsafe fn anchorA(&self) -> SCNVector3;
339
340 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
341 #[unsafe(method(setAnchorA:))]
343 #[unsafe(method_family = none)]
344 pub unsafe fn setAnchorA(&self, anchor_a: SCNVector3);
345
346 #[cfg(feature = "SCNPhysicsBody")]
347 #[unsafe(method(bodyB))]
348 #[unsafe(method_family = none)]
349 pub unsafe fn bodyB(&self) -> Option<Retained<SCNPhysicsBody>>;
350
351 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
352 #[unsafe(method(axisB))]
353 #[unsafe(method_family = none)]
354 pub unsafe fn axisB(&self) -> SCNVector3;
355
356 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
357 #[unsafe(method(setAxisB:))]
359 #[unsafe(method_family = none)]
360 pub unsafe fn setAxisB(&self, axis_b: SCNVector3);
361
362 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
363 #[unsafe(method(anchorB))]
364 #[unsafe(method_family = none)]
365 pub unsafe fn anchorB(&self) -> SCNVector3;
366
367 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
368 #[unsafe(method(setAnchorB:))]
370 #[unsafe(method_family = none)]
371 pub unsafe fn setAnchorB(&self, anchor_b: SCNVector3);
372
373 #[cfg(feature = "objc2-core-foundation")]
374 #[unsafe(method(minimumLinearLimit))]
375 #[unsafe(method_family = none)]
376 pub unsafe fn minimumLinearLimit(&self) -> CGFloat;
377
378 #[cfg(feature = "objc2-core-foundation")]
379 #[unsafe(method(setMinimumLinearLimit:))]
381 #[unsafe(method_family = none)]
382 pub unsafe fn setMinimumLinearLimit(&self, minimum_linear_limit: CGFloat);
383
384 #[cfg(feature = "objc2-core-foundation")]
385 #[unsafe(method(maximumLinearLimit))]
386 #[unsafe(method_family = none)]
387 pub unsafe fn maximumLinearLimit(&self) -> CGFloat;
388
389 #[cfg(feature = "objc2-core-foundation")]
390 #[unsafe(method(setMaximumLinearLimit:))]
392 #[unsafe(method_family = none)]
393 pub unsafe fn setMaximumLinearLimit(&self, maximum_linear_limit: CGFloat);
394
395 #[cfg(feature = "objc2-core-foundation")]
396 #[unsafe(method(minimumAngularLimit))]
397 #[unsafe(method_family = none)]
398 pub unsafe fn minimumAngularLimit(&self) -> CGFloat;
399
400 #[cfg(feature = "objc2-core-foundation")]
401 #[unsafe(method(setMinimumAngularLimit:))]
403 #[unsafe(method_family = none)]
404 pub unsafe fn setMinimumAngularLimit(&self, minimum_angular_limit: CGFloat);
405
406 #[cfg(feature = "objc2-core-foundation")]
407 #[unsafe(method(maximumAngularLimit))]
408 #[unsafe(method_family = none)]
409 pub unsafe fn maximumAngularLimit(&self) -> CGFloat;
410
411 #[cfg(feature = "objc2-core-foundation")]
412 #[unsafe(method(setMaximumAngularLimit:))]
414 #[unsafe(method_family = none)]
415 pub unsafe fn setMaximumAngularLimit(&self, maximum_angular_limit: CGFloat);
416
417 #[cfg(feature = "objc2-core-foundation")]
418 #[unsafe(method(motorTargetLinearVelocity))]
419 #[unsafe(method_family = none)]
420 pub unsafe fn motorTargetLinearVelocity(&self) -> CGFloat;
421
422 #[cfg(feature = "objc2-core-foundation")]
423 #[unsafe(method(setMotorTargetLinearVelocity:))]
425 #[unsafe(method_family = none)]
426 pub unsafe fn setMotorTargetLinearVelocity(&self, motor_target_linear_velocity: CGFloat);
427
428 #[cfg(feature = "objc2-core-foundation")]
429 #[unsafe(method(motorMaximumForce))]
430 #[unsafe(method_family = none)]
431 pub unsafe fn motorMaximumForce(&self) -> CGFloat;
432
433 #[cfg(feature = "objc2-core-foundation")]
434 #[unsafe(method(setMotorMaximumForce:))]
436 #[unsafe(method_family = none)]
437 pub unsafe fn setMotorMaximumForce(&self, motor_maximum_force: CGFloat);
438
439 #[cfg(feature = "objc2-core-foundation")]
440 #[unsafe(method(motorTargetAngularVelocity))]
441 #[unsafe(method_family = none)]
442 pub unsafe fn motorTargetAngularVelocity(&self) -> CGFloat;
443
444 #[cfg(feature = "objc2-core-foundation")]
445 #[unsafe(method(setMotorTargetAngularVelocity:))]
447 #[unsafe(method_family = none)]
448 pub unsafe fn setMotorTargetAngularVelocity(&self, motor_target_angular_velocity: CGFloat);
449
450 #[cfg(feature = "objc2-core-foundation")]
451 #[unsafe(method(motorMaximumTorque))]
452 #[unsafe(method_family = none)]
453 pub unsafe fn motorMaximumTorque(&self) -> CGFloat;
454
455 #[cfg(feature = "objc2-core-foundation")]
456 #[unsafe(method(setMotorMaximumTorque:))]
458 #[unsafe(method_family = none)]
459 pub unsafe fn setMotorMaximumTorque(&self, motor_maximum_torque: CGFloat);
460 );
461}
462
463impl SCNPhysicsSliderJoint {
465 extern_methods!(
466 #[unsafe(method(init))]
467 #[unsafe(method_family = init)]
468 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
469
470 #[unsafe(method(new))]
471 #[unsafe(method_family = new)]
472 pub unsafe fn new() -> Retained<Self>;
473 );
474}
475
476extern_class!(
477 #[unsafe(super(SCNPhysicsBehavior, NSObject))]
479 #[derive(Debug, PartialEq, Eq, Hash)]
480 pub struct SCNPhysicsConeTwistJoint;
481);
482
483extern_conformance!(
484 unsafe impl NSCoding for SCNPhysicsConeTwistJoint {}
485);
486
487extern_conformance!(
488 unsafe impl NSObjectProtocol for SCNPhysicsConeTwistJoint {}
489);
490
491extern_conformance!(
492 unsafe impl NSSecureCoding for SCNPhysicsConeTwistJoint {}
493);
494
495impl SCNPhysicsConeTwistJoint {
496 extern_methods!(
497 #[cfg(all(
498 feature = "SCNPhysicsBody",
499 feature = "SceneKitTypes",
500 feature = "objc2-quartz-core"
501 ))]
502 #[cfg(not(target_os = "watchos"))]
503 #[unsafe(method(jointWithBodyA:frameA:bodyB:frameB:))]
504 #[unsafe(method_family = none)]
505 pub unsafe fn jointWithBodyA_frameA_bodyB_frameB(
506 body_a: &SCNPhysicsBody,
507 frame_a: SCNMatrix4,
508 body_b: &SCNPhysicsBody,
509 frame_b: SCNMatrix4,
510 ) -> Retained<Self>;
511
512 #[cfg(all(
513 feature = "SCNPhysicsBody",
514 feature = "SceneKitTypes",
515 feature = "objc2-quartz-core"
516 ))]
517 #[cfg(not(target_os = "watchos"))]
518 #[unsafe(method(jointWithBody:frame:))]
519 #[unsafe(method_family = none)]
520 pub unsafe fn jointWithBody_frame(
521 body: &SCNPhysicsBody,
522 frame: SCNMatrix4,
523 ) -> Retained<Self>;
524
525 #[cfg(feature = "SCNPhysicsBody")]
526 #[unsafe(method(bodyA))]
527 #[unsafe(method_family = none)]
528 pub unsafe fn bodyA(&self) -> Retained<SCNPhysicsBody>;
529
530 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-quartz-core"))]
531 #[cfg(not(target_os = "watchos"))]
532 #[unsafe(method(frameA))]
533 #[unsafe(method_family = none)]
534 pub unsafe fn frameA(&self) -> SCNMatrix4;
535
536 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-quartz-core"))]
537 #[cfg(not(target_os = "watchos"))]
538 #[unsafe(method(setFrameA:))]
540 #[unsafe(method_family = none)]
541 pub unsafe fn setFrameA(&self, frame_a: SCNMatrix4);
542
543 #[cfg(feature = "SCNPhysicsBody")]
544 #[unsafe(method(bodyB))]
545 #[unsafe(method_family = none)]
546 pub unsafe fn bodyB(&self) -> Option<Retained<SCNPhysicsBody>>;
547
548 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-quartz-core"))]
549 #[cfg(not(target_os = "watchos"))]
550 #[unsafe(method(frameB))]
551 #[unsafe(method_family = none)]
552 pub unsafe fn frameB(&self) -> SCNMatrix4;
553
554 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-quartz-core"))]
555 #[cfg(not(target_os = "watchos"))]
556 #[unsafe(method(setFrameB:))]
558 #[unsafe(method_family = none)]
559 pub unsafe fn setFrameB(&self, frame_b: SCNMatrix4);
560
561 #[cfg(feature = "objc2-core-foundation")]
562 #[unsafe(method(maximumAngularLimit1))]
563 #[unsafe(method_family = none)]
564 pub unsafe fn maximumAngularLimit1(&self) -> CGFloat;
565
566 #[cfg(feature = "objc2-core-foundation")]
567 #[unsafe(method(setMaximumAngularLimit1:))]
569 #[unsafe(method_family = none)]
570 pub unsafe fn setMaximumAngularLimit1(&self, maximum_angular_limit1: CGFloat);
571
572 #[cfg(feature = "objc2-core-foundation")]
573 #[unsafe(method(maximumAngularLimit2))]
574 #[unsafe(method_family = none)]
575 pub unsafe fn maximumAngularLimit2(&self) -> CGFloat;
576
577 #[cfg(feature = "objc2-core-foundation")]
578 #[unsafe(method(setMaximumAngularLimit2:))]
580 #[unsafe(method_family = none)]
581 pub unsafe fn setMaximumAngularLimit2(&self, maximum_angular_limit2: CGFloat);
582
583 #[cfg(feature = "objc2-core-foundation")]
584 #[unsafe(method(maximumTwistAngle))]
585 #[unsafe(method_family = none)]
586 pub unsafe fn maximumTwistAngle(&self) -> CGFloat;
587
588 #[cfg(feature = "objc2-core-foundation")]
589 #[unsafe(method(setMaximumTwistAngle:))]
591 #[unsafe(method_family = none)]
592 pub unsafe fn setMaximumTwistAngle(&self, maximum_twist_angle: CGFloat);
593 );
594}
595
596impl SCNPhysicsConeTwistJoint {
598 extern_methods!(
599 #[unsafe(method(init))]
600 #[unsafe(method_family = init)]
601 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
602
603 #[unsafe(method(new))]
604 #[unsafe(method_family = new)]
605 pub unsafe fn new() -> Retained<Self>;
606 );
607}
608
609extern_class!(
610 #[unsafe(super(NSObject))]
614 #[derive(Debug, PartialEq, Eq, Hash)]
615 pub struct SCNPhysicsVehicleWheel;
616);
617
618extern_conformance!(
619 unsafe impl NSCoding for SCNPhysicsVehicleWheel {}
620);
621
622extern_conformance!(
623 unsafe impl NSCopying for SCNPhysicsVehicleWheel {}
624);
625
626unsafe impl CopyingHelper for SCNPhysicsVehicleWheel {
627 type Result = Self;
628}
629
630extern_conformance!(
631 unsafe impl NSObjectProtocol for SCNPhysicsVehicleWheel {}
632);
633
634extern_conformance!(
635 unsafe impl NSSecureCoding for SCNPhysicsVehicleWheel {}
636);
637
638impl SCNPhysicsVehicleWheel {
639 extern_methods!(
640 #[cfg(feature = "SCNNode")]
641 #[unsafe(method(wheelWithNode:))]
642 #[unsafe(method_family = none)]
643 pub unsafe fn wheelWithNode(node: &SCNNode) -> Retained<Self>;
644
645 #[cfg(feature = "SCNNode")]
646 #[unsafe(method(node))]
647 #[unsafe(method_family = none)]
648 pub unsafe fn node(&self) -> Retained<SCNNode>;
649
650 #[cfg(feature = "objc2-core-foundation")]
651 #[unsafe(method(suspensionStiffness))]
652 #[unsafe(method_family = none)]
653 pub unsafe fn suspensionStiffness(&self) -> CGFloat;
654
655 #[cfg(feature = "objc2-core-foundation")]
656 #[unsafe(method(setSuspensionStiffness:))]
658 #[unsafe(method_family = none)]
659 pub unsafe fn setSuspensionStiffness(&self, suspension_stiffness: CGFloat);
660
661 #[cfg(feature = "objc2-core-foundation")]
662 #[unsafe(method(suspensionCompression))]
663 #[unsafe(method_family = none)]
664 pub unsafe fn suspensionCompression(&self) -> CGFloat;
665
666 #[cfg(feature = "objc2-core-foundation")]
667 #[unsafe(method(setSuspensionCompression:))]
669 #[unsafe(method_family = none)]
670 pub unsafe fn setSuspensionCompression(&self, suspension_compression: CGFloat);
671
672 #[cfg(feature = "objc2-core-foundation")]
673 #[unsafe(method(suspensionDamping))]
674 #[unsafe(method_family = none)]
675 pub unsafe fn suspensionDamping(&self) -> CGFloat;
676
677 #[cfg(feature = "objc2-core-foundation")]
678 #[unsafe(method(setSuspensionDamping:))]
680 #[unsafe(method_family = none)]
681 pub unsafe fn setSuspensionDamping(&self, suspension_damping: CGFloat);
682
683 #[cfg(feature = "objc2-core-foundation")]
684 #[unsafe(method(maximumSuspensionTravel))]
685 #[unsafe(method_family = none)]
686 pub unsafe fn maximumSuspensionTravel(&self) -> CGFloat;
687
688 #[cfg(feature = "objc2-core-foundation")]
689 #[unsafe(method(setMaximumSuspensionTravel:))]
691 #[unsafe(method_family = none)]
692 pub unsafe fn setMaximumSuspensionTravel(&self, maximum_suspension_travel: CGFloat);
693
694 #[cfg(feature = "objc2-core-foundation")]
695 #[unsafe(method(frictionSlip))]
696 #[unsafe(method_family = none)]
697 pub unsafe fn frictionSlip(&self) -> CGFloat;
698
699 #[cfg(feature = "objc2-core-foundation")]
700 #[unsafe(method(setFrictionSlip:))]
702 #[unsafe(method_family = none)]
703 pub unsafe fn setFrictionSlip(&self, friction_slip: CGFloat);
704
705 #[cfg(feature = "objc2-core-foundation")]
706 #[unsafe(method(maximumSuspensionForce))]
707 #[unsafe(method_family = none)]
708 pub unsafe fn maximumSuspensionForce(&self) -> CGFloat;
709
710 #[cfg(feature = "objc2-core-foundation")]
711 #[unsafe(method(setMaximumSuspensionForce:))]
713 #[unsafe(method_family = none)]
714 pub unsafe fn setMaximumSuspensionForce(&self, maximum_suspension_force: CGFloat);
715
716 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
717 #[unsafe(method(connectionPosition))]
718 #[unsafe(method_family = none)]
719 pub unsafe fn connectionPosition(&self) -> SCNVector3;
720
721 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
722 #[unsafe(method(setConnectionPosition:))]
724 #[unsafe(method_family = none)]
725 pub unsafe fn setConnectionPosition(&self, connection_position: SCNVector3);
726
727 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
728 #[unsafe(method(steeringAxis))]
729 #[unsafe(method_family = none)]
730 pub unsafe fn steeringAxis(&self) -> SCNVector3;
731
732 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
733 #[unsafe(method(setSteeringAxis:))]
735 #[unsafe(method_family = none)]
736 pub unsafe fn setSteeringAxis(&self, steering_axis: SCNVector3);
737
738 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
739 #[unsafe(method(axle))]
740 #[unsafe(method_family = none)]
741 pub unsafe fn axle(&self) -> SCNVector3;
742
743 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
744 #[unsafe(method(setAxle:))]
746 #[unsafe(method_family = none)]
747 pub unsafe fn setAxle(&self, axle: SCNVector3);
748
749 #[cfg(feature = "objc2-core-foundation")]
750 #[unsafe(method(radius))]
751 #[unsafe(method_family = none)]
752 pub unsafe fn radius(&self) -> CGFloat;
753
754 #[cfg(feature = "objc2-core-foundation")]
755 #[unsafe(method(setRadius:))]
757 #[unsafe(method_family = none)]
758 pub unsafe fn setRadius(&self, radius: CGFloat);
759
760 #[cfg(feature = "objc2-core-foundation")]
761 #[unsafe(method(suspensionRestLength))]
762 #[unsafe(method_family = none)]
763 pub unsafe fn suspensionRestLength(&self) -> CGFloat;
764
765 #[cfg(feature = "objc2-core-foundation")]
766 #[unsafe(method(setSuspensionRestLength:))]
768 #[unsafe(method_family = none)]
769 pub unsafe fn setSuspensionRestLength(&self, suspension_rest_length: CGFloat);
770 );
771}
772
773impl SCNPhysicsVehicleWheel {
775 extern_methods!(
776 #[unsafe(method(init))]
777 #[unsafe(method_family = init)]
778 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
779
780 #[unsafe(method(new))]
781 #[unsafe(method_family = new)]
782 pub unsafe fn new() -> Retained<Self>;
783 );
784}
785
786extern_class!(
787 #[unsafe(super(SCNPhysicsBehavior, NSObject))]
791 #[derive(Debug, PartialEq, Eq, Hash)]
792 pub struct SCNPhysicsVehicle;
793);
794
795extern_conformance!(
796 unsafe impl NSCoding for SCNPhysicsVehicle {}
797);
798
799extern_conformance!(
800 unsafe impl NSObjectProtocol for SCNPhysicsVehicle {}
801);
802
803extern_conformance!(
804 unsafe impl NSSecureCoding for SCNPhysicsVehicle {}
805);
806
807impl SCNPhysicsVehicle {
808 extern_methods!(
809 #[cfg(feature = "SCNPhysicsBody")]
810 #[unsafe(method(vehicleWithChassisBody:wheels:))]
811 #[unsafe(method_family = none)]
812 pub unsafe fn vehicleWithChassisBody_wheels(
813 chassis_body: &SCNPhysicsBody,
814 wheels: &NSArray<SCNPhysicsVehicleWheel>,
815 ) -> Retained<Self>;
816
817 #[cfg(feature = "objc2-core-foundation")]
818 #[unsafe(method(speedInKilometersPerHour))]
819 #[unsafe(method_family = none)]
820 pub unsafe fn speedInKilometersPerHour(&self) -> CGFloat;
821
822 #[unsafe(method(wheels))]
823 #[unsafe(method_family = none)]
824 pub unsafe fn wheels(&self) -> Retained<NSArray<SCNPhysicsVehicleWheel>>;
825
826 #[cfg(feature = "SCNPhysicsBody")]
827 #[unsafe(method(chassisBody))]
828 #[unsafe(method_family = none)]
829 pub unsafe fn chassisBody(&self) -> Retained<SCNPhysicsBody>;
830
831 #[cfg(feature = "objc2-core-foundation")]
832 #[unsafe(method(applyEngineForce:forWheelAtIndex:))]
833 #[unsafe(method_family = none)]
834 pub unsafe fn applyEngineForce_forWheelAtIndex(&self, value: CGFloat, index: NSInteger);
835
836 #[cfg(feature = "objc2-core-foundation")]
837 #[unsafe(method(setSteeringAngle:forWheelAtIndex:))]
838 #[unsafe(method_family = none)]
839 pub unsafe fn setSteeringAngle_forWheelAtIndex(&self, value: CGFloat, index: NSInteger);
840
841 #[cfg(feature = "objc2-core-foundation")]
842 #[unsafe(method(applyBrakingForce:forWheelAtIndex:))]
843 #[unsafe(method_family = none)]
844 pub unsafe fn applyBrakingForce_forWheelAtIndex(&self, value: CGFloat, index: NSInteger);
845 );
846}
847
848impl SCNPhysicsVehicle {
850 extern_methods!(
851 #[unsafe(method(init))]
852 #[unsafe(method_family = init)]
853 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
854
855 #[unsafe(method(new))]
856 #[unsafe(method_family = new)]
857 pub unsafe fn new() -> Retained<Self>;
858 );
859}