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
41extern_conformance!(
42 unsafe impl NSCoding for SCNMorpher {}
43);
44
45extern_conformance!(
46 unsafe impl NSObjectProtocol for SCNMorpher {}
47);
48
49extern_conformance!(
50 unsafe impl NSSecureCoding for SCNMorpher {}
51);
52
53#[cfg(feature = "SCNAnimation")]
54extern_conformance!(
55 unsafe impl SCNAnimatable for SCNMorpher {}
56);
57
58impl SCNMorpher {
59 extern_methods!(
60 #[cfg(feature = "SCNGeometry")]
61 #[unsafe(method(targets))]
65 #[unsafe(method_family = none)]
66 pub unsafe fn targets(&self) -> Retained<NSArray<SCNGeometry>>;
67
68 #[cfg(feature = "SCNGeometry")]
69 #[unsafe(method(setTargets:))]
73 #[unsafe(method_family = none)]
74 pub unsafe fn setTargets(&self, targets: &NSArray<SCNGeometry>);
75
76 #[unsafe(method(weights))]
78 #[unsafe(method_family = none)]
79 pub unsafe fn weights(&self) -> Retained<NSArray<NSNumber>>;
80
81 #[unsafe(method(setWeights:))]
83 #[unsafe(method_family = none)]
84 pub unsafe fn setWeights(&self, weights: &NSArray<NSNumber>);
85
86 #[cfg(feature = "objc2-core-foundation")]
87 #[unsafe(method(setWeight:forTargetAtIndex:))]
89 #[unsafe(method_family = none)]
90 pub unsafe fn setWeight_forTargetAtIndex(&self, weight: CGFloat, target_index: NSUInteger);
91
92 #[cfg(feature = "objc2-core-foundation")]
93 #[unsafe(method(weightForTargetAtIndex:))]
95 #[unsafe(method_family = none)]
96 pub unsafe fn weightForTargetAtIndex(&self, target_index: NSUInteger) -> CGFloat;
97
98 #[cfg(feature = "objc2-core-foundation")]
99 #[unsafe(method(setWeight:forTargetNamed:))]
101 #[unsafe(method_family = none)]
102 pub unsafe fn setWeight_forTargetNamed(&self, weight: CGFloat, target_name: &NSString);
103
104 #[cfg(feature = "objc2-core-foundation")]
105 #[unsafe(method(weightForTargetNamed:))]
107 #[unsafe(method_family = none)]
108 pub unsafe fn weightForTargetNamed(&self, target_name: &NSString) -> CGFloat;
109
110 #[unsafe(method(calculationMode))]
112 #[unsafe(method_family = none)]
113 pub unsafe fn calculationMode(&self) -> SCNMorpherCalculationMode;
114
115 #[unsafe(method(setCalculationMode:))]
117 #[unsafe(method_family = none)]
118 pub unsafe fn setCalculationMode(&self, calculation_mode: SCNMorpherCalculationMode);
119
120 #[unsafe(method(unifiesNormals))]
122 #[unsafe(method_family = none)]
123 pub unsafe fn unifiesNormals(&self) -> bool;
124
125 #[unsafe(method(setUnifiesNormals:))]
127 #[unsafe(method_family = none)]
128 pub unsafe fn setUnifiesNormals(&self, unifies_normals: bool);
129 );
130}
131
132impl SCNMorpher {
134 extern_methods!(
135 #[unsafe(method(init))]
136 #[unsafe(method_family = init)]
137 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
138
139 #[unsafe(method(new))]
140 #[unsafe(method_family = new)]
141 pub unsafe fn new() -> Retained<Self>;
142 );
143}