objc2_scene_kit/generated/
SCNMorpher.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
12#[repr(transparent)]
15#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
16pub struct SCNMorpherCalculationMode(pub NSInteger);
17impl SCNMorpherCalculationMode {
18 #[doc(alias = "SCNMorpherCalculationModeNormalized")]
19 pub const Normalized: Self = Self(0);
20 #[doc(alias = "SCNMorpherCalculationModeAdditive")]
21 pub const Additive: Self = Self(1);
22}
23
24unsafe impl Encode for SCNMorpherCalculationMode {
25 const ENCODING: Encoding = NSInteger::ENCODING;
26}
27
28unsafe impl RefEncode for SCNMorpherCalculationMode {
29 const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
30}
31
32extern_class!(
33 #[unsafe(super(NSObject))]
37 #[derive(Debug, PartialEq, Eq, Hash)]
38 pub struct SCNMorpher;
39);
40
41unsafe impl NSCoding for SCNMorpher {}
42
43unsafe impl NSObjectProtocol for SCNMorpher {}
44
45unsafe impl NSSecureCoding for SCNMorpher {}
46
47#[cfg(feature = "SCNAnimation")]
48unsafe impl SCNAnimatable for SCNMorpher {}
49
50impl SCNMorpher {
51 extern_methods!(
52 #[cfg(feature = "SCNGeometry")]
53 #[unsafe(method(targets))]
57 #[unsafe(method_family = none)]
58 pub unsafe fn targets(&self) -> Retained<NSArray<SCNGeometry>>;
59
60 #[cfg(feature = "SCNGeometry")]
61 #[unsafe(method(setTargets:))]
63 #[unsafe(method_family = none)]
64 pub unsafe fn setTargets(&self, targets: &NSArray<SCNGeometry>);
65
66 #[unsafe(method(weights))]
68 #[unsafe(method_family = none)]
69 pub unsafe fn weights(&self) -> Retained<NSArray<NSNumber>>;
70
71 #[unsafe(method(setWeights:))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn setWeights(&self, weights: &NSArray<NSNumber>);
75
76 #[cfg(feature = "objc2-core-foundation")]
77 #[unsafe(method(setWeight:forTargetAtIndex:))]
79 #[unsafe(method_family = none)]
80 pub unsafe fn setWeight_forTargetAtIndex(&self, weight: CGFloat, target_index: NSUInteger);
81
82 #[cfg(feature = "objc2-core-foundation")]
83 #[unsafe(method(weightForTargetAtIndex:))]
85 #[unsafe(method_family = none)]
86 pub unsafe fn weightForTargetAtIndex(&self, target_index: NSUInteger) -> CGFloat;
87
88 #[cfg(feature = "objc2-core-foundation")]
89 #[unsafe(method(setWeight:forTargetNamed:))]
91 #[unsafe(method_family = none)]
92 pub unsafe fn setWeight_forTargetNamed(&self, weight: CGFloat, target_name: &NSString);
93
94 #[cfg(feature = "objc2-core-foundation")]
95 #[unsafe(method(weightForTargetNamed:))]
97 #[unsafe(method_family = none)]
98 pub unsafe fn weightForTargetNamed(&self, target_name: &NSString) -> CGFloat;
99
100 #[unsafe(method(calculationMode))]
102 #[unsafe(method_family = none)]
103 pub unsafe fn calculationMode(&self) -> SCNMorpherCalculationMode;
104
105 #[unsafe(method(setCalculationMode:))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn setCalculationMode(&self, calculation_mode: SCNMorpherCalculationMode);
109
110 #[unsafe(method(unifiesNormals))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn unifiesNormals(&self) -> bool;
114
115 #[unsafe(method(setUnifiesNormals:))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn setUnifiesNormals(&self, unifies_normals: bool);
119 );
120}
121
122impl SCNMorpher {
124 extern_methods!(
125 #[unsafe(method(init))]
126 #[unsafe(method_family = init)]
127 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
128
129 #[unsafe(method(new))]
130 #[unsafe(method_family = new)]
131 pub unsafe fn new() -> Retained<Self>;
132 );
133}