objc2_scene_kit/generated/
SCNConstraint.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 SCNConstraint;
19);
20
21unsafe impl NSCoding for SCNConstraint {}
22
23unsafe impl NSCopying for SCNConstraint {}
24
25unsafe impl CopyingHelper for SCNConstraint {
26 type Result = Self;
27}
28
29unsafe impl NSObjectProtocol for SCNConstraint {}
30
31unsafe impl NSSecureCoding for SCNConstraint {}
32
33#[cfg(feature = "SCNAnimation")]
34unsafe impl SCNAnimatable for SCNConstraint {}
35
36impl SCNConstraint {
37 extern_methods!(
38 #[unsafe(method(isEnabled))]
40 #[unsafe(method_family = none)]
41 pub unsafe fn isEnabled(&self) -> bool;
42
43 #[unsafe(method(setEnabled:))]
45 #[unsafe(method_family = none)]
46 pub unsafe fn setEnabled(&self, enabled: bool);
47
48 #[cfg(feature = "objc2-core-foundation")]
49 #[unsafe(method(influenceFactor))]
51 #[unsafe(method_family = none)]
52 pub unsafe fn influenceFactor(&self) -> CGFloat;
53
54 #[cfg(feature = "objc2-core-foundation")]
55 #[unsafe(method(setInfluenceFactor:))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn setInfluenceFactor(&self, influence_factor: CGFloat);
59
60 #[unsafe(method(isIncremental))]
62 #[unsafe(method_family = none)]
63 pub unsafe fn isIncremental(&self) -> bool;
64
65 #[unsafe(method(setIncremental:))]
67 #[unsafe(method_family = none)]
68 pub unsafe fn setIncremental(&self, incremental: bool);
69 );
70}
71
72impl SCNConstraint {
74 extern_methods!(
75 #[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
85extern_class!(
86 #[unsafe(super(SCNConstraint, NSObject))]
90 #[derive(Debug, PartialEq, Eq, Hash)]
91 pub struct SCNLookAtConstraint;
92);
93
94unsafe impl NSCoding for SCNLookAtConstraint {}
95
96unsafe impl NSCopying for SCNLookAtConstraint {}
97
98unsafe impl CopyingHelper for SCNLookAtConstraint {
99 type Result = Self;
100}
101
102unsafe impl NSObjectProtocol for SCNLookAtConstraint {}
103
104unsafe impl NSSecureCoding for SCNLookAtConstraint {}
105
106#[cfg(feature = "SCNAnimation")]
107unsafe impl SCNAnimatable for SCNLookAtConstraint {}
108
109impl SCNLookAtConstraint {
110 extern_methods!(
111 #[cfg(feature = "SCNNode")]
112 #[unsafe(method(lookAtConstraintWithTarget:))]
116 #[unsafe(method_family = none)]
117 pub unsafe fn lookAtConstraintWithTarget(target: Option<&SCNNode>) -> Retained<Self>;
118
119 #[cfg(feature = "SCNNode")]
120 #[unsafe(method(target))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn target(&self) -> Option<Retained<SCNNode>>;
124
125 #[cfg(feature = "SCNNode")]
126 #[unsafe(method(setTarget:))]
128 #[unsafe(method_family = none)]
129 pub unsafe fn setTarget(&self, target: Option<&SCNNode>);
130
131 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
132 #[unsafe(method(targetOffset))]
134 #[unsafe(method_family = none)]
135 pub unsafe fn targetOffset(&self) -> SCNVector3;
136
137 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
138 #[unsafe(method(setTargetOffset:))]
140 #[unsafe(method_family = none)]
141 pub unsafe fn setTargetOffset(&self, target_offset: SCNVector3);
142
143 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
144 #[unsafe(method(localFront))]
146 #[unsafe(method_family = none)]
147 pub unsafe fn localFront(&self) -> SCNVector3;
148
149 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
150 #[unsafe(method(setLocalFront:))]
152 #[unsafe(method_family = none)]
153 pub unsafe fn setLocalFront(&self, local_front: SCNVector3);
154
155 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
156 #[unsafe(method(worldUp))]
158 #[unsafe(method_family = none)]
159 pub unsafe fn worldUp(&self) -> SCNVector3;
160
161 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
162 #[unsafe(method(setWorldUp:))]
164 #[unsafe(method_family = none)]
165 pub unsafe fn setWorldUp(&self, world_up: SCNVector3);
166
167 #[unsafe(method(gimbalLockEnabled))]
171 #[unsafe(method_family = none)]
172 pub unsafe fn gimbalLockEnabled(&self) -> bool;
173
174 #[unsafe(method(setGimbalLockEnabled:))]
176 #[unsafe(method_family = none)]
177 pub unsafe fn setGimbalLockEnabled(&self, gimbal_lock_enabled: bool);
178 );
179}
180
181impl SCNLookAtConstraint {
183 extern_methods!(
184 #[unsafe(method(init))]
185 #[unsafe(method_family = init)]
186 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
187
188 #[unsafe(method(new))]
189 #[unsafe(method_family = new)]
190 pub unsafe fn new() -> Retained<Self>;
191 );
192}
193
194#[repr(transparent)]
197#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
198pub struct SCNBillboardAxis(pub NSUInteger);
199bitflags::bitflags! {
200 impl SCNBillboardAxis: NSUInteger {
201 #[doc(alias = "SCNBillboardAxisX")]
202 const X = 0x1<<0;
203 #[doc(alias = "SCNBillboardAxisY")]
204 const Y = 0x1<<1;
205 #[doc(alias = "SCNBillboardAxisZ")]
206 const Z = 0x1<<2;
207 #[doc(alias = "SCNBillboardAxisAll")]
208 const All = SCNBillboardAxis::X.0|SCNBillboardAxis::Y.0|SCNBillboardAxis::Z.0;
209 }
210}
211
212unsafe impl Encode for SCNBillboardAxis {
213 const ENCODING: Encoding = NSUInteger::ENCODING;
214}
215
216unsafe impl RefEncode for SCNBillboardAxis {
217 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
218}
219
220extern_class!(
221 #[unsafe(super(SCNConstraint, NSObject))]
223 #[derive(Debug, PartialEq, Eq, Hash)]
224 pub struct SCNBillboardConstraint;
225);
226
227unsafe impl NSCoding for SCNBillboardConstraint {}
228
229unsafe impl NSCopying for SCNBillboardConstraint {}
230
231unsafe impl CopyingHelper for SCNBillboardConstraint {
232 type Result = Self;
233}
234
235unsafe impl NSObjectProtocol for SCNBillboardConstraint {}
236
237unsafe impl NSSecureCoding for SCNBillboardConstraint {}
238
239#[cfg(feature = "SCNAnimation")]
240unsafe impl SCNAnimatable for SCNBillboardConstraint {}
241
242impl SCNBillboardConstraint {
243 extern_methods!(
244 #[unsafe(method(billboardConstraint))]
248 #[unsafe(method_family = none)]
249 pub unsafe fn billboardConstraint() -> Retained<Self>;
250
251 #[unsafe(method(freeAxes))]
253 #[unsafe(method_family = none)]
254 pub unsafe fn freeAxes(&self) -> SCNBillboardAxis;
255
256 #[unsafe(method(setFreeAxes:))]
258 #[unsafe(method_family = none)]
259 pub unsafe fn setFreeAxes(&self, free_axes: SCNBillboardAxis);
260 );
261}
262
263impl SCNBillboardConstraint {
265 extern_methods!(
266 #[unsafe(method(init))]
267 #[unsafe(method_family = init)]
268 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
269
270 #[unsafe(method(new))]
271 #[unsafe(method_family = new)]
272 pub unsafe fn new() -> Retained<Self>;
273 );
274}
275
276extern_class!(
277 #[unsafe(super(SCNConstraint, NSObject))]
281 #[derive(Debug, PartialEq, Eq, Hash)]
282 pub struct SCNTransformConstraint;
283);
284
285unsafe impl NSCoding for SCNTransformConstraint {}
286
287unsafe impl NSCopying for SCNTransformConstraint {}
288
289unsafe impl CopyingHelper for SCNTransformConstraint {
290 type Result = Self;
291}
292
293unsafe impl NSObjectProtocol for SCNTransformConstraint {}
294
295unsafe impl NSSecureCoding for SCNTransformConstraint {}
296
297#[cfg(feature = "SCNAnimation")]
298unsafe impl SCNAnimatable for SCNTransformConstraint {}
299
300impl SCNTransformConstraint {
301 extern_methods!(
302 #[cfg(all(
303 feature = "SCNNode",
304 feature = "SceneKitTypes",
305 feature = "block2",
306 feature = "objc2-quartz-core"
307 ))]
308 #[cfg(not(target_os = "watchos"))]
309 #[unsafe(method(transformConstraintInWorldSpace:withBlock:))]
317 #[unsafe(method_family = none)]
318 pub unsafe fn transformConstraintInWorldSpace_withBlock(
319 world: bool,
320 block: &block2::Block<dyn Fn(NonNull<SCNNode>, SCNMatrix4) -> SCNMatrix4>,
321 ) -> Retained<Self>;
322
323 #[cfg(all(
324 feature = "SCNNode",
325 feature = "SceneKitTypes",
326 feature = "block2",
327 feature = "objc2-core-foundation"
328 ))]
329 #[unsafe(method(positionConstraintInWorldSpace:withBlock:))]
337 #[unsafe(method_family = none)]
338 pub unsafe fn positionConstraintInWorldSpace_withBlock(
339 world: bool,
340 block: &block2::Block<dyn Fn(NonNull<SCNNode>, SCNVector3) -> SCNVector3>,
341 ) -> Retained<Self>;
342
343 #[cfg(all(
344 feature = "SCNNode",
345 feature = "SceneKitTypes",
346 feature = "block2",
347 feature = "objc2-core-foundation"
348 ))]
349 #[unsafe(method(orientationConstraintInWorldSpace:withBlock:))]
357 #[unsafe(method_family = none)]
358 pub unsafe fn orientationConstraintInWorldSpace_withBlock(
359 world: bool,
360 block: &block2::Block<dyn Fn(NonNull<SCNNode>, SCNQuaternion) -> SCNQuaternion>,
361 ) -> Retained<Self>;
362 );
363}
364
365impl SCNTransformConstraint {
367 extern_methods!(
368 #[unsafe(method(init))]
369 #[unsafe(method_family = init)]
370 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
371
372 #[unsafe(method(new))]
373 #[unsafe(method_family = new)]
374 pub unsafe fn new() -> Retained<Self>;
375 );
376}
377
378extern_class!(
379 #[unsafe(super(SCNConstraint, NSObject))]
383 #[derive(Debug, PartialEq, Eq, Hash)]
384 pub struct SCNIKConstraint;
385);
386
387unsafe impl NSCoding for SCNIKConstraint {}
388
389unsafe impl NSCopying for SCNIKConstraint {}
390
391unsafe impl CopyingHelper for SCNIKConstraint {
392 type Result = Self;
393}
394
395unsafe impl NSObjectProtocol for SCNIKConstraint {}
396
397unsafe impl NSSecureCoding for SCNIKConstraint {}
398
399#[cfg(feature = "SCNAnimation")]
400unsafe impl SCNAnimatable for SCNIKConstraint {}
401
402impl SCNIKConstraint {
403 extern_methods!(
404 #[cfg(feature = "SCNNode")]
405 #[unsafe(method(initWithChainRootNode:))]
411 #[unsafe(method_family = init)]
412 pub unsafe fn initWithChainRootNode(
413 this: Allocated<Self>,
414 chain_root_node: &SCNNode,
415 ) -> Retained<Self>;
416
417 #[cfg(feature = "SCNNode")]
418 #[unsafe(method(inverseKinematicsConstraintWithChainRootNode:))]
424 #[unsafe(method_family = none)]
425 pub unsafe fn inverseKinematicsConstraintWithChainRootNode(
426 chain_root_node: &SCNNode,
427 ) -> Retained<Self>;
428
429 #[cfg(feature = "SCNNode")]
430 #[unsafe(method(chainRootNode))]
432 #[unsafe(method_family = none)]
433 pub unsafe fn chainRootNode(&self) -> Retained<SCNNode>;
434
435 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
436 #[unsafe(method(targetPosition))]
438 #[unsafe(method_family = none)]
439 pub unsafe fn targetPosition(&self) -> SCNVector3;
440
441 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
442 #[unsafe(method(setTargetPosition:))]
444 #[unsafe(method_family = none)]
445 pub unsafe fn setTargetPosition(&self, target_position: SCNVector3);
446
447 #[cfg(all(feature = "SCNNode", feature = "objc2-core-foundation"))]
448 #[unsafe(method(setMaxAllowedRotationAngle:forJoint:))]
450 #[unsafe(method_family = none)]
451 pub unsafe fn setMaxAllowedRotationAngle_forJoint(&self, angle: CGFloat, node: &SCNNode);
452
453 #[cfg(all(feature = "SCNNode", feature = "objc2-core-foundation"))]
454 #[unsafe(method(maxAllowedRotationAngleForJoint:))]
455 #[unsafe(method_family = none)]
456 pub unsafe fn maxAllowedRotationAngleForJoint(&self, node: &SCNNode) -> CGFloat;
457 );
458}
459
460impl SCNIKConstraint {
462 extern_methods!(
463 #[unsafe(method(init))]
464 #[unsafe(method_family = init)]
465 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
466
467 #[unsafe(method(new))]
468 #[unsafe(method_family = new)]
469 pub unsafe fn new() -> Retained<Self>;
470 );
471}
472
473extern_class!(
474 #[unsafe(super(SCNConstraint, NSObject))]
478 #[derive(Debug, PartialEq, Eq, Hash)]
479 pub struct SCNDistanceConstraint;
480);
481
482unsafe impl NSCoding for SCNDistanceConstraint {}
483
484unsafe impl NSCopying for SCNDistanceConstraint {}
485
486unsafe impl CopyingHelper for SCNDistanceConstraint {
487 type Result = Self;
488}
489
490unsafe impl NSObjectProtocol for SCNDistanceConstraint {}
491
492unsafe impl NSSecureCoding for SCNDistanceConstraint {}
493
494#[cfg(feature = "SCNAnimation")]
495unsafe impl SCNAnimatable for SCNDistanceConstraint {}
496
497impl SCNDistanceConstraint {
498 extern_methods!(
499 #[cfg(feature = "SCNNode")]
500 #[unsafe(method(distanceConstraintWithTarget:))]
502 #[unsafe(method_family = none)]
503 pub unsafe fn distanceConstraintWithTarget(target: Option<&SCNNode>) -> Retained<Self>;
504
505 #[cfg(feature = "SCNNode")]
506 #[unsafe(method(target))]
508 #[unsafe(method_family = none)]
509 pub unsafe fn target(&self) -> Option<Retained<SCNNode>>;
510
511 #[cfg(feature = "SCNNode")]
512 #[unsafe(method(setTarget:))]
514 #[unsafe(method_family = none)]
515 pub unsafe fn setTarget(&self, target: Option<&SCNNode>);
516
517 #[cfg(feature = "objc2-core-foundation")]
518 #[unsafe(method(minimumDistance))]
520 #[unsafe(method_family = none)]
521 pub unsafe fn minimumDistance(&self) -> CGFloat;
522
523 #[cfg(feature = "objc2-core-foundation")]
524 #[unsafe(method(setMinimumDistance:))]
526 #[unsafe(method_family = none)]
527 pub unsafe fn setMinimumDistance(&self, minimum_distance: CGFloat);
528
529 #[cfg(feature = "objc2-core-foundation")]
530 #[unsafe(method(maximumDistance))]
532 #[unsafe(method_family = none)]
533 pub unsafe fn maximumDistance(&self) -> CGFloat;
534
535 #[cfg(feature = "objc2-core-foundation")]
536 #[unsafe(method(setMaximumDistance:))]
538 #[unsafe(method_family = none)]
539 pub unsafe fn setMaximumDistance(&self, maximum_distance: CGFloat);
540 );
541}
542
543impl SCNDistanceConstraint {
545 extern_methods!(
546 #[unsafe(method(init))]
547 #[unsafe(method_family = init)]
548 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
549
550 #[unsafe(method(new))]
551 #[unsafe(method_family = new)]
552 pub unsafe fn new() -> Retained<Self>;
553 );
554}
555
556extern_class!(
557 #[unsafe(super(SCNConstraint, NSObject))]
561 #[derive(Debug, PartialEq, Eq, Hash)]
562 pub struct SCNReplicatorConstraint;
563);
564
565unsafe impl NSCoding for SCNReplicatorConstraint {}
566
567unsafe impl NSCopying for SCNReplicatorConstraint {}
568
569unsafe impl CopyingHelper for SCNReplicatorConstraint {
570 type Result = Self;
571}
572
573unsafe impl NSObjectProtocol for SCNReplicatorConstraint {}
574
575unsafe impl NSSecureCoding for SCNReplicatorConstraint {}
576
577#[cfg(feature = "SCNAnimation")]
578unsafe impl SCNAnimatable for SCNReplicatorConstraint {}
579
580impl SCNReplicatorConstraint {
581 extern_methods!(
582 #[cfg(feature = "SCNNode")]
583 #[unsafe(method(replicatorConstraintWithTarget:))]
585 #[unsafe(method_family = none)]
586 pub unsafe fn replicatorConstraintWithTarget(target: Option<&SCNNode>) -> Retained<Self>;
587
588 #[cfg(feature = "SCNNode")]
589 #[unsafe(method(target))]
591 #[unsafe(method_family = none)]
592 pub unsafe fn target(&self) -> Option<Retained<SCNNode>>;
593
594 #[cfg(feature = "SCNNode")]
595 #[unsafe(method(setTarget:))]
597 #[unsafe(method_family = none)]
598 pub unsafe fn setTarget(&self, target: Option<&SCNNode>);
599
600 #[unsafe(method(replicatesOrientation))]
602 #[unsafe(method_family = none)]
603 pub unsafe fn replicatesOrientation(&self) -> bool;
604
605 #[unsafe(method(setReplicatesOrientation:))]
607 #[unsafe(method_family = none)]
608 pub unsafe fn setReplicatesOrientation(&self, replicates_orientation: bool);
609
610 #[unsafe(method(replicatesPosition))]
612 #[unsafe(method_family = none)]
613 pub unsafe fn replicatesPosition(&self) -> bool;
614
615 #[unsafe(method(setReplicatesPosition:))]
617 #[unsafe(method_family = none)]
618 pub unsafe fn setReplicatesPosition(&self, replicates_position: bool);
619
620 #[unsafe(method(replicatesScale))]
622 #[unsafe(method_family = none)]
623 pub unsafe fn replicatesScale(&self) -> bool;
624
625 #[unsafe(method(setReplicatesScale:))]
627 #[unsafe(method_family = none)]
628 pub unsafe fn setReplicatesScale(&self, replicates_scale: bool);
629
630 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
631 #[unsafe(method(orientationOffset))]
633 #[unsafe(method_family = none)]
634 pub unsafe fn orientationOffset(&self) -> SCNQuaternion;
635
636 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
637 #[unsafe(method(setOrientationOffset:))]
639 #[unsafe(method_family = none)]
640 pub unsafe fn setOrientationOffset(&self, orientation_offset: SCNQuaternion);
641
642 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
643 #[unsafe(method(positionOffset))]
645 #[unsafe(method_family = none)]
646 pub unsafe fn positionOffset(&self) -> SCNVector3;
647
648 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
649 #[unsafe(method(setPositionOffset:))]
651 #[unsafe(method_family = none)]
652 pub unsafe fn setPositionOffset(&self, position_offset: SCNVector3);
653
654 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
655 #[unsafe(method(scaleOffset))]
657 #[unsafe(method_family = none)]
658 pub unsafe fn scaleOffset(&self) -> SCNVector3;
659
660 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
661 #[unsafe(method(setScaleOffset:))]
663 #[unsafe(method_family = none)]
664 pub unsafe fn setScaleOffset(&self, scale_offset: SCNVector3);
665 );
666}
667
668impl SCNReplicatorConstraint {
670 extern_methods!(
671 #[unsafe(method(init))]
672 #[unsafe(method_family = init)]
673 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
674
675 #[unsafe(method(new))]
676 #[unsafe(method_family = new)]
677 pub unsafe fn new() -> Retained<Self>;
678 );
679}
680
681extern_class!(
682 #[unsafe(super(SCNConstraint, NSObject))]
686 #[derive(Debug, PartialEq, Eq, Hash)]
687 pub struct SCNAccelerationConstraint;
688);
689
690unsafe impl NSCoding for SCNAccelerationConstraint {}
691
692unsafe impl NSCopying for SCNAccelerationConstraint {}
693
694unsafe impl CopyingHelper for SCNAccelerationConstraint {
695 type Result = Self;
696}
697
698unsafe impl NSObjectProtocol for SCNAccelerationConstraint {}
699
700unsafe impl NSSecureCoding for SCNAccelerationConstraint {}
701
702#[cfg(feature = "SCNAnimation")]
703unsafe impl SCNAnimatable for SCNAccelerationConstraint {}
704
705impl SCNAccelerationConstraint {
706 extern_methods!(
707 #[unsafe(method(accelerationConstraint))]
709 #[unsafe(method_family = none)]
710 pub unsafe fn accelerationConstraint() -> Retained<Self>;
711
712 #[cfg(feature = "objc2-core-foundation")]
713 #[unsafe(method(maximumLinearAcceleration))]
717 #[unsafe(method_family = none)]
718 pub unsafe fn maximumLinearAcceleration(&self) -> CGFloat;
719
720 #[cfg(feature = "objc2-core-foundation")]
721 #[unsafe(method(setMaximumLinearAcceleration:))]
723 #[unsafe(method_family = none)]
724 pub unsafe fn setMaximumLinearAcceleration(&self, maximum_linear_acceleration: CGFloat);
725
726 #[cfg(feature = "objc2-core-foundation")]
727 #[unsafe(method(maximumLinearVelocity))]
731 #[unsafe(method_family = none)]
732 pub unsafe fn maximumLinearVelocity(&self) -> CGFloat;
733
734 #[cfg(feature = "objc2-core-foundation")]
735 #[unsafe(method(setMaximumLinearVelocity:))]
737 #[unsafe(method_family = none)]
738 pub unsafe fn setMaximumLinearVelocity(&self, maximum_linear_velocity: CGFloat);
739
740 #[cfg(feature = "objc2-core-foundation")]
741 #[unsafe(method(decelerationDistance))]
743 #[unsafe(method_family = none)]
744 pub unsafe fn decelerationDistance(&self) -> CGFloat;
745
746 #[cfg(feature = "objc2-core-foundation")]
747 #[unsafe(method(setDecelerationDistance:))]
749 #[unsafe(method_family = none)]
750 pub unsafe fn setDecelerationDistance(&self, deceleration_distance: CGFloat);
751
752 #[cfg(feature = "objc2-core-foundation")]
753 #[unsafe(method(damping))]
755 #[unsafe(method_family = none)]
756 pub unsafe fn damping(&self) -> CGFloat;
757
758 #[cfg(feature = "objc2-core-foundation")]
759 #[unsafe(method(setDamping:))]
761 #[unsafe(method_family = none)]
762 pub unsafe fn setDamping(&self, damping: CGFloat);
763 );
764}
765
766impl SCNAccelerationConstraint {
768 extern_methods!(
769 #[unsafe(method(init))]
770 #[unsafe(method_family = init)]
771 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
772
773 #[unsafe(method(new))]
774 #[unsafe(method_family = new)]
775 pub unsafe fn new() -> Retained<Self>;
776 );
777}
778
779extern_class!(
780 #[unsafe(super(SCNConstraint, NSObject))]
784 #[derive(Debug, PartialEq, Eq, Hash)]
785 pub struct SCNSliderConstraint;
786);
787
788unsafe impl NSCoding for SCNSliderConstraint {}
789
790unsafe impl NSCopying for SCNSliderConstraint {}
791
792unsafe impl CopyingHelper for SCNSliderConstraint {
793 type Result = Self;
794}
795
796unsafe impl NSObjectProtocol for SCNSliderConstraint {}
797
798unsafe impl NSSecureCoding for SCNSliderConstraint {}
799
800#[cfg(feature = "SCNAnimation")]
801unsafe impl SCNAnimatable for SCNSliderConstraint {}
802
803impl SCNSliderConstraint {
804 extern_methods!(
805 #[unsafe(method(sliderConstraint))]
807 #[unsafe(method_family = none)]
808 pub unsafe fn sliderConstraint() -> Retained<Self>;
809
810 #[unsafe(method(collisionCategoryBitMask))]
812 #[unsafe(method_family = none)]
813 pub unsafe fn collisionCategoryBitMask(&self) -> NSUInteger;
814
815 #[unsafe(method(setCollisionCategoryBitMask:))]
817 #[unsafe(method_family = none)]
818 pub unsafe fn setCollisionCategoryBitMask(&self, collision_category_bit_mask: NSUInteger);
819
820 #[cfg(feature = "objc2-core-foundation")]
821 #[unsafe(method(radius))]
823 #[unsafe(method_family = none)]
824 pub unsafe fn radius(&self) -> CGFloat;
825
826 #[cfg(feature = "objc2-core-foundation")]
827 #[unsafe(method(setRadius:))]
829 #[unsafe(method_family = none)]
830 pub unsafe fn setRadius(&self, radius: CGFloat);
831
832 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
833 #[unsafe(method(offset))]
835 #[unsafe(method_family = none)]
836 pub unsafe fn offset(&self) -> SCNVector3;
837
838 #[cfg(all(feature = "SceneKitTypes", feature = "objc2-core-foundation"))]
839 #[unsafe(method(setOffset:))]
841 #[unsafe(method_family = none)]
842 pub unsafe fn setOffset(&self, offset: SCNVector3);
843 );
844}
845
846impl SCNSliderConstraint {
848 extern_methods!(
849 #[unsafe(method(init))]
850 #[unsafe(method_family = init)]
851 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
852
853 #[unsafe(method(new))]
854 #[unsafe(method_family = new)]
855 pub unsafe fn new() -> Retained<Self>;
856 );
857}
858
859extern_protocol!(
860 pub unsafe trait SCNAvoidOccluderConstraintDelegate: NSObjectProtocol {
862 #[cfg(feature = "SCNNode")]
863 #[optional]
864 #[unsafe(method(avoidOccluderConstraint:shouldAvoidOccluder:forNode:))]
865 #[unsafe(method_family = none)]
866 unsafe fn avoidOccluderConstraint_shouldAvoidOccluder_forNode(
867 &self,
868 constraint: &SCNAvoidOccluderConstraint,
869 occluder: &SCNNode,
870 node: &SCNNode,
871 ) -> bool;
872
873 #[cfg(feature = "SCNNode")]
874 #[optional]
875 #[unsafe(method(avoidOccluderConstraint:didAvoidOccluder:forNode:))]
876 #[unsafe(method_family = none)]
877 unsafe fn avoidOccluderConstraint_didAvoidOccluder_forNode(
878 &self,
879 constraint: &SCNAvoidOccluderConstraint,
880 occluder: &SCNNode,
881 node: &SCNNode,
882 );
883 }
884);
885
886extern_class!(
887 #[unsafe(super(SCNConstraint, NSObject))]
893 #[derive(Debug, PartialEq, Eq, Hash)]
894 pub struct SCNAvoidOccluderConstraint;
895);
896
897unsafe impl NSCoding for SCNAvoidOccluderConstraint {}
898
899unsafe impl NSCopying for SCNAvoidOccluderConstraint {}
900
901unsafe impl CopyingHelper for SCNAvoidOccluderConstraint {
902 type Result = Self;
903}
904
905unsafe impl NSObjectProtocol for SCNAvoidOccluderConstraint {}
906
907unsafe impl NSSecureCoding for SCNAvoidOccluderConstraint {}
908
909#[cfg(feature = "SCNAnimation")]
910unsafe impl SCNAnimatable for SCNAvoidOccluderConstraint {}
911
912impl SCNAvoidOccluderConstraint {
913 extern_methods!(
914 #[cfg(feature = "SCNNode")]
915 #[unsafe(method(avoidOccluderConstraintWithTarget:))]
917 #[unsafe(method_family = none)]
918 pub unsafe fn avoidOccluderConstraintWithTarget(target: Option<&SCNNode>)
919 -> Retained<Self>;
920
921 #[unsafe(method(delegate))]
923 #[unsafe(method_family = none)]
924 pub unsafe fn delegate(
925 &self,
926 ) -> Retained<ProtocolObject<dyn SCNAvoidOccluderConstraintDelegate>>;
927
928 #[unsafe(method(setDelegate:))]
930 #[unsafe(method_family = none)]
931 pub unsafe fn setDelegate(
932 &self,
933 delegate: &ProtocolObject<dyn SCNAvoidOccluderConstraintDelegate>,
934 );
935
936 #[cfg(feature = "SCNNode")]
937 #[unsafe(method(target))]
939 #[unsafe(method_family = none)]
940 pub unsafe fn target(&self) -> Option<Retained<SCNNode>>;
941
942 #[cfg(feature = "SCNNode")]
943 #[unsafe(method(setTarget:))]
945 #[unsafe(method_family = none)]
946 pub unsafe fn setTarget(&self, target: Option<&SCNNode>);
947
948 #[unsafe(method(occluderCategoryBitMask))]
950 #[unsafe(method_family = none)]
951 pub unsafe fn occluderCategoryBitMask(&self) -> NSUInteger;
952
953 #[unsafe(method(setOccluderCategoryBitMask:))]
955 #[unsafe(method_family = none)]
956 pub unsafe fn setOccluderCategoryBitMask(&self, occluder_category_bit_mask: NSUInteger);
957
958 #[cfg(feature = "objc2-core-foundation")]
959 #[unsafe(method(bias))]
963 #[unsafe(method_family = none)]
964 pub unsafe fn bias(&self) -> CGFloat;
965
966 #[cfg(feature = "objc2-core-foundation")]
967 #[unsafe(method(setBias:))]
969 #[unsafe(method_family = none)]
970 pub unsafe fn setBias(&self, bias: CGFloat);
971 );
972}
973
974impl SCNAvoidOccluderConstraint {
976 extern_methods!(
977 #[unsafe(method(init))]
978 #[unsafe(method_family = init)]
979 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
980
981 #[unsafe(method(new))]
982 #[unsafe(method_family = new)]
983 pub unsafe fn new() -> Retained<Self>;
984 );
985}