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 hkpTyremarkPoint {
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 = "pointLeft"))]
31 #[cfg_attr(feature = "serde", serde(rename = "pointLeft"))]
32 pub m_pointLeft: Vector4,
33 #[cfg_attr(feature = "json_schema", schemars(rename = "pointRight"))]
38 #[cfg_attr(feature = "serde", serde(rename = "pointRight"))]
39 pub m_pointRight: Vector4,
40}
41const _: () = {
42 use havok_serde as _serde;
43 impl _serde::HavokClass for hkpTyremarkPoint {
44 #[inline]
45 fn name(&self) -> &'static str {
46 "hkpTyremarkPoint"
47 }
48 #[inline]
49 fn signature(&self) -> _serde::__private::Signature {
50 _serde::__private::Signature::new(0x6bb7c5e8)
51 }
52 #[allow(clippy::let_and_return, clippy::vec_init_then_push)]
53 fn deps_indexes(&self) -> Vec<usize> {
54 let mut v = Vec::new();
55 v
56 }
57 }
58 impl _serde::Serialize for hkpTyremarkPoint {
59 fn serialize<S>(&self, __serializer: S) -> Result<S::Ok, S::Error>
60 where
61 S: _serde::ser::Serializer,
62 {
63 let class_meta = self
64 .__ptr
65 .map(|name| (name, _serde::__private::Signature::new(0x6bb7c5e8)));
66 let mut serializer = __serializer
67 .serialize_struct("hkpTyremarkPoint", class_meta, (32u64, 32u64))?;
68 serializer.serialize_field("pointLeft", &self.m_pointLeft)?;
69 serializer.serialize_field("pointRight", &self.m_pointRight)?;
70 serializer.end()
71 }
72 }
73};
74#[doc(hidden)]
75#[allow(non_upper_case_globals, unused_attributes, unused_qualifications)]
76const _: () = {
77 use havok_serde as _serde;
78 #[automatically_derived]
79 impl<'de> _serde::Deserialize<'de> for hkpTyremarkPoint {
80 fn deserialize<__D>(deserializer: __D) -> core::result::Result<Self, __D::Error>
81 where
82 __D: _serde::Deserializer<'de>,
83 {
84 #[allow(non_camel_case_types)]
85 enum __Field {
86 m_pointLeft,
87 m_pointRight,
88 __ignore,
89 }
90 struct __FieldVisitor;
91 impl<'de> _serde::de::Visitor<'de> for __FieldVisitor {
92 type Value = __Field;
93 fn expecting(
94 &self,
95 __formatter: &mut core::fmt::Formatter,
96 ) -> core::fmt::Result {
97 core::fmt::Formatter::write_str(__formatter, "field identifier")
98 }
99 #[allow(clippy::match_single_binding)]
101 #[allow(clippy::reversed_empty_ranges)]
102 #[allow(clippy::single_match)]
103 fn visit_key<__E>(
104 self,
105 __value: &str,
106 ) -> core::result::Result<Self::Value, __E>
107 where
108 __E: _serde::de::Error,
109 {
110 match __value {
111 "pointLeft" => Ok(__Field::m_pointLeft),
112 "pointRight" => Ok(__Field::m_pointRight),
113 _ => Ok(__Field::__ignore),
114 }
115 }
116 }
117 impl<'de> _serde::Deserialize<'de> for __Field {
118 #[inline]
119 fn deserialize<__D>(
120 __deserializer: __D,
121 ) -> core::result::Result<Self, __D::Error>
122 where
123 __D: _serde::Deserializer<'de>,
124 {
125 _serde::Deserializer::deserialize_key(__deserializer, __FieldVisitor)
126 }
127 }
128 struct __hkpTyremarkPointVisitor<'de> {
129 marker: _serde::__private::PhantomData<hkpTyremarkPoint>,
130 lifetime: _serde::__private::PhantomData<&'de ()>,
131 }
132 #[allow(clippy::match_single_binding)]
133 #[allow(clippy::reversed_empty_ranges)]
134 #[allow(clippy::single_match)]
135 impl<'de> _serde::de::Visitor<'de> for __hkpTyremarkPointVisitor<'de> {
136 type Value = hkpTyremarkPoint;
137 fn expecting(
138 &self,
139 __formatter: &mut core::fmt::Formatter,
140 ) -> core::fmt::Result {
141 core::fmt::Formatter::write_str(
142 __formatter,
143 "struct hkpTyremarkPoint",
144 )
145 }
146 fn visit_struct_for_bytes<__A>(
147 self,
148 mut __map: __A,
149 ) -> _serde::__private::Result<Self::Value, __A::Error>
150 where
151 __A: _serde::de::MapAccess<'de>,
152 {
153 let __ptr = __A::class_ptr(&mut __map);
154 let mut m_pointLeft: _serde::__private::Option<Vector4> = _serde::__private::None;
155 let mut m_pointRight: _serde::__private::Option<Vector4> = _serde::__private::None;
156 for i in 0..2usize {
157 match i {
158 0usize => {
159 if _serde::__private::Option::is_some(&m_pointLeft) {
160 return _serde::__private::Err(
161 <__A::Error as _serde::de::Error>::duplicate_field(
162 "pointLeft",
163 ),
164 );
165 }
166 m_pointLeft = _serde::__private::Some(
167 match __A::next_value::<Vector4>(&mut __map) {
168 _serde::__private::Ok(__val) => __val,
169 _serde::__private::Err(__err) => {
170 return _serde::__private::Err(__err);
171 }
172 },
173 );
174 }
175 1usize => {
176 if _serde::__private::Option::is_some(&m_pointRight) {
177 return _serde::__private::Err(
178 <__A::Error as _serde::de::Error>::duplicate_field(
179 "pointRight",
180 ),
181 );
182 }
183 m_pointRight = _serde::__private::Some(
184 match __A::next_value::<Vector4>(&mut __map) {
185 _serde::__private::Ok(__val) => __val,
186 _serde::__private::Err(__err) => {
187 return _serde::__private::Err(__err);
188 }
189 },
190 );
191 }
192 _ => {}
193 }
194 }
195 let m_pointLeft = match m_pointLeft {
196 _serde::__private::Some(__field) => __field,
197 _serde::__private::None => {
198 return _serde::__private::Err(
199 <__A::Error as _serde::de::Error>::missing_field(
200 "pointLeft",
201 ),
202 );
203 }
204 };
205 let m_pointRight = match m_pointRight {
206 _serde::__private::Some(__field) => __field,
207 _serde::__private::None => {
208 return _serde::__private::Err(
209 <__A::Error as _serde::de::Error>::missing_field(
210 "pointRight",
211 ),
212 );
213 }
214 };
215 _serde::__private::Ok(hkpTyremarkPoint {
216 __ptr,
217 m_pointLeft,
218 m_pointRight,
219 })
220 }
221 #[allow(clippy::manual_unwrap_or_default)]
222 fn visit_struct<__A>(
223 self,
224 mut __map: __A,
225 ) -> _serde::__private::Result<Self::Value, __A::Error>
226 where
227 __A: _serde::de::MapAccess<'de>,
228 {
229 let mut m_pointLeft: _serde::__private::Option<Vector4> = _serde::__private::None;
230 let mut m_pointRight: _serde::__private::Option<Vector4> = _serde::__private::None;
231 while let _serde::__private::Some(__key) = {
232 __A::next_key::<__Field>(&mut __map)?
233 } {
234 match __key {
235 __Field::m_pointLeft => {
236 #[cfg(
237 any(feature = "strict", feature = "ignore_duplicates")
238 )]
239 if _serde::__private::Option::is_some(&m_pointLeft) {
240 #[cfg(feature = "ignore_duplicates")]
241 {
242 __A::skip_value(&mut __map)?;
243 continue;
244 }
245 #[cfg(feature = "strict")]
246 return _serde::__private::Err(
247 <__A::Error as _serde::de::Error>::duplicate_field(
248 "pointLeft",
249 ),
250 );
251 }
252 m_pointLeft = _serde::__private::Some(
253 match __A::next_value::<Vector4>(&mut __map) {
254 _serde::__private::Ok(__val) => __val,
255 _serde::__private::Err(__err) => {
256 return _serde::__private::Err(__err);
257 }
258 },
259 );
260 }
261 __Field::m_pointRight => {
262 #[cfg(
263 any(feature = "strict", feature = "ignore_duplicates")
264 )]
265 if _serde::__private::Option::is_some(&m_pointRight) {
266 #[cfg(feature = "ignore_duplicates")]
267 {
268 __A::skip_value(&mut __map)?;
269 continue;
270 }
271 #[cfg(feature = "strict")]
272 return _serde::__private::Err(
273 <__A::Error as _serde::de::Error>::duplicate_field(
274 "pointRight",
275 ),
276 );
277 }
278 m_pointRight = _serde::__private::Some(
279 match __A::next_value::<Vector4>(&mut __map) {
280 _serde::__private::Ok(__val) => __val,
281 _serde::__private::Err(__err) => {
282 return _serde::__private::Err(__err);
283 }
284 },
285 );
286 }
287 _ => __A::skip_value(&mut __map)?,
288 }
289 }
290 let m_pointLeft = match m_pointLeft {
291 _serde::__private::Some(__field) => __field,
292 _serde::__private::None => {
293 #[cfg(feature = "strict")]
294 return _serde::__private::Err(
295 <__A::Error as _serde::de::Error>::missing_field(
296 "pointLeft",
297 ),
298 );
299 #[cfg(not(feature = "strict"))] Default::default()
300 }
301 };
302 let m_pointRight = match m_pointRight {
303 _serde::__private::Some(__field) => __field,
304 _serde::__private::None => {
305 #[cfg(feature = "strict")]
306 return _serde::__private::Err(
307 <__A::Error as _serde::de::Error>::missing_field(
308 "pointRight",
309 ),
310 );
311 #[cfg(not(feature = "strict"))] Default::default()
312 }
313 };
314 let __ptr = __A::class_ptr(&mut __map);
315 _serde::__private::Ok(hkpTyremarkPoint {
316 __ptr,
317 m_pointLeft,
318 m_pointRight,
319 })
320 }
321 }
322 const FIELDS: &[&str] = &["pointLeft", "pointRight"];
323 _serde::Deserializer::deserialize_struct(
324 deserializer,
325 "hkpTyremarkPoint",
326 FIELDS,
327 __hkpTyremarkPointVisitor {
328 marker: _serde::__private::PhantomData::<hkpTyremarkPoint>,
329 lifetime: _serde::__private::PhantomData,
330 },
331 )
332 }
333 }
334};