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 hkaKeyFrameHierarchyUtilityControlData {
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(rename = "hierarchyGain"))]
31 #[cfg_attr(feature = "serde", serde(rename = "hierarchyGain"))]
32 pub m_hierarchyGain: f32,
33 #[cfg_attr(feature = "json_schema", schemars(rename = "velocityDamping"))]
38 #[cfg_attr(feature = "serde", serde(rename = "velocityDamping"))]
39 pub m_velocityDamping: f32,
40 #[cfg_attr(feature = "json_schema", schemars(rename = "accelerationGain"))]
45 #[cfg_attr(feature = "serde", serde(rename = "accelerationGain"))]
46 pub m_accelerationGain: f32,
47 #[cfg_attr(feature = "json_schema", schemars(rename = "velocityGain"))]
52 #[cfg_attr(feature = "serde", serde(rename = "velocityGain"))]
53 pub m_velocityGain: f32,
54 #[cfg_attr(feature = "json_schema", schemars(rename = "positionGain"))]
59 #[cfg_attr(feature = "serde", serde(rename = "positionGain"))]
60 pub m_positionGain: f32,
61 #[cfg_attr(feature = "json_schema", schemars(rename = "positionMaxLinearVelocity"))]
66 #[cfg_attr(feature = "serde", serde(rename = "positionMaxLinearVelocity"))]
67 pub m_positionMaxLinearVelocity: f32,
68 #[cfg_attr(feature = "json_schema", schemars(rename = "positionMaxAngularVelocity"))]
73 #[cfg_attr(feature = "serde", serde(rename = "positionMaxAngularVelocity"))]
74 pub m_positionMaxAngularVelocity: f32,
75 #[cfg_attr(feature = "json_schema", schemars(rename = "snapGain"))]
80 #[cfg_attr(feature = "serde", serde(rename = "snapGain"))]
81 pub m_snapGain: f32,
82 #[cfg_attr(feature = "json_schema", schemars(rename = "snapMaxLinearVelocity"))]
87 #[cfg_attr(feature = "serde", serde(rename = "snapMaxLinearVelocity"))]
88 pub m_snapMaxLinearVelocity: f32,
89 #[cfg_attr(feature = "json_schema", schemars(rename = "snapMaxAngularVelocity"))]
94 #[cfg_attr(feature = "serde", serde(rename = "snapMaxAngularVelocity"))]
95 pub m_snapMaxAngularVelocity: f32,
96 #[cfg_attr(feature = "json_schema", schemars(rename = "snapMaxLinearDistance"))]
101 #[cfg_attr(feature = "serde", serde(rename = "snapMaxLinearDistance"))]
102 pub m_snapMaxLinearDistance: f32,
103 #[cfg_attr(feature = "json_schema", schemars(rename = "snapMaxAngularDistance"))]
108 #[cfg_attr(feature = "serde", serde(rename = "snapMaxAngularDistance"))]
109 pub m_snapMaxAngularDistance: f32,
110}
111const _: () = {
112 use havok_serde as _serde;
113 impl _serde::HavokClass for hkaKeyFrameHierarchyUtilityControlData {
114 #[inline]
115 fn name(&self) -> &'static str {
116 "hkaKeyFrameHierarchyUtilityControlData"
117 }
118 #[inline]
119 fn signature(&self) -> _serde::__private::Signature {
120 _serde::__private::Signature::new(0xa3d0ac71)
121 }
122 #[allow(clippy::let_and_return, clippy::vec_init_then_push)]
123 fn deps_indexes(&self) -> Vec<usize> {
124 let mut v = Vec::new();
125 v
126 }
127 }
128 impl _serde::Serialize for hkaKeyFrameHierarchyUtilityControlData {
129 fn serialize<S>(&self, __serializer: S) -> Result<S::Ok, S::Error>
130 where
131 S: _serde::ser::Serializer,
132 {
133 let class_meta = self
134 .__ptr
135 .map(|name| (name, _serde::__private::Signature::new(0xa3d0ac71)));
136 let mut serializer = __serializer
137 .serialize_struct(
138 "hkaKeyFrameHierarchyUtilityControlData",
139 class_meta,
140 (48u64, 48u64),
141 )?;
142 serializer.serialize_field("hierarchyGain", &self.m_hierarchyGain)?;
143 serializer.serialize_field("velocityDamping", &self.m_velocityDamping)?;
144 serializer.serialize_field("accelerationGain", &self.m_accelerationGain)?;
145 serializer.serialize_field("velocityGain", &self.m_velocityGain)?;
146 serializer.serialize_field("positionGain", &self.m_positionGain)?;
147 serializer
148 .serialize_field(
149 "positionMaxLinearVelocity",
150 &self.m_positionMaxLinearVelocity,
151 )?;
152 serializer
153 .serialize_field(
154 "positionMaxAngularVelocity",
155 &self.m_positionMaxAngularVelocity,
156 )?;
157 serializer.serialize_field("snapGain", &self.m_snapGain)?;
158 serializer
159 .serialize_field(
160 "snapMaxLinearVelocity",
161 &self.m_snapMaxLinearVelocity,
162 )?;
163 serializer
164 .serialize_field(
165 "snapMaxAngularVelocity",
166 &self.m_snapMaxAngularVelocity,
167 )?;
168 serializer
169 .serialize_field(
170 "snapMaxLinearDistance",
171 &self.m_snapMaxLinearDistance,
172 )?;
173 serializer
174 .serialize_field(
175 "snapMaxAngularDistance",
176 &self.m_snapMaxAngularDistance,
177 )?;
178 serializer.end()
179 }
180 }
181};
182#[doc(hidden)]
183#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
184const _: () = {
185 use havok_serde as _serde;
186 #[automatically_derived]
187 impl<'de> _serde::Deserialize<'de> for hkaKeyFrameHierarchyUtilityControlData {
188 fn deserialize<__D>(deserializer: __D) -> core::result::Result<Self, __D::Error>
189 where
190 __D: _serde::Deserializer<'de>,
191 {
192 #[allow(non_camel_case_types)]
193 enum __Field {
194 m_hierarchyGain,
195 m_velocityDamping,
196 m_accelerationGain,
197 m_velocityGain,
198 m_positionGain,
199 m_positionMaxLinearVelocity,
200 m_positionMaxAngularVelocity,
201 m_snapGain,
202 m_snapMaxLinearVelocity,
203 m_snapMaxAngularVelocity,
204 m_snapMaxLinearDistance,
205 m_snapMaxAngularDistance,
206 __ignore,
207 }
208 struct __FieldVisitor;
209 impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
210 type Value = __Field;
211 fn expecting(
212 &self,
213 __formatter: &mut core::fmt::Formatter,
214 ) -> core::fmt::Result {
215 core::fmt::Formatter::write_str(__formatter, "field identifier")
216 }
217 #[allow(clippy::match_single_binding)]
219 #[allow(clippy::reversed_empty_ranges)]
220 #[allow(clippy::single_match)]
221 fn visit_key<__E>(
222 self,
223 __value: &str,
224 ) -> core::result::Result<Self::Value, __E>
225 where
226 __E: _serde::de::Error,
227 {
228 match __value {
229 "hierarchyGain" => Ok(__Field::m_hierarchyGain),
230 "velocityDamping" => Ok(__Field::m_velocityDamping),
231 "accelerationGain" => Ok(__Field::m_accelerationGain),
232 "velocityGain" => Ok(__Field::m_velocityGain),
233 "positionGain" => Ok(__Field::m_positionGain),
234 "positionMaxLinearVelocity" => {
235 Ok(__Field::m_positionMaxLinearVelocity)
236 }
237 "positionMaxAngularVelocity" => {
238 Ok(__Field::m_positionMaxAngularVelocity)
239 }
240 "snapGain" => Ok(__Field::m_snapGain),
241 "snapMaxLinearVelocity" => Ok(__Field::m_snapMaxLinearVelocity),
242 "snapMaxAngularVelocity" => Ok(__Field::m_snapMaxAngularVelocity),
243 "snapMaxLinearDistance" => Ok(__Field::m_snapMaxLinearDistance),
244 "snapMaxAngularDistance" => Ok(__Field::m_snapMaxAngularDistance),
245 _ => Ok(__Field::__ignore),
246 }
247 }
248 }
249 impl<'de> _serde::Deserialize<'de> for __Field {
250 #[inline]
251 fn deserialize<__D>(
252 __deserializer: __D,
253 ) -> core::result::Result<Self, __D::Error>
254 where
255 __D: _serde::Deserializer<'de>,
256 {
257 _serde::Deserializer::deserialize_key(__deserializer, __FieldVisitor)
258 }
259 }
260 struct __hkaKeyFrameHierarchyUtilityControlDataVisitor<'de> {
261 marker: _serde::__private::PhantomData<
262 hkaKeyFrameHierarchyUtilityControlData,
263 >,
264 lifetime: _serde::__private::PhantomData<&'de ()>,
265 }
266 #[allow(clippy::match_single_binding)]
267 #[allow(clippy::reversed_empty_ranges)]
268 #[allow(clippy::single_match)]
269 impl<'de> _serde::de::Visitor<'de>
270 for __hkaKeyFrameHierarchyUtilityControlDataVisitor<'de> {
271 type Value = hkaKeyFrameHierarchyUtilityControlData;
272 fn expecting(
273 &self,
274 __formatter: &mut core::fmt::Formatter,
275 ) -> core::fmt::Result {
276 core::fmt::Formatter::write_str(
277 __formatter,
278 "struct hkaKeyFrameHierarchyUtilityControlData",
279 )
280 }
281 fn visit_struct_for_bytes<__A>(
282 self,
283 mut __map: __A,
284 ) -> _serde::__private::Result<Self::Value, __A::Error>
285 where
286 __A: _serde::de::MapAccess<'de>,
287 {
288 let __ptr = __A::class_ptr(&mut __map);
289 let mut m_hierarchyGain: _serde::__private::Option<f32> = _serde::__private::None;
290 let mut m_velocityDamping: _serde::__private::Option<f32> = _serde::__private::None;
291 let mut m_accelerationGain: _serde::__private::Option<f32> = _serde::__private::None;
292 let mut m_velocityGain: _serde::__private::Option<f32> = _serde::__private::None;
293 let mut m_positionGain: _serde::__private::Option<f32> = _serde::__private::None;
294 let mut m_positionMaxLinearVelocity: _serde::__private::Option<
295 f32,
296 > = _serde::__private::None;
297 let mut m_positionMaxAngularVelocity: _serde::__private::Option<
298 f32,
299 > = _serde::__private::None;
300 let mut m_snapGain: _serde::__private::Option<f32> = _serde::__private::None;
301 let mut m_snapMaxLinearVelocity: _serde::__private::Option<f32> = _serde::__private::None;
302 let mut m_snapMaxAngularVelocity: _serde::__private::Option<f32> = _serde::__private::None;
303 let mut m_snapMaxLinearDistance: _serde::__private::Option<f32> = _serde::__private::None;
304 let mut m_snapMaxAngularDistance: _serde::__private::Option<f32> = _serde::__private::None;
305 for i in 0..12usize {
306 match i {
307 0usize => {
308 if _serde::__private::Option::is_some(&m_hierarchyGain) {
309 return _serde::__private::Err(
310 <__A::Error as _serde::de::Error>::duplicate_field(
311 "hierarchyGain",
312 ),
313 );
314 }
315 m_hierarchyGain = _serde::__private::Some(
316 match __A::next_value::<f32>(&mut __map) {
317 _serde::__private::Ok(__val) => __val,
318 _serde::__private::Err(__err) => {
319 return _serde::__private::Err(__err);
320 }
321 },
322 );
323 }
324 1usize => {
325 if _serde::__private::Option::is_some(&m_velocityDamping) {
326 return _serde::__private::Err(
327 <__A::Error as _serde::de::Error>::duplicate_field(
328 "velocityDamping",
329 ),
330 );
331 }
332 m_velocityDamping = _serde::__private::Some(
333 match __A::next_value::<f32>(&mut __map) {
334 _serde::__private::Ok(__val) => __val,
335 _serde::__private::Err(__err) => {
336 return _serde::__private::Err(__err);
337 }
338 },
339 );
340 }
341 2usize => {
342 if _serde::__private::Option::is_some(&m_accelerationGain) {
343 return _serde::__private::Err(
344 <__A::Error as _serde::de::Error>::duplicate_field(
345 "accelerationGain",
346 ),
347 );
348 }
349 m_accelerationGain = _serde::__private::Some(
350 match __A::next_value::<f32>(&mut __map) {
351 _serde::__private::Ok(__val) => __val,
352 _serde::__private::Err(__err) => {
353 return _serde::__private::Err(__err);
354 }
355 },
356 );
357 }
358 3usize => {
359 if _serde::__private::Option::is_some(&m_velocityGain) {
360 return _serde::__private::Err(
361 <__A::Error as _serde::de::Error>::duplicate_field(
362 "velocityGain",
363 ),
364 );
365 }
366 m_velocityGain = _serde::__private::Some(
367 match __A::next_value::<f32>(&mut __map) {
368 _serde::__private::Ok(__val) => __val,
369 _serde::__private::Err(__err) => {
370 return _serde::__private::Err(__err);
371 }
372 },
373 );
374 }
375 4usize => {
376 if _serde::__private::Option::is_some(&m_positionGain) {
377 return _serde::__private::Err(
378 <__A::Error as _serde::de::Error>::duplicate_field(
379 "positionGain",
380 ),
381 );
382 }
383 m_positionGain = _serde::__private::Some(
384 match __A::next_value::<f32>(&mut __map) {
385 _serde::__private::Ok(__val) => __val,
386 _serde::__private::Err(__err) => {
387 return _serde::__private::Err(__err);
388 }
389 },
390 );
391 }
392 5usize => {
393 if _serde::__private::Option::is_some(
394 &m_positionMaxLinearVelocity,
395 ) {
396 return _serde::__private::Err(
397 <__A::Error as _serde::de::Error>::duplicate_field(
398 "positionMaxLinearVelocity",
399 ),
400 );
401 }
402 m_positionMaxLinearVelocity = _serde::__private::Some(
403 match __A::next_value::<f32>(&mut __map) {
404 _serde::__private::Ok(__val) => __val,
405 _serde::__private::Err(__err) => {
406 return _serde::__private::Err(__err);
407 }
408 },
409 );
410 }
411 6usize => {
412 if _serde::__private::Option::is_some(
413 &m_positionMaxAngularVelocity,
414 ) {
415 return _serde::__private::Err(
416 <__A::Error as _serde::de::Error>::duplicate_field(
417 "positionMaxAngularVelocity",
418 ),
419 );
420 }
421 m_positionMaxAngularVelocity = _serde::__private::Some(
422 match __A::next_value::<f32>(&mut __map) {
423 _serde::__private::Ok(__val) => __val,
424 _serde::__private::Err(__err) => {
425 return _serde::__private::Err(__err);
426 }
427 },
428 );
429 }
430 7usize => {
431 if _serde::__private::Option::is_some(&m_snapGain) {
432 return _serde::__private::Err(
433 <__A::Error as _serde::de::Error>::duplicate_field(
434 "snapGain",
435 ),
436 );
437 }
438 m_snapGain = _serde::__private::Some(
439 match __A::next_value::<f32>(&mut __map) {
440 _serde::__private::Ok(__val) => __val,
441 _serde::__private::Err(__err) => {
442 return _serde::__private::Err(__err);
443 }
444 },
445 );
446 }
447 8usize => {
448 if _serde::__private::Option::is_some(
449 &m_snapMaxLinearVelocity,
450 ) {
451 return _serde::__private::Err(
452 <__A::Error as _serde::de::Error>::duplicate_field(
453 "snapMaxLinearVelocity",
454 ),
455 );
456 }
457 m_snapMaxLinearVelocity = _serde::__private::Some(
458 match __A::next_value::<f32>(&mut __map) {
459 _serde::__private::Ok(__val) => __val,
460 _serde::__private::Err(__err) => {
461 return _serde::__private::Err(__err);
462 }
463 },
464 );
465 }
466 9usize => {
467 if _serde::__private::Option::is_some(
468 &m_snapMaxAngularVelocity,
469 ) {
470 return _serde::__private::Err(
471 <__A::Error as _serde::de::Error>::duplicate_field(
472 "snapMaxAngularVelocity",
473 ),
474 );
475 }
476 m_snapMaxAngularVelocity = _serde::__private::Some(
477 match __A::next_value::<f32>(&mut __map) {
478 _serde::__private::Ok(__val) => __val,
479 _serde::__private::Err(__err) => {
480 return _serde::__private::Err(__err);
481 }
482 },
483 );
484 }
485 10usize => {
486 if _serde::__private::Option::is_some(
487 &m_snapMaxLinearDistance,
488 ) {
489 return _serde::__private::Err(
490 <__A::Error as _serde::de::Error>::duplicate_field(
491 "snapMaxLinearDistance",
492 ),
493 );
494 }
495 m_snapMaxLinearDistance = _serde::__private::Some(
496 match __A::next_value::<f32>(&mut __map) {
497 _serde::__private::Ok(__val) => __val,
498 _serde::__private::Err(__err) => {
499 return _serde::__private::Err(__err);
500 }
501 },
502 );
503 }
504 11usize => {
505 if _serde::__private::Option::is_some(
506 &m_snapMaxAngularDistance,
507 ) {
508 return _serde::__private::Err(
509 <__A::Error as _serde::de::Error>::duplicate_field(
510 "snapMaxAngularDistance",
511 ),
512 );
513 }
514 m_snapMaxAngularDistance = _serde::__private::Some(
515 match __A::next_value::<f32>(&mut __map) {
516 _serde::__private::Ok(__val) => __val,
517 _serde::__private::Err(__err) => {
518 return _serde::__private::Err(__err);
519 }
520 },
521 );
522 }
523 _ => {}
524 }
525 }
526 let m_hierarchyGain = match m_hierarchyGain {
527 _serde::__private::Some(__field) => __field,
528 _serde::__private::None => {
529 return _serde::__private::Err(
530 <__A::Error as _serde::de::Error>::missing_field(
531 "hierarchyGain",
532 ),
533 );
534 }
535 };
536 let m_velocityDamping = match m_velocityDamping {
537 _serde::__private::Some(__field) => __field,
538 _serde::__private::None => {
539 return _serde::__private::Err(
540 <__A::Error as _serde::de::Error>::missing_field(
541 "velocityDamping",
542 ),
543 );
544 }
545 };
546 let m_accelerationGain = match m_accelerationGain {
547 _serde::__private::Some(__field) => __field,
548 _serde::__private::None => {
549 return _serde::__private::Err(
550 <__A::Error as _serde::de::Error>::missing_field(
551 "accelerationGain",
552 ),
553 );
554 }
555 };
556 let m_velocityGain = match m_velocityGain {
557 _serde::__private::Some(__field) => __field,
558 _serde::__private::None => {
559 return _serde::__private::Err(
560 <__A::Error as _serde::de::Error>::missing_field(
561 "velocityGain",
562 ),
563 );
564 }
565 };
566 let m_positionGain = match m_positionGain {
567 _serde::__private::Some(__field) => __field,
568 _serde::__private::None => {
569 return _serde::__private::Err(
570 <__A::Error as _serde::de::Error>::missing_field(
571 "positionGain",
572 ),
573 );
574 }
575 };
576 let m_positionMaxLinearVelocity = match m_positionMaxLinearVelocity {
577 _serde::__private::Some(__field) => __field,
578 _serde::__private::None => {
579 return _serde::__private::Err(
580 <__A::Error as _serde::de::Error>::missing_field(
581 "positionMaxLinearVelocity",
582 ),
583 );
584 }
585 };
586 let m_positionMaxAngularVelocity = match m_positionMaxAngularVelocity {
587 _serde::__private::Some(__field) => __field,
588 _serde::__private::None => {
589 return _serde::__private::Err(
590 <__A::Error as _serde::de::Error>::missing_field(
591 "positionMaxAngularVelocity",
592 ),
593 );
594 }
595 };
596 let m_snapGain = match m_snapGain {
597 _serde::__private::Some(__field) => __field,
598 _serde::__private::None => {
599 return _serde::__private::Err(
600 <__A::Error as _serde::de::Error>::missing_field("snapGain"),
601 );
602 }
603 };
604 let m_snapMaxLinearVelocity = match m_snapMaxLinearVelocity {
605 _serde::__private::Some(__field) => __field,
606 _serde::__private::None => {
607 return _serde::__private::Err(
608 <__A::Error as _serde::de::Error>::missing_field(
609 "snapMaxLinearVelocity",
610 ),
611 );
612 }
613 };
614 let m_snapMaxAngularVelocity = match m_snapMaxAngularVelocity {
615 _serde::__private::Some(__field) => __field,
616 _serde::__private::None => {
617 return _serde::__private::Err(
618 <__A::Error as _serde::de::Error>::missing_field(
619 "snapMaxAngularVelocity",
620 ),
621 );
622 }
623 };
624 let m_snapMaxLinearDistance = match m_snapMaxLinearDistance {
625 _serde::__private::Some(__field) => __field,
626 _serde::__private::None => {
627 return _serde::__private::Err(
628 <__A::Error as _serde::de::Error>::missing_field(
629 "snapMaxLinearDistance",
630 ),
631 );
632 }
633 };
634 let m_snapMaxAngularDistance = match m_snapMaxAngularDistance {
635 _serde::__private::Some(__field) => __field,
636 _serde::__private::None => {
637 return _serde::__private::Err(
638 <__A::Error as _serde::de::Error>::missing_field(
639 "snapMaxAngularDistance",
640 ),
641 );
642 }
643 };
644 _serde::__private::Ok(hkaKeyFrameHierarchyUtilityControlData {
645 __ptr,
646 m_hierarchyGain,
647 m_velocityDamping,
648 m_accelerationGain,
649 m_velocityGain,
650 m_positionGain,
651 m_positionMaxLinearVelocity,
652 m_positionMaxAngularVelocity,
653 m_snapGain,
654 m_snapMaxLinearVelocity,
655 m_snapMaxAngularVelocity,
656 m_snapMaxLinearDistance,
657 m_snapMaxAngularDistance,
658 })
659 }
660 #[allow(clippy::manual_unwrap_or_default)]
661 fn visit_struct<__A>(
662 self,
663 mut __map: __A,
664 ) -> _serde::__private::Result<Self::Value, __A::Error>
665 where
666 __A: _serde::de::MapAccess<'de>,
667 {
668 let mut m_hierarchyGain: _serde::__private::Option<f32> = _serde::__private::None;
669 let mut m_velocityDamping: _serde::__private::Option<f32> = _serde::__private::None;
670 let mut m_accelerationGain: _serde::__private::Option<f32> = _serde::__private::None;
671 let mut m_velocityGain: _serde::__private::Option<f32> = _serde::__private::None;
672 let mut m_positionGain: _serde::__private::Option<f32> = _serde::__private::None;
673 let mut m_positionMaxLinearVelocity: _serde::__private::Option<
674 f32,
675 > = _serde::__private::None;
676 let mut m_positionMaxAngularVelocity: _serde::__private::Option<
677 f32,
678 > = _serde::__private::None;
679 let mut m_snapGain: _serde::__private::Option<f32> = _serde::__private::None;
680 let mut m_snapMaxLinearVelocity: _serde::__private::Option<f32> = _serde::__private::None;
681 let mut m_snapMaxAngularVelocity: _serde::__private::Option<f32> = _serde::__private::None;
682 let mut m_snapMaxLinearDistance: _serde::__private::Option<f32> = _serde::__private::None;
683 let mut m_snapMaxAngularDistance: _serde::__private::Option<f32> = _serde::__private::None;
684 while let _serde::__private::Some(__key) = {
685 __A::next_key::<__Field>(&mut __map)?
686 } {
687 match __key {
688 __Field::m_hierarchyGain => {
689 #[cfg(
690 any(feature = "strict", feature = "ignore_duplicates")
691 )]
692 if _serde::__private::Option::is_some(&m_hierarchyGain) {
693 #[cfg(feature = "ignore_duplicates")]
694 {
695 __A::skip_value(&mut __map)?;
696 continue;
697 }
698 #[cfg(feature = "strict")]
699 return _serde::__private::Err(
700 <__A::Error as _serde::de::Error>::duplicate_field(
701 "hierarchyGain",
702 ),
703 );
704 }
705 m_hierarchyGain = _serde::__private::Some(
706 match __A::next_value::<f32>(&mut __map) {
707 _serde::__private::Ok(__val) => __val,
708 _serde::__private::Err(__err) => {
709 return _serde::__private::Err(__err);
710 }
711 },
712 );
713 }
714 __Field::m_velocityDamping => {
715 #[cfg(
716 any(feature = "strict", feature = "ignore_duplicates")
717 )]
718 if _serde::__private::Option::is_some(&m_velocityDamping) {
719 #[cfg(feature = "ignore_duplicates")]
720 {
721 __A::skip_value(&mut __map)?;
722 continue;
723 }
724 #[cfg(feature = "strict")]
725 return _serde::__private::Err(
726 <__A::Error as _serde::de::Error>::duplicate_field(
727 "velocityDamping",
728 ),
729 );
730 }
731 m_velocityDamping = _serde::__private::Some(
732 match __A::next_value::<f32>(&mut __map) {
733 _serde::__private::Ok(__val) => __val,
734 _serde::__private::Err(__err) => {
735 return _serde::__private::Err(__err);
736 }
737 },
738 );
739 }
740 __Field::m_accelerationGain => {
741 #[cfg(
742 any(feature = "strict", feature = "ignore_duplicates")
743 )]
744 if _serde::__private::Option::is_some(&m_accelerationGain) {
745 #[cfg(feature = "ignore_duplicates")]
746 {
747 __A::skip_value(&mut __map)?;
748 continue;
749 }
750 #[cfg(feature = "strict")]
751 return _serde::__private::Err(
752 <__A::Error as _serde::de::Error>::duplicate_field(
753 "accelerationGain",
754 ),
755 );
756 }
757 m_accelerationGain = _serde::__private::Some(
758 match __A::next_value::<f32>(&mut __map) {
759 _serde::__private::Ok(__val) => __val,
760 _serde::__private::Err(__err) => {
761 return _serde::__private::Err(__err);
762 }
763 },
764 );
765 }
766 __Field::m_velocityGain => {
767 #[cfg(
768 any(feature = "strict", feature = "ignore_duplicates")
769 )]
770 if _serde::__private::Option::is_some(&m_velocityGain) {
771 #[cfg(feature = "ignore_duplicates")]
772 {
773 __A::skip_value(&mut __map)?;
774 continue;
775 }
776 #[cfg(feature = "strict")]
777 return _serde::__private::Err(
778 <__A::Error as _serde::de::Error>::duplicate_field(
779 "velocityGain",
780 ),
781 );
782 }
783 m_velocityGain = _serde::__private::Some(
784 match __A::next_value::<f32>(&mut __map) {
785 _serde::__private::Ok(__val) => __val,
786 _serde::__private::Err(__err) => {
787 return _serde::__private::Err(__err);
788 }
789 },
790 );
791 }
792 __Field::m_positionGain => {
793 #[cfg(
794 any(feature = "strict", feature = "ignore_duplicates")
795 )]
796 if _serde::__private::Option::is_some(&m_positionGain) {
797 #[cfg(feature = "ignore_duplicates")]
798 {
799 __A::skip_value(&mut __map)?;
800 continue;
801 }
802 #[cfg(feature = "strict")]
803 return _serde::__private::Err(
804 <__A::Error as _serde::de::Error>::duplicate_field(
805 "positionGain",
806 ),
807 );
808 }
809 m_positionGain = _serde::__private::Some(
810 match __A::next_value::<f32>(&mut __map) {
811 _serde::__private::Ok(__val) => __val,
812 _serde::__private::Err(__err) => {
813 return _serde::__private::Err(__err);
814 }
815 },
816 );
817 }
818 __Field::m_positionMaxLinearVelocity => {
819 #[cfg(
820 any(feature = "strict", feature = "ignore_duplicates")
821 )]
822 if _serde::__private::Option::is_some(
823 &m_positionMaxLinearVelocity,
824 ) {
825 #[cfg(feature = "ignore_duplicates")]
826 {
827 __A::skip_value(&mut __map)?;
828 continue;
829 }
830 #[cfg(feature = "strict")]
831 return _serde::__private::Err(
832 <__A::Error as _serde::de::Error>::duplicate_field(
833 "positionMaxLinearVelocity",
834 ),
835 );
836 }
837 m_positionMaxLinearVelocity = _serde::__private::Some(
838 match __A::next_value::<f32>(&mut __map) {
839 _serde::__private::Ok(__val) => __val,
840 _serde::__private::Err(__err) => {
841 return _serde::__private::Err(__err);
842 }
843 },
844 );
845 }
846 __Field::m_positionMaxAngularVelocity => {
847 #[cfg(
848 any(feature = "strict", feature = "ignore_duplicates")
849 )]
850 if _serde::__private::Option::is_some(
851 &m_positionMaxAngularVelocity,
852 ) {
853 #[cfg(feature = "ignore_duplicates")]
854 {
855 __A::skip_value(&mut __map)?;
856 continue;
857 }
858 #[cfg(feature = "strict")]
859 return _serde::__private::Err(
860 <__A::Error as _serde::de::Error>::duplicate_field(
861 "positionMaxAngularVelocity",
862 ),
863 );
864 }
865 m_positionMaxAngularVelocity = _serde::__private::Some(
866 match __A::next_value::<f32>(&mut __map) {
867 _serde::__private::Ok(__val) => __val,
868 _serde::__private::Err(__err) => {
869 return _serde::__private::Err(__err);
870 }
871 },
872 );
873 }
874 __Field::m_snapGain => {
875 #[cfg(
876 any(feature = "strict", feature = "ignore_duplicates")
877 )]
878 if _serde::__private::Option::is_some(&m_snapGain) {
879 #[cfg(feature = "ignore_duplicates")]
880 {
881 __A::skip_value(&mut __map)?;
882 continue;
883 }
884 #[cfg(feature = "strict")]
885 return _serde::__private::Err(
886 <__A::Error as _serde::de::Error>::duplicate_field(
887 "snapGain",
888 ),
889 );
890 }
891 m_snapGain = _serde::__private::Some(
892 match __A::next_value::<f32>(&mut __map) {
893 _serde::__private::Ok(__val) => __val,
894 _serde::__private::Err(__err) => {
895 return _serde::__private::Err(__err);
896 }
897 },
898 );
899 }
900 __Field::m_snapMaxLinearVelocity => {
901 #[cfg(
902 any(feature = "strict", feature = "ignore_duplicates")
903 )]
904 if _serde::__private::Option::is_some(
905 &m_snapMaxLinearVelocity,
906 ) {
907 #[cfg(feature = "ignore_duplicates")]
908 {
909 __A::skip_value(&mut __map)?;
910 continue;
911 }
912 #[cfg(feature = "strict")]
913 return _serde::__private::Err(
914 <__A::Error as _serde::de::Error>::duplicate_field(
915 "snapMaxLinearVelocity",
916 ),
917 );
918 }
919 m_snapMaxLinearVelocity = _serde::__private::Some(
920 match __A::next_value::<f32>(&mut __map) {
921 _serde::__private::Ok(__val) => __val,
922 _serde::__private::Err(__err) => {
923 return _serde::__private::Err(__err);
924 }
925 },
926 );
927 }
928 __Field::m_snapMaxAngularVelocity => {
929 #[cfg(
930 any(feature = "strict", feature = "ignore_duplicates")
931 )]
932 if _serde::__private::Option::is_some(
933 &m_snapMaxAngularVelocity,
934 ) {
935 #[cfg(feature = "ignore_duplicates")]
936 {
937 __A::skip_value(&mut __map)?;
938 continue;
939 }
940 #[cfg(feature = "strict")]
941 return _serde::__private::Err(
942 <__A::Error as _serde::de::Error>::duplicate_field(
943 "snapMaxAngularVelocity",
944 ),
945 );
946 }
947 m_snapMaxAngularVelocity = _serde::__private::Some(
948 match __A::next_value::<f32>(&mut __map) {
949 _serde::__private::Ok(__val) => __val,
950 _serde::__private::Err(__err) => {
951 return _serde::__private::Err(__err);
952 }
953 },
954 );
955 }
956 __Field::m_snapMaxLinearDistance => {
957 #[cfg(
958 any(feature = "strict", feature = "ignore_duplicates")
959 )]
960 if _serde::__private::Option::is_some(
961 &m_snapMaxLinearDistance,
962 ) {
963 #[cfg(feature = "ignore_duplicates")]
964 {
965 __A::skip_value(&mut __map)?;
966 continue;
967 }
968 #[cfg(feature = "strict")]
969 return _serde::__private::Err(
970 <__A::Error as _serde::de::Error>::duplicate_field(
971 "snapMaxLinearDistance",
972 ),
973 );
974 }
975 m_snapMaxLinearDistance = _serde::__private::Some(
976 match __A::next_value::<f32>(&mut __map) {
977 _serde::__private::Ok(__val) => __val,
978 _serde::__private::Err(__err) => {
979 return _serde::__private::Err(__err);
980 }
981 },
982 );
983 }
984 __Field::m_snapMaxAngularDistance => {
985 #[cfg(
986 any(feature = "strict", feature = "ignore_duplicates")
987 )]
988 if _serde::__private::Option::is_some(
989 &m_snapMaxAngularDistance,
990 ) {
991 #[cfg(feature = "ignore_duplicates")]
992 {
993 __A::skip_value(&mut __map)?;
994 continue;
995 }
996 #[cfg(feature = "strict")]
997 return _serde::__private::Err(
998 <__A::Error as _serde::de::Error>::duplicate_field(
999 "snapMaxAngularDistance",
1000 ),
1001 );
1002 }
1003 m_snapMaxAngularDistance = _serde::__private::Some(
1004 match __A::next_value::<f32>(&mut __map) {
1005 _serde::__private::Ok(__val) => __val,
1006 _serde::__private::Err(__err) => {
1007 return _serde::__private::Err(__err);
1008 }
1009 },
1010 );
1011 }
1012 _ => __A::skip_value(&mut __map)?,
1013 }
1014 }
1015 let m_hierarchyGain = match m_hierarchyGain {
1016 _serde::__private::Some(__field) => __field,
1017 _serde::__private::None => {
1018 #[cfg(feature = "strict")]
1019 return _serde::__private::Err(
1020 <__A::Error as _serde::de::Error>::missing_field(
1021 "hierarchyGain",
1022 ),
1023 );
1024 #[cfg(not(feature = "strict"))] Default::default()
1025 }
1026 };
1027 let m_velocityDamping = match m_velocityDamping {
1028 _serde::__private::Some(__field) => __field,
1029 _serde::__private::None => {
1030 #[cfg(feature = "strict")]
1031 return _serde::__private::Err(
1032 <__A::Error as _serde::de::Error>::missing_field(
1033 "velocityDamping",
1034 ),
1035 );
1036 #[cfg(not(feature = "strict"))] Default::default()
1037 }
1038 };
1039 let m_accelerationGain = match m_accelerationGain {
1040 _serde::__private::Some(__field) => __field,
1041 _serde::__private::None => {
1042 #[cfg(feature = "strict")]
1043 return _serde::__private::Err(
1044 <__A::Error as _serde::de::Error>::missing_field(
1045 "accelerationGain",
1046 ),
1047 );
1048 #[cfg(not(feature = "strict"))] Default::default()
1049 }
1050 };
1051 let m_velocityGain = match m_velocityGain {
1052 _serde::__private::Some(__field) => __field,
1053 _serde::__private::None => {
1054 #[cfg(feature = "strict")]
1055 return _serde::__private::Err(
1056 <__A::Error as _serde::de::Error>::missing_field(
1057 "velocityGain",
1058 ),
1059 );
1060 #[cfg(not(feature = "strict"))] Default::default()
1061 }
1062 };
1063 let m_positionGain = match m_positionGain {
1064 _serde::__private::Some(__field) => __field,
1065 _serde::__private::None => {
1066 #[cfg(feature = "strict")]
1067 return _serde::__private::Err(
1068 <__A::Error as _serde::de::Error>::missing_field(
1069 "positionGain",
1070 ),
1071 );
1072 #[cfg(not(feature = "strict"))] Default::default()
1073 }
1074 };
1075 let m_positionMaxLinearVelocity = match m_positionMaxLinearVelocity {
1076 _serde::__private::Some(__field) => __field,
1077 _serde::__private::None => {
1078 #[cfg(feature = "strict")]
1079 return _serde::__private::Err(
1080 <__A::Error as _serde::de::Error>::missing_field(
1081 "positionMaxLinearVelocity",
1082 ),
1083 );
1084 #[cfg(not(feature = "strict"))] Default::default()
1085 }
1086 };
1087 let m_positionMaxAngularVelocity = match m_positionMaxAngularVelocity {
1088 _serde::__private::Some(__field) => __field,
1089 _serde::__private::None => {
1090 #[cfg(feature = "strict")]
1091 return _serde::__private::Err(
1092 <__A::Error as _serde::de::Error>::missing_field(
1093 "positionMaxAngularVelocity",
1094 ),
1095 );
1096 #[cfg(not(feature = "strict"))] Default::default()
1097 }
1098 };
1099 let m_snapGain = match m_snapGain {
1100 _serde::__private::Some(__field) => __field,
1101 _serde::__private::None => {
1102 #[cfg(feature = "strict")]
1103 return _serde::__private::Err(
1104 <__A::Error as _serde::de::Error>::missing_field("snapGain"),
1105 );
1106 #[cfg(not(feature = "strict"))] Default::default()
1107 }
1108 };
1109 let m_snapMaxLinearVelocity = match m_snapMaxLinearVelocity {
1110 _serde::__private::Some(__field) => __field,
1111 _serde::__private::None => {
1112 #[cfg(feature = "strict")]
1113 return _serde::__private::Err(
1114 <__A::Error as _serde::de::Error>::missing_field(
1115 "snapMaxLinearVelocity",
1116 ),
1117 );
1118 #[cfg(not(feature = "strict"))] Default::default()
1119 }
1120 };
1121 let m_snapMaxAngularVelocity = match m_snapMaxAngularVelocity {
1122 _serde::__private::Some(__field) => __field,
1123 _serde::__private::None => {
1124 #[cfg(feature = "strict")]
1125 return _serde::__private::Err(
1126 <__A::Error as _serde::de::Error>::missing_field(
1127 "snapMaxAngularVelocity",
1128 ),
1129 );
1130 #[cfg(not(feature = "strict"))] Default::default()
1131 }
1132 };
1133 let m_snapMaxLinearDistance = match m_snapMaxLinearDistance {
1134 _serde::__private::Some(__field) => __field,
1135 _serde::__private::None => {
1136 #[cfg(feature = "strict")]
1137 return _serde::__private::Err(
1138 <__A::Error as _serde::de::Error>::missing_field(
1139 "snapMaxLinearDistance",
1140 ),
1141 );
1142 #[cfg(not(feature = "strict"))] Default::default()
1143 }
1144 };
1145 let m_snapMaxAngularDistance = match m_snapMaxAngularDistance {
1146 _serde::__private::Some(__field) => __field,
1147 _serde::__private::None => {
1148 #[cfg(feature = "strict")]
1149 return _serde::__private::Err(
1150 <__A::Error as _serde::de::Error>::missing_field(
1151 "snapMaxAngularDistance",
1152 ),
1153 );
1154 #[cfg(not(feature = "strict"))] Default::default()
1155 }
1156 };
1157 let __ptr = __A::class_ptr(&mut __map);
1158 _serde::__private::Ok(hkaKeyFrameHierarchyUtilityControlData {
1159 __ptr,
1160 m_hierarchyGain,
1161 m_velocityDamping,
1162 m_accelerationGain,
1163 m_velocityGain,
1164 m_positionGain,
1165 m_positionMaxLinearVelocity,
1166 m_positionMaxAngularVelocity,
1167 m_snapGain,
1168 m_snapMaxLinearVelocity,
1169 m_snapMaxAngularVelocity,
1170 m_snapMaxLinearDistance,
1171 m_snapMaxAngularDistance,
1172 })
1173 }
1174 }
1175 const FIELDS: &[&str] = &[
1176 "hierarchyGain",
1177 "velocityDamping",
1178 "accelerationGain",
1179 "velocityGain",
1180 "positionGain",
1181 "positionMaxLinearVelocity",
1182 "positionMaxAngularVelocity",
1183 "snapGain",
1184 "snapMaxLinearVelocity",
1185 "snapMaxAngularVelocity",
1186 "snapMaxLinearDistance",
1187 "snapMaxAngularDistance",
1188 ];
1189 _serde::Deserializer::deserialize_struct(
1190 deserializer,
1191 "hkaKeyFrameHierarchyUtilityControlData",
1192 FIELDS,
1193 __hkaKeyFrameHierarchyUtilityControlDataVisitor {
1194 marker: _serde::__private::PhantomData::<
1195 hkaKeyFrameHierarchyUtilityControlData,
1196 >,
1197 lifetime: _serde::__private::PhantomData,
1198 },
1199 )
1200 }
1201 }
1202};