16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 04:19:19 +02:00

serializacja e3d

This commit is contained in:
VB
2017-02-26 18:40:00 +01:00
parent 62e9766962
commit fcf74abfa2
8 changed files with 284 additions and 225 deletions

View File

@@ -25,6 +25,12 @@ void float4x4::deserialize_float64(std::istream &s)
e[i] = (float)sn_utils::ld_float64(s);
}
void float4x4::serialize_float32(std::ostream &s)
{
for (size_t i = 0; i < 16; i++)
sn_utils::ls_float32(s, e[i]);
}
void float4x4::Quaternion(float4 *q)
{ // konwersja kwaternionu obrotu na macierz obrotu
float xx = q->x * q->x, yy = q->y * q->y, zz = q->z * q->z;