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 hkpMouseSpringAction<'a> {
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 #[cfg_attr(feature = "serde", serde(borrow))]
30 pub parent: hkpUnaryAction<'a>,
31 #[cfg_attr(feature = "json_schema", schemars(rename = "positionInRbLocal"))]
36 #[cfg_attr(feature = "serde", serde(rename = "positionInRbLocal"))]
37 pub m_positionInRbLocal: Vector4,
38 #[cfg_attr(feature = "json_schema", schemars(rename = "mousePositionInWorld"))]
43 #[cfg_attr(feature = "serde", serde(rename = "mousePositionInWorld"))]
44 pub m_mousePositionInWorld: Vector4,
45 #[cfg_attr(feature = "json_schema", schemars(rename = "springDamping"))]
50 #[cfg_attr(feature = "serde", serde(rename = "springDamping"))]
51 pub m_springDamping: f32,
52 #[cfg_attr(feature = "json_schema", schemars(rename = "springElasticity"))]
57 #[cfg_attr(feature = "serde", serde(rename = "springElasticity"))]
58 pub m_springElasticity: f32,
59 #[cfg_attr(feature = "json_schema", schemars(rename = "maxRelativeForce"))]
64 #[cfg_attr(feature = "serde", serde(rename = "maxRelativeForce"))]
65 pub m_maxRelativeForce: f32,
66 #[cfg_attr(feature = "json_schema", schemars(rename = "objectDamping"))]
71 #[cfg_attr(feature = "serde", serde(rename = "objectDamping"))]
72 pub m_objectDamping: f32,
73 #[cfg_attr(feature = "json_schema", schemars(rename = "shapeKey"))]
78 #[cfg_attr(feature = "serde", serde(rename = "shapeKey"))]
79 pub m_shapeKey: u32,
80 #[cfg_attr(feature = "json_schema", schemars(rename = "applyCallbacks"))]
86 #[cfg_attr(feature = "serde", serde(rename = "applyCallbacks"))]
87 pub m_applyCallbacks: Vec<Pointer>,
88}
89const _: () = {
90 use havok_serde as _serde;
91 impl<'a> _serde::HavokClass for hkpMouseSpringAction<'a> {
92 #[inline]
93 fn name(&self) -> &'static str {
94 "hkpMouseSpringAction"
95 }
96 #[inline]
97 fn signature(&self) -> _serde::__private::Signature {
98 _serde::__private::Signature::new(0x6e087fd6)
99 }
100 #[allow(clippy::let_and_return, clippy::vec_init_then_push)]
101 fn deps_indexes(&self) -> Vec<usize> {
102 let mut v = Vec::new();
103 v.push(self.parent.parent.m_world.get());
104 v.push(self.parent.parent.m_island.get());
105 v.push(self.parent.m_entity.get());
106 v.extend(self.m_applyCallbacks.iter().map(|ptr| ptr.get()));
107 v
108 }
109 }
110 impl<'a> _serde::Serialize for hkpMouseSpringAction<'a> {
111 fn serialize<S>(&self, __serializer: S) -> Result<S::Ok, S::Error>
112 where
113 S: _serde::ser::Serializer,
114 {
115 let class_meta = self
116 .__ptr
117 .map(|name| (name, _serde::__private::Signature::new(0x6e087fd6)));
118 let mut serializer = __serializer
119 .serialize_struct("hkpMouseSpringAction", class_meta, (96u64, 144u64))?;
120 serializer.pad_field([0u8; 4usize].as_slice(), [0u8; 8usize].as_slice())?;
121 serializer
122 .skip_field(
123 "memSizeAndFlags",
124 &self.parent.parent.parent.m_memSizeAndFlags,
125 )?;
126 serializer
127 .skip_field(
128 "referenceCount",
129 &self.parent.parent.parent.m_referenceCount,
130 )?;
131 serializer.pad_field([0u8; 0usize].as_slice(), [0u8; 4usize].as_slice())?;
132 serializer.skip_field("world", &self.parent.parent.m_world)?;
133 serializer.skip_field("island", &self.parent.parent.m_island)?;
134 serializer.serialize_field("userData", &self.parent.parent.m_userData)?;
135 serializer.serialize_field("name", &self.parent.parent.m_name)?;
136 serializer.serialize_field("entity", &self.parent.m_entity)?;
137 serializer.pad_field([0u8; 4usize].as_slice(), [0u8; 8usize].as_slice())?;
138 serializer.serialize_field("positionInRbLocal", &self.m_positionInRbLocal)?;
139 serializer
140 .serialize_field("mousePositionInWorld", &self.m_mousePositionInWorld)?;
141 serializer.serialize_field("springDamping", &self.m_springDamping)?;
142 serializer.serialize_field("springElasticity", &self.m_springElasticity)?;
143 serializer.serialize_field("maxRelativeForce", &self.m_maxRelativeForce)?;
144 serializer.serialize_field("objectDamping", &self.m_objectDamping)?;
145 serializer.serialize_field("shapeKey", &self.m_shapeKey)?;
146 serializer.pad_field([0u8; 0usize].as_slice(), [0u8; 4usize].as_slice())?;
147 serializer
148 .skip_array_field(
149 "applyCallbacks",
150 &self.m_applyCallbacks,
151 TypeSize::NonPtr,
152 )?;
153 serializer.pad_field([0u8; 0usize].as_slice(), [0u8; 8usize].as_slice())?;
154 serializer.end()
155 }
156 }
157};
158#[doc(hidden)]
159#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
160const _: () = {
161 use havok_serde as _serde;
162 #[automatically_derived]
163 impl<'de> _serde::Deserialize<'de> for hkpMouseSpringAction<'de> {
164 fn deserialize<__D>(deserializer: __D) -> core::result::Result<Self, __D::Error>
165 where
166 __D: _serde::Deserializer<'de>,
167 {
168 #[allow(non_camel_case_types)]
169 enum __Field {
170 m_userData,
171 m_name,
172 m_entity,
173 m_positionInRbLocal,
174 m_mousePositionInWorld,
175 m_springDamping,
176 m_springElasticity,
177 m_maxRelativeForce,
178 m_objectDamping,
179 m_shapeKey,
180 __ignore,
181 }
182 struct __FieldVisitor;
183 impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
184 type Value = __Field;
185 fn expecting(
186 &self,
187 __formatter: &mut core::fmt::Formatter,
188 ) -> core::fmt::Result {
189 core::fmt::Formatter::write_str(__formatter, "field identifier")
190 }
191 #[allow(clippy::match_single_binding)]
193 #[allow(clippy::reversed_empty_ranges)]
194 #[allow(clippy::single_match)]
195 fn visit_key<__E>(
196 self,
197 __value: &str,
198 ) -> core::result::Result<Self::Value, __E>
199 where
200 __E: _serde::de::Error,
201 {
202 match __value {
203 "userData" => Ok(__Field::m_userData),
204 "name" => Ok(__Field::m_name),
205 "entity" => Ok(__Field::m_entity),
206 "positionInRbLocal" => Ok(__Field::m_positionInRbLocal),
207 "mousePositionInWorld" => Ok(__Field::m_mousePositionInWorld),
208 "springDamping" => Ok(__Field::m_springDamping),
209 "springElasticity" => Ok(__Field::m_springElasticity),
210 "maxRelativeForce" => Ok(__Field::m_maxRelativeForce),
211 "objectDamping" => Ok(__Field::m_objectDamping),
212 "shapeKey" => Ok(__Field::m_shapeKey),
213 _ => Ok(__Field::__ignore),
214 }
215 }
216 }
217 impl<'de> _serde::Deserialize<'de> for __Field {
218 #[inline]
219 fn deserialize<__D>(
220 __deserializer: __D,
221 ) -> core::result::Result<Self, __D::Error>
222 where
223 __D: _serde::Deserializer<'de>,
224 {
225 _serde::Deserializer::deserialize_key(__deserializer, __FieldVisitor)
226 }
227 }
228 struct __hkpMouseSpringActionVisitor<'de> {
229 marker: _serde::__private::PhantomData<hkpMouseSpringAction<'de>>,
230 lifetime: _serde::__private::PhantomData<&'de ()>,
231 }
232 #[allow(clippy::match_single_binding)]
233 #[allow(clippy::reversed_empty_ranges)]
234 #[allow(clippy::single_match)]
235 impl<'de> _serde::de::Visitor<'de> for __hkpMouseSpringActionVisitor<'de> {
236 type Value = hkpMouseSpringAction<'de>;
237 fn expecting(
238 &self,
239 __formatter: &mut core::fmt::Formatter,
240 ) -> core::fmt::Result {
241 core::fmt::Formatter::write_str(
242 __formatter,
243 "struct hkpMouseSpringAction",
244 )
245 }
246 fn visit_struct_for_bytes<__A>(
247 self,
248 mut __map: __A,
249 ) -> _serde::__private::Result<Self::Value, __A::Error>
250 where
251 __A: _serde::de::MapAccess<'de>,
252 {
253 let __ptr = __A::class_ptr(&mut __map);
254 let parent = __A::parent_value(&mut __map)?;
255 let mut m_positionInRbLocal: _serde::__private::Option<Vector4> = _serde::__private::None;
256 let mut m_mousePositionInWorld: _serde::__private::Option<Vector4> = _serde::__private::None;
257 let mut m_springDamping: _serde::__private::Option<f32> = _serde::__private::None;
258 let mut m_springElasticity: _serde::__private::Option<f32> = _serde::__private::None;
259 let mut m_maxRelativeForce: _serde::__private::Option<f32> = _serde::__private::None;
260 let mut m_objectDamping: _serde::__private::Option<f32> = _serde::__private::None;
261 let mut m_shapeKey: _serde::__private::Option<u32> = _serde::__private::None;
262 let mut m_applyCallbacks: _serde::__private::Option<Vec<Pointer>> = _serde::__private::None;
263 for i in 0..8usize {
264 match i {
265 0usize => {
266 if _serde::__private::Option::is_some(
267 &m_positionInRbLocal,
268 ) {
269 return _serde::__private::Err(
270 <__A::Error as _serde::de::Error>::duplicate_field(
271 "positionInRbLocal",
272 ),
273 );
274 }
275 __A::pad(&mut __map, 4usize, 8usize)?;
276 m_positionInRbLocal = _serde::__private::Some(
277 match __A::next_value::<Vector4>(&mut __map) {
278 _serde::__private::Ok(__val) => __val,
279 _serde::__private::Err(__err) => {
280 return _serde::__private::Err(__err);
281 }
282 },
283 );
284 }
285 1usize => {
286 if _serde::__private::Option::is_some(
287 &m_mousePositionInWorld,
288 ) {
289 return _serde::__private::Err(
290 <__A::Error as _serde::de::Error>::duplicate_field(
291 "mousePositionInWorld",
292 ),
293 );
294 }
295 m_mousePositionInWorld = _serde::__private::Some(
296 match __A::next_value::<Vector4>(&mut __map) {
297 _serde::__private::Ok(__val) => __val,
298 _serde::__private::Err(__err) => {
299 return _serde::__private::Err(__err);
300 }
301 },
302 );
303 }
304 2usize => {
305 if _serde::__private::Option::is_some(&m_springDamping) {
306 return _serde::__private::Err(
307 <__A::Error as _serde::de::Error>::duplicate_field(
308 "springDamping",
309 ),
310 );
311 }
312 m_springDamping = _serde::__private::Some(
313 match __A::next_value::<f32>(&mut __map) {
314 _serde::__private::Ok(__val) => __val,
315 _serde::__private::Err(__err) => {
316 return _serde::__private::Err(__err);
317 }
318 },
319 );
320 }
321 3usize => {
322 if _serde::__private::Option::is_some(&m_springElasticity) {
323 return _serde::__private::Err(
324 <__A::Error as _serde::de::Error>::duplicate_field(
325 "springElasticity",
326 ),
327 );
328 }
329 m_springElasticity = _serde::__private::Some(
330 match __A::next_value::<f32>(&mut __map) {
331 _serde::__private::Ok(__val) => __val,
332 _serde::__private::Err(__err) => {
333 return _serde::__private::Err(__err);
334 }
335 },
336 );
337 }
338 4usize => {
339 if _serde::__private::Option::is_some(&m_maxRelativeForce) {
340 return _serde::__private::Err(
341 <__A::Error as _serde::de::Error>::duplicate_field(
342 "maxRelativeForce",
343 ),
344 );
345 }
346 m_maxRelativeForce = _serde::__private::Some(
347 match __A::next_value::<f32>(&mut __map) {
348 _serde::__private::Ok(__val) => __val,
349 _serde::__private::Err(__err) => {
350 return _serde::__private::Err(__err);
351 }
352 },
353 );
354 }
355 5usize => {
356 if _serde::__private::Option::is_some(&m_objectDamping) {
357 return _serde::__private::Err(
358 <__A::Error as _serde::de::Error>::duplicate_field(
359 "objectDamping",
360 ),
361 );
362 }
363 m_objectDamping = _serde::__private::Some(
364 match __A::next_value::<f32>(&mut __map) {
365 _serde::__private::Ok(__val) => __val,
366 _serde::__private::Err(__err) => {
367 return _serde::__private::Err(__err);
368 }
369 },
370 );
371 }
372 6usize => {
373 if _serde::__private::Option::is_some(&m_shapeKey) {
374 return _serde::__private::Err(
375 <__A::Error as _serde::de::Error>::duplicate_field(
376 "shapeKey",
377 ),
378 );
379 }
380 m_shapeKey = _serde::__private::Some(
381 match __A::next_value::<u32>(&mut __map) {
382 _serde::__private::Ok(__val) => __val,
383 _serde::__private::Err(__err) => {
384 return _serde::__private::Err(__err);
385 }
386 },
387 );
388 }
389 7usize => {
390 if _serde::__private::Option::is_some(&m_applyCallbacks) {
391 return _serde::__private::Err(
392 <__A::Error as _serde::de::Error>::duplicate_field(
393 "applyCallbacks",
394 ),
395 );
396 }
397 __A::pad(&mut __map, 0usize, 4usize)?;
398 m_applyCallbacks = _serde::__private::Some(
399 match __A::next_value::<Vec<Pointer>>(&mut __map) {
400 _serde::__private::Ok(__val) => __val,
401 _serde::__private::Err(__err) => {
402 return _serde::__private::Err(__err);
403 }
404 },
405 );
406 }
407 _ => {}
408 }
409 }
410 __A::pad(&mut __map, 0usize, 8usize)?;
411 let m_positionInRbLocal = match m_positionInRbLocal {
412 _serde::__private::Some(__field) => __field,
413 _serde::__private::None => {
414 return _serde::__private::Err(
415 <__A::Error as _serde::de::Error>::missing_field(
416 "positionInRbLocal",
417 ),
418 );
419 }
420 };
421 let m_mousePositionInWorld = match m_mousePositionInWorld {
422 _serde::__private::Some(__field) => __field,
423 _serde::__private::None => {
424 return _serde::__private::Err(
425 <__A::Error as _serde::de::Error>::missing_field(
426 "mousePositionInWorld",
427 ),
428 );
429 }
430 };
431 let m_springDamping = match m_springDamping {
432 _serde::__private::Some(__field) => __field,
433 _serde::__private::None => {
434 return _serde::__private::Err(
435 <__A::Error as _serde::de::Error>::missing_field(
436 "springDamping",
437 ),
438 );
439 }
440 };
441 let m_springElasticity = match m_springElasticity {
442 _serde::__private::Some(__field) => __field,
443 _serde::__private::None => {
444 return _serde::__private::Err(
445 <__A::Error as _serde::de::Error>::missing_field(
446 "springElasticity",
447 ),
448 );
449 }
450 };
451 let m_maxRelativeForce = match m_maxRelativeForce {
452 _serde::__private::Some(__field) => __field,
453 _serde::__private::None => {
454 return _serde::__private::Err(
455 <__A::Error as _serde::de::Error>::missing_field(
456 "maxRelativeForce",
457 ),
458 );
459 }
460 };
461 let m_objectDamping = match m_objectDamping {
462 _serde::__private::Some(__field) => __field,
463 _serde::__private::None => {
464 return _serde::__private::Err(
465 <__A::Error as _serde::de::Error>::missing_field(
466 "objectDamping",
467 ),
468 );
469 }
470 };
471 let m_shapeKey = match m_shapeKey {
472 _serde::__private::Some(__field) => __field,
473 _serde::__private::None => {
474 return _serde::__private::Err(
475 <__A::Error as _serde::de::Error>::missing_field("shapeKey"),
476 );
477 }
478 };
479 let m_applyCallbacks = match m_applyCallbacks {
480 _serde::__private::Some(__field) => __field,
481 _serde::__private::None => {
482 return _serde::__private::Err(
483 <__A::Error as _serde::de::Error>::missing_field(
484 "applyCallbacks",
485 ),
486 );
487 }
488 };
489 _serde::__private::Ok(hkpMouseSpringAction {
490 __ptr,
491 parent,
492 m_positionInRbLocal,
493 m_mousePositionInWorld,
494 m_springDamping,
495 m_springElasticity,
496 m_maxRelativeForce,
497 m_objectDamping,
498 m_shapeKey,
499 m_applyCallbacks,
500 })
501 }
502 #[allow(clippy::manual_unwrap_or_default)]
503 fn visit_struct<__A>(
504 self,
505 mut __map: __A,
506 ) -> _serde::__private::Result<Self::Value, __A::Error>
507 where
508 __A: _serde::de::MapAccess<'de>,
509 {
510 let mut m_userData: _serde::__private::Option<Ulong> = _serde::__private::None;
511 let mut m_name: _serde::__private::Option<StringPtr<'de>> = _serde::__private::None;
512 let mut m_entity: _serde::__private::Option<Pointer> = _serde::__private::None;
513 let mut m_positionInRbLocal: _serde::__private::Option<Vector4> = _serde::__private::None;
514 let mut m_mousePositionInWorld: _serde::__private::Option<Vector4> = _serde::__private::None;
515 let mut m_springDamping: _serde::__private::Option<f32> = _serde::__private::None;
516 let mut m_springElasticity: _serde::__private::Option<f32> = _serde::__private::None;
517 let mut m_maxRelativeForce: _serde::__private::Option<f32> = _serde::__private::None;
518 let mut m_objectDamping: _serde::__private::Option<f32> = _serde::__private::None;
519 let mut m_shapeKey: _serde::__private::Option<u32> = _serde::__private::None;
520 while let _serde::__private::Some(__key) = {
521 __A::next_key::<__Field>(&mut __map)?
522 } {
523 match __key {
524 __Field::m_userData => {
525 #[cfg(
526 any(feature = "strict", feature = "ignore_duplicates")
527 )]
528 if _serde::__private::Option::is_some(&m_userData) {
529 #[cfg(feature = "ignore_duplicates")]
530 {
531 __A::skip_value(&mut __map)?;
532 continue;
533 }
534 #[cfg(feature = "strict")]
535 return _serde::__private::Err(
536 <__A::Error as _serde::de::Error>::duplicate_field(
537 "userData",
538 ),
539 );
540 }
541 m_userData = _serde::__private::Some(
542 match __A::next_value::<Ulong>(&mut __map) {
543 _serde::__private::Ok(__val) => __val,
544 _serde::__private::Err(__err) => {
545 return _serde::__private::Err(__err);
546 }
547 },
548 );
549 }
550 __Field::m_name => {
551 #[cfg(
552 any(feature = "strict", feature = "ignore_duplicates")
553 )]
554 if _serde::__private::Option::is_some(&m_name) {
555 #[cfg(feature = "ignore_duplicates")]
556 {
557 __A::skip_value(&mut __map)?;
558 continue;
559 }
560 #[cfg(feature = "strict")]
561 return _serde::__private::Err(
562 <__A::Error as _serde::de::Error>::duplicate_field("name"),
563 );
564 }
565 m_name = _serde::__private::Some(
566 match __A::next_value::<StringPtr<'de>>(&mut __map) {
567 _serde::__private::Ok(__val) => __val,
568 _serde::__private::Err(__err) => {
569 return _serde::__private::Err(__err);
570 }
571 },
572 );
573 }
574 __Field::m_entity => {
575 #[cfg(
576 any(feature = "strict", feature = "ignore_duplicates")
577 )]
578 if _serde::__private::Option::is_some(&m_entity) {
579 #[cfg(feature = "ignore_duplicates")]
580 {
581 __A::skip_value(&mut __map)?;
582 continue;
583 }
584 #[cfg(feature = "strict")]
585 return _serde::__private::Err(
586 <__A::Error as _serde::de::Error>::duplicate_field("entity"),
587 );
588 }
589 m_entity = _serde::__private::Some(
590 match __A::next_value::<Pointer>(&mut __map) {
591 _serde::__private::Ok(__val) => __val,
592 _serde::__private::Err(__err) => {
593 return _serde::__private::Err(__err);
594 }
595 },
596 );
597 }
598 __Field::m_positionInRbLocal => {
599 #[cfg(
600 any(feature = "strict", feature = "ignore_duplicates")
601 )]
602 if _serde::__private::Option::is_some(
603 &m_positionInRbLocal,
604 ) {
605 #[cfg(feature = "ignore_duplicates")]
606 {
607 __A::skip_value(&mut __map)?;
608 continue;
609 }
610 #[cfg(feature = "strict")]
611 return _serde::__private::Err(
612 <__A::Error as _serde::de::Error>::duplicate_field(
613 "positionInRbLocal",
614 ),
615 );
616 }
617 m_positionInRbLocal = _serde::__private::Some(
618 match __A::next_value::<Vector4>(&mut __map) {
619 _serde::__private::Ok(__val) => __val,
620 _serde::__private::Err(__err) => {
621 return _serde::__private::Err(__err);
622 }
623 },
624 );
625 }
626 __Field::m_mousePositionInWorld => {
627 #[cfg(
628 any(feature = "strict", feature = "ignore_duplicates")
629 )]
630 if _serde::__private::Option::is_some(
631 &m_mousePositionInWorld,
632 ) {
633 #[cfg(feature = "ignore_duplicates")]
634 {
635 __A::skip_value(&mut __map)?;
636 continue;
637 }
638 #[cfg(feature = "strict")]
639 return _serde::__private::Err(
640 <__A::Error as _serde::de::Error>::duplicate_field(
641 "mousePositionInWorld",
642 ),
643 );
644 }
645 m_mousePositionInWorld = _serde::__private::Some(
646 match __A::next_value::<Vector4>(&mut __map) {
647 _serde::__private::Ok(__val) => __val,
648 _serde::__private::Err(__err) => {
649 return _serde::__private::Err(__err);
650 }
651 },
652 );
653 }
654 __Field::m_springDamping => {
655 #[cfg(
656 any(feature = "strict", feature = "ignore_duplicates")
657 )]
658 if _serde::__private::Option::is_some(&m_springDamping) {
659 #[cfg(feature = "ignore_duplicates")]
660 {
661 __A::skip_value(&mut __map)?;
662 continue;
663 }
664 #[cfg(feature = "strict")]
665 return _serde::__private::Err(
666 <__A::Error as _serde::de::Error>::duplicate_field(
667 "springDamping",
668 ),
669 );
670 }
671 m_springDamping = _serde::__private::Some(
672 match __A::next_value::<f32>(&mut __map) {
673 _serde::__private::Ok(__val) => __val,
674 _serde::__private::Err(__err) => {
675 return _serde::__private::Err(__err);
676 }
677 },
678 );
679 }
680 __Field::m_springElasticity => {
681 #[cfg(
682 any(feature = "strict", feature = "ignore_duplicates")
683 )]
684 if _serde::__private::Option::is_some(&m_springElasticity) {
685 #[cfg(feature = "ignore_duplicates")]
686 {
687 __A::skip_value(&mut __map)?;
688 continue;
689 }
690 #[cfg(feature = "strict")]
691 return _serde::__private::Err(
692 <__A::Error as _serde::de::Error>::duplicate_field(
693 "springElasticity",
694 ),
695 );
696 }
697 m_springElasticity = _serde::__private::Some(
698 match __A::next_value::<f32>(&mut __map) {
699 _serde::__private::Ok(__val) => __val,
700 _serde::__private::Err(__err) => {
701 return _serde::__private::Err(__err);
702 }
703 },
704 );
705 }
706 __Field::m_maxRelativeForce => {
707 #[cfg(
708 any(feature = "strict", feature = "ignore_duplicates")
709 )]
710 if _serde::__private::Option::is_some(&m_maxRelativeForce) {
711 #[cfg(feature = "ignore_duplicates")]
712 {
713 __A::skip_value(&mut __map)?;
714 continue;
715 }
716 #[cfg(feature = "strict")]
717 return _serde::__private::Err(
718 <__A::Error as _serde::de::Error>::duplicate_field(
719 "maxRelativeForce",
720 ),
721 );
722 }
723 m_maxRelativeForce = _serde::__private::Some(
724 match __A::next_value::<f32>(&mut __map) {
725 _serde::__private::Ok(__val) => __val,
726 _serde::__private::Err(__err) => {
727 return _serde::__private::Err(__err);
728 }
729 },
730 );
731 }
732 __Field::m_objectDamping => {
733 #[cfg(
734 any(feature = "strict", feature = "ignore_duplicates")
735 )]
736 if _serde::__private::Option::is_some(&m_objectDamping) {
737 #[cfg(feature = "ignore_duplicates")]
738 {
739 __A::skip_value(&mut __map)?;
740 continue;
741 }
742 #[cfg(feature = "strict")]
743 return _serde::__private::Err(
744 <__A::Error as _serde::de::Error>::duplicate_field(
745 "objectDamping",
746 ),
747 );
748 }
749 m_objectDamping = _serde::__private::Some(
750 match __A::next_value::<f32>(&mut __map) {
751 _serde::__private::Ok(__val) => __val,
752 _serde::__private::Err(__err) => {
753 return _serde::__private::Err(__err);
754 }
755 },
756 );
757 }
758 __Field::m_shapeKey => {
759 #[cfg(
760 any(feature = "strict", feature = "ignore_duplicates")
761 )]
762 if _serde::__private::Option::is_some(&m_shapeKey) {
763 #[cfg(feature = "ignore_duplicates")]
764 {
765 __A::skip_value(&mut __map)?;
766 continue;
767 }
768 #[cfg(feature = "strict")]
769 return _serde::__private::Err(
770 <__A::Error as _serde::de::Error>::duplicate_field(
771 "shapeKey",
772 ),
773 );
774 }
775 m_shapeKey = _serde::__private::Some(
776 match __A::next_value::<u32>(&mut __map) {
777 _serde::__private::Ok(__val) => __val,
778 _serde::__private::Err(__err) => {
779 return _serde::__private::Err(__err);
780 }
781 },
782 );
783 }
784 _ => __A::skip_value(&mut __map)?,
785 }
786 }
787 let m_userData = match m_userData {
788 _serde::__private::Some(__field) => __field,
789 _serde::__private::None => {
790 #[cfg(feature = "strict")]
791 return _serde::__private::Err(
792 <__A::Error as _serde::de::Error>::missing_field("userData"),
793 );
794 #[cfg(not(feature = "strict"))] Default::default()
795 }
796 };
797 let m_name = match m_name {
798 _serde::__private::Some(__field) => __field,
799 _serde::__private::None => {
800 #[cfg(feature = "strict")]
801 return _serde::__private::Err(
802 <__A::Error as _serde::de::Error>::missing_field("name"),
803 );
804 #[cfg(not(feature = "strict"))] Default::default()
805 }
806 };
807 let m_entity = match m_entity {
808 _serde::__private::Some(__field) => __field,
809 _serde::__private::None => {
810 #[cfg(feature = "strict")]
811 return _serde::__private::Err(
812 <__A::Error as _serde::de::Error>::missing_field("entity"),
813 );
814 #[cfg(not(feature = "strict"))] Default::default()
815 }
816 };
817 let m_positionInRbLocal = match m_positionInRbLocal {
818 _serde::__private::Some(__field) => __field,
819 _serde::__private::None => {
820 #[cfg(feature = "strict")]
821 return _serde::__private::Err(
822 <__A::Error as _serde::de::Error>::missing_field(
823 "positionInRbLocal",
824 ),
825 );
826 #[cfg(not(feature = "strict"))] Default::default()
827 }
828 };
829 let m_mousePositionInWorld = match m_mousePositionInWorld {
830 _serde::__private::Some(__field) => __field,
831 _serde::__private::None => {
832 #[cfg(feature = "strict")]
833 return _serde::__private::Err(
834 <__A::Error as _serde::de::Error>::missing_field(
835 "mousePositionInWorld",
836 ),
837 );
838 #[cfg(not(feature = "strict"))] Default::default()
839 }
840 };
841 let m_springDamping = match m_springDamping {
842 _serde::__private::Some(__field) => __field,
843 _serde::__private::None => {
844 #[cfg(feature = "strict")]
845 return _serde::__private::Err(
846 <__A::Error as _serde::de::Error>::missing_field(
847 "springDamping",
848 ),
849 );
850 #[cfg(not(feature = "strict"))] Default::default()
851 }
852 };
853 let m_springElasticity = match m_springElasticity {
854 _serde::__private::Some(__field) => __field,
855 _serde::__private::None => {
856 #[cfg(feature = "strict")]
857 return _serde::__private::Err(
858 <__A::Error as _serde::de::Error>::missing_field(
859 "springElasticity",
860 ),
861 );
862 #[cfg(not(feature = "strict"))] Default::default()
863 }
864 };
865 let m_maxRelativeForce = match m_maxRelativeForce {
866 _serde::__private::Some(__field) => __field,
867 _serde::__private::None => {
868 #[cfg(feature = "strict")]
869 return _serde::__private::Err(
870 <__A::Error as _serde::de::Error>::missing_field(
871 "maxRelativeForce",
872 ),
873 );
874 #[cfg(not(feature = "strict"))] Default::default()
875 }
876 };
877 let m_objectDamping = match m_objectDamping {
878 _serde::__private::Some(__field) => __field,
879 _serde::__private::None => {
880 #[cfg(feature = "strict")]
881 return _serde::__private::Err(
882 <__A::Error as _serde::de::Error>::missing_field(
883 "objectDamping",
884 ),
885 );
886 #[cfg(not(feature = "strict"))] Default::default()
887 }
888 };
889 let m_shapeKey = match m_shapeKey {
890 _serde::__private::Some(__field) => __field,
891 _serde::__private::None => {
892 #[cfg(feature = "strict")]
893 return _serde::__private::Err(
894 <__A::Error as _serde::de::Error>::missing_field("shapeKey"),
895 );
896 #[cfg(not(feature = "strict"))] Default::default()
897 }
898 };
899 let __ptr = None;
900 let parent = hkBaseObject { __ptr };
901 let parent = hkReferencedObject {
902 __ptr,
903 parent,
904 ..Default::default()
905 };
906 let parent = hkpAction {
907 __ptr,
908 parent,
909 m_userData,
910 m_name,
911 ..Default::default()
912 };
913 let parent = hkpUnaryAction {
914 __ptr,
915 parent,
916 m_entity,
917 };
918 let __ptr = __A::class_ptr(&mut __map);
919 _serde::__private::Ok(hkpMouseSpringAction {
920 __ptr,
921 parent,
922 m_positionInRbLocal,
923 m_mousePositionInWorld,
924 m_springDamping,
925 m_springElasticity,
926 m_maxRelativeForce,
927 m_objectDamping,
928 m_shapeKey,
929 ..Default::default()
930 })
931 }
932 }
933 const FIELDS: &[&str] = &[
934 "positionInRbLocal",
935 "mousePositionInWorld",
936 "springDamping",
937 "springElasticity",
938 "maxRelativeForce",
939 "objectDamping",
940 "shapeKey",
941 "applyCallbacks",
942 ];
943 _serde::Deserializer::deserialize_struct(
944 deserializer,
945 "hkpMouseSpringAction",
946 FIELDS,
947 __hkpMouseSpringActionVisitor {
948 marker: _serde::__private::PhantomData::<hkpMouseSpringAction>,
949 lifetime: _serde::__private::PhantomData,
950 },
951 )
952 }
953 }
954};