Serializing angle inner value

This commit is contained in:
SweetId 2024-03-10 16:40:29 -04:00
parent 4d15cbcc2b
commit c1f429e916
1 changed files with 6 additions and 6 deletions

View File

@ -294,13 +294,13 @@ namespace Nz
template<typename T> template<typename T>
bool Serialize(SerializationContext& context, const EulerAngles<T>& angles, TypeTag<EulerAngles<T>>) bool Serialize(SerializationContext& context, const EulerAngles<T>& angles, TypeTag<EulerAngles<T>>)
{ {
if (!Serialize(context, "pitch", angles.pitch)) if (!Serialize(context, "pitch", angles.pitch.value))
return false; return false;
if (!Serialize(context, "yaw", angles.yaw)) if (!Serialize(context, "yaw", angles.yaw.value))
return false; return false;
if (!Serialize(context, "roll", angles.roll)) if (!Serialize(context, "roll", angles.roll.value))
return false; return false;
return true; return true;
@ -316,13 +316,13 @@ namespace Nz
template<typename T> template<typename T>
bool Unserialize(SerializationContext& context, EulerAngles<T>* angles, TypeTag<EulerAngles<T>>) bool Unserialize(SerializationContext& context, EulerAngles<T>* angles, TypeTag<EulerAngles<T>>)
{ {
if (!Unserialize(context, "pitch", &angles->pitch)) if (!Unserialize(context, "pitch", &angles->pitch.value))
return false; return false;
if (!Unserialize(context, "yaw", &angles->yaw)) if (!Unserialize(context, "yaw", &angles->yaw.value))
return false; return false;
if (!Unserialize(context, "roll", &angles->roll)) if (!Unserialize(context, "roll", &angles->roll.value))
return false; return false;
return true; return true;