From 2013ae114a089ce67a73d2108fbb0dc0317a4084 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Thu, 18 Aug 2022 17:41:07 +0200 Subject: [PATCH] [WIP] Use ai_Real to write correct accuracy - closes https://github.com/assimp/assimp/issues/4676 --- code/AssetLib/Assbin/AssbinFileWriter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/AssetLib/Assbin/AssbinFileWriter.cpp b/code/AssetLib/Assbin/AssbinFileWriter.cpp index 1d16f179e..d1388cde6 100644 --- a/code/AssetLib/Assbin/AssbinFileWriter.cpp +++ b/code/AssetLib/Assbin/AssbinFileWriter.cpp @@ -130,7 +130,7 @@ inline size_t Write(IOStream *stream, const double &f) { // Serialize a vec3 template <> inline size_t Write(IOStream *stream, const aiVector3D &v) { - size_t t = Write(stream, v.x); + size_t t = Write(stream, v.x); t += Write(stream, v.y); t += Write(stream, v.z); @@ -141,7 +141,7 @@ inline size_t Write(IOStream *stream, const aiVector3D &v) { // Serialize a color value template <> inline size_t Write(IOStream *stream, const aiColor3D &v) { - size_t t = Write(stream, v.r); + size_t t = Write(stream, v.r); t += Write(stream, v.g); t += Write(stream, v.b); @@ -152,7 +152,7 @@ inline size_t Write(IOStream *stream, const aiColor3D &v) { // Serialize a color value template <> inline size_t Write(IOStream *stream, const aiColor4D &v) { - size_t t = Write(stream, v.r); + size_t t = Write(stream, v.r); t += Write(stream, v.g); t += Write(stream, v.b); t += Write(stream, v.a); @@ -164,7 +164,7 @@ inline size_t Write(IOStream *stream, const aiColor4D &v) { // Serialize a quaternion template <> inline size_t Write(IOStream *stream, const aiQuaternion &v) { - size_t t = Write(stream, v.w); + size_t t = Write(stream, v.w); t += Write(stream, v.x); t += Write(stream, v.y); t += Write(stream, v.z); @@ -190,7 +190,7 @@ template <> inline size_t Write(IOStream *stream, const aiMatrix4x4 &m) { for (unsigned int i = 0; i < 4; ++i) { for (unsigned int i2 = 0; i2 < 4; ++i2) { - Write(stream, m[i][i2]); + Write(stream, m[i][i2]); } }