1use super::class_requires::*;
2use super::*;
3#[allow(non_upper_case_globals, non_snake_case)]
10#[cfg_attr(feature = "json_schema", derive(schemars::JsonSchema))]
11#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
12#[derive(educe::Educe)]
13#[educe(Debug, Clone, Default, PartialEq)]
14pub struct hkbComputeRotationFromAxisAngleModifierInternalState {
15 #[cfg_attr(
22 feature = "serde",
23 serde(skip_serializing_if = "Option::is_none", default)
24 )]
25 pub __ptr: Option<Pointer>,
26 #[cfg_attr(feature = "json_schema", schemars(flatten))]
28 #[cfg_attr(feature = "serde", serde(flatten))]
29 pub parent: hkReferencedObject,
30 #[cfg_attr(feature = "json_schema", schemars(rename = "rotationOut"))]
35 #[cfg_attr(feature = "serde", serde(rename = "rotationOut"))]
36 pub m_rotationOut: Quaternion,
37}
38const _: () = {
39 use havok_serde as _serde;
40 impl _serde::HavokClass for hkbComputeRotationFromAxisAngleModifierInternalState {
41 #[inline]
42 fn name(&self) -> &'static str {
43 "hkbComputeRotationFromAxisAngleModifierInternalState"
44 }
45 #[inline]
46 fn signature(&self) -> _serde::__private::Signature {
47 _serde::__private::Signature::new(0x71cd1eb0)
48 }
49 #[allow(clippy::let_and_return, clippy::vec_init_then_push)]
50 fn deps_indexes(&self) -> Vec<usize> {
51 let mut v = Vec::new();
52 v
53 }
54 }
55 impl _serde::Serialize for hkbComputeRotationFromAxisAngleModifierInternalState {
56 fn serialize<S>(&self, __serializer: S) -> Result<S::Ok, S::Error>
57 where
58 S: _serde::ser::Serializer,
59 {
60 let class_meta = self
61 .__ptr
62 .map(|name| (name, _serde::__private::Signature::new(0x71cd1eb0)));
63 let mut serializer = __serializer
64 .serialize_struct(
65 "hkbComputeRotationFromAxisAngleModifierInternalState",
66 class_meta,
67 (32u64, 32u64),
68 )?;
69 serializer.pad_field([0u8; 4usize].as_slice(), [0u8; 8usize].as_slice())?;
70 serializer.skip_field("memSizeAndFlags", &self.parent.m_memSizeAndFlags)?;
71 serializer.skip_field("referenceCount", &self.parent.m_referenceCount)?;
72 serializer.pad_field([0u8; 0usize].as_slice(), [0u8; 4usize].as_slice())?;
73 serializer.pad_field([0u8; 8usize].as_slice(), [0u8; 0usize].as_slice())?;
74 serializer.serialize_field("rotationOut", &self.m_rotationOut)?;
75 serializer.end()
76 }
77 }
78};
79#[doc(hidden)]
80#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
81const _: () = {
82 use havok_serde as _serde;
83 #[automatically_derived]
84 impl<'de> _serde::Deserialize<'de>
85 for hkbComputeRotationFromAxisAngleModifierInternalState {
86 fn deserialize<__D>(deserializer: __D) -> core::result::Result<Self, __D::Error>
87 where
88 __D: _serde::Deserializer<'de>,
89 {
90 #[allow(non_camel_case_types)]
91 enum __Field {
92 m_rotationOut,
93 __ignore,
94 }
95 struct __FieldVisitor;
96 impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
97 type Value = __Field;
98 fn expecting(
99 &self,
100 __formatter: &mut core::fmt::Formatter,
101 ) -> core::fmt::Result {
102 core::fmt::Formatter::write_str(__formatter, "field identifier")
103 }
104 #[allow(clippy::match_single_binding)]
106 #[allow(clippy::reversed_empty_ranges)]
107 #[allow(clippy::single_match)]
108 fn visit_key<__E>(
109 self,
110 __value: &str,
111 ) -> core::result::Result<Self::Value, __E>
112 where
113 __E: _serde::de::Error,
114 {
115 match __value {
116 "rotationOut" => Ok(__Field::m_rotationOut),
117 _ => Ok(__Field::__ignore),
118 }
119 }
120 }
121 impl<'de> _serde::Deserialize<'de> for __Field {
122 #[inline]
123 fn deserialize<__D>(
124 __deserializer: __D,
125 ) -> core::result::Result<Self, __D::Error>
126 where
127 __D: _serde::Deserializer<'de>,
128 {
129 _serde::Deserializer::deserialize_key(__deserializer, __FieldVisitor)
130 }
131 }
132 struct __hkbComputeRotationFromAxisAngleModifierInternalStateVisitor<'de> {
133 marker: _serde::__private::PhantomData<
134 hkbComputeRotationFromAxisAngleModifierInternalState,
135 >,
136 lifetime: _serde::__private::PhantomData<&'de ()>,
137 }
138 #[allow(clippy::match_single_binding)]
139 #[allow(clippy::reversed_empty_ranges)]
140 #[allow(clippy::single_match)]
141 impl<'de> _serde::de::Visitor<'de>
142 for __hkbComputeRotationFromAxisAngleModifierInternalStateVisitor<'de> {
143 type Value = hkbComputeRotationFromAxisAngleModifierInternalState;
144 fn expecting(
145 &self,
146 __formatter: &mut core::fmt::Formatter,
147 ) -> core::fmt::Result {
148 core::fmt::Formatter::write_str(
149 __formatter,
150 "struct hkbComputeRotationFromAxisAngleModifierInternalState",
151 )
152 }
153 fn visit_struct_for_bytes<__A>(
154 self,
155 mut __map: __A,
156 ) -> _serde::__private::Result<Self::Value, __A::Error>
157 where
158 __A: _serde::de::MapAccess<'de>,
159 {
160 let __ptr = __A::class_ptr(&mut __map);
161 let parent = __A::parent_value(&mut __map)?;
162 let mut m_rotationOut: _serde::__private::Option<Quaternion> = _serde::__private::None;
163 for i in 0..1usize {
164 match i {
165 0usize => {
166 if _serde::__private::Option::is_some(&m_rotationOut) {
167 return _serde::__private::Err(
168 <__A::Error as _serde::de::Error>::duplicate_field(
169 "rotationOut",
170 ),
171 );
172 }
173 __A::pad(&mut __map, 8usize, 0usize)?;
174 m_rotationOut = _serde::__private::Some(
175 match __A::next_value::<Quaternion>(&mut __map) {
176 _serde::__private::Ok(__val) => __val,
177 _serde::__private::Err(__err) => {
178 return _serde::__private::Err(__err);
179 }
180 },
181 );
182 }
183 _ => {}
184 }
185 }
186 let m_rotationOut = match m_rotationOut {
187 _serde::__private::Some(__field) => __field,
188 _serde::__private::None => {
189 return _serde::__private::Err(
190 <__A::Error as _serde::de::Error>::missing_field(
191 "rotationOut",
192 ),
193 );
194 }
195 };
196 _serde::__private::Ok(hkbComputeRotationFromAxisAngleModifierInternalState {
197 __ptr,
198 parent,
199 m_rotationOut,
200 })
201 }
202 #[allow(clippy::manual_unwrap_or_default)]
203 fn visit_struct<__A>(
204 self,
205 mut __map: __A,
206 ) -> _serde::__private::Result<Self::Value, __A::Error>
207 where
208 __A: _serde::de::MapAccess<'de>,
209 {
210 let mut m_rotationOut: _serde::__private::Option<Quaternion> = _serde::__private::None;
211 while let _serde::__private::Some(__key) = {
212 __A::next_key::<__Field>(&mut __map)?
213 } {
214 match __key {
215 __Field::m_rotationOut => {
216 #[cfg(
217 any(feature = "strict", feature = "ignore_duplicates")
218 )]
219 if _serde::__private::Option::is_some(&m_rotationOut) {
220 #[cfg(feature = "ignore_duplicates")]
221 {
222 __A::skip_value(&mut __map)?;
223 continue;
224 }
225 #[cfg(feature = "strict")]
226 return _serde::__private::Err(
227 <__A::Error as _serde::de::Error>::duplicate_field(
228 "rotationOut",
229 ),
230 );
231 }
232 m_rotationOut = _serde::__private::Some(
233 match __A::next_value::<Quaternion>(&mut __map) {
234 _serde::__private::Ok(__val) => __val,
235 _serde::__private::Err(__err) => {
236 return _serde::__private::Err(__err);
237 }
238 },
239 );
240 }
241 _ => __A::skip_value(&mut __map)?,
242 }
243 }
244 let m_rotationOut = match m_rotationOut {
245 _serde::__private::Some(__field) => __field,
246 _serde::__private::None => {
247 #[cfg(feature = "strict")]
248 return _serde::__private::Err(
249 <__A::Error as _serde::de::Error>::missing_field(
250 "rotationOut",
251 ),
252 );
253 #[cfg(not(feature = "strict"))] Default::default()
254 }
255 };
256 let __ptr = None;
257 let parent = hkBaseObject { __ptr };
258 let parent = hkReferencedObject {
259 __ptr,
260 parent,
261 ..Default::default()
262 };
263 let __ptr = __A::class_ptr(&mut __map);
264 _serde::__private::Ok(hkbComputeRotationFromAxisAngleModifierInternalState {
265 __ptr,
266 parent,
267 m_rotationOut,
268 })
269 }
270 }
271 const FIELDS: &[&str] = &["rotationOut"];
272 _serde::Deserializer::deserialize_struct(
273 deserializer,
274 "hkbComputeRotationFromAxisAngleModifierInternalState",
275 FIELDS,
276 __hkbComputeRotationFromAxisAngleModifierInternalStateVisitor {
277 marker: _serde::__private::PhantomData::<
278 hkbComputeRotationFromAxisAngleModifierInternalState,
279 >,
280 lifetime: _serde::__private::PhantomData,
281 },
282 )
283 }
284 }
285};