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:))]
71 #[unsafe(method_family = none)]
72 pub unsafe fn setTargets(&self, targets: &NSArray<SCNGeometry>);
73
74 #[unsafe(method(weights))]
76 #[unsafe(method_family = none)]
77 pub unsafe fn weights(&self) -> Retained<NSArray<NSNumber>>;
78
79 #[unsafe(method(setWeights:))]
81 #[unsafe(method_family = none)]
82 pub unsafe fn setWeights(&self, weights: &NSArray<NSNumber>);
83
84 #[cfg(feature = "objc2-core-foundation")]
85 #[unsafe(method(setWeight:forTargetAtIndex:))]
87 #[unsafe(method_family = none)]
88 pub unsafe fn setWeight_forTargetAtIndex(&self, weight: CGFloat, target_index: NSUInteger);
89
90 #[cfg(feature = "objc2-core-foundation")]
91 #[unsafe(method(weightForTargetAtIndex:))]
93 #[unsafe(method_family = none)]
94 pub unsafe fn weightForTargetAtIndex(&self, target_index: NSUInteger) -> CGFloat;
95
96 #[cfg(feature = "objc2-core-foundation")]
97 #[unsafe(method(setWeight:forTargetNamed:))]
99 #[unsafe(method_family = none)]
100 pub unsafe fn setWeight_forTargetNamed(&self, weight: CGFloat, target_name: &NSString);
101
102 #[cfg(feature = "objc2-core-foundation")]
103 #[unsafe(method(weightForTargetNamed:))]
105 #[unsafe(method_family = none)]
106 pub unsafe fn weightForTargetNamed(&self, target_name: &NSString) -> CGFloat;
107
108 #[unsafe(method(calculationMode))]
110 #[unsafe(method_family = none)]
111 pub unsafe fn calculationMode(&self) -> SCNMorpherCalculationMode;
112
113 #[unsafe(method(setCalculationMode:))]
115 #[unsafe(method_family = none)]
116 pub unsafe fn setCalculationMode(&self, calculation_mode: SCNMorpherCalculationMode);
117
118 #[unsafe(method(unifiesNormals))]
120 #[unsafe(method_family = none)]
121 pub unsafe fn unifiesNormals(&self) -> bool;
122
123 #[unsafe(method(setUnifiesNormals:))]
125 #[unsafe(method_family = none)]
126 pub unsafe fn setUnifiesNormals(&self, unifies_normals: bool);
127 );
128}
129
130impl SCNMorpher {
132 extern_methods!(
133 #[unsafe(method(init))]
134 #[unsafe(method_family = init)]
135 pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
136
137 #[unsafe(method(new))]
138 #[unsafe(method_family = new)]
139 pub unsafe fn new() -> Retained<Self>;
140 );
141}