This commit is contained in:
VB
2017-02-20 19:03:27 +01:00
parent e24ad4449e
commit b73fec0c5a
16 changed files with 479 additions and 293 deletions

View File

@@ -9,9 +9,22 @@ http://mozilla.org/MPL/2.0/.
#include "stdafx.h"
#include "float3d.h"
#include "sn_utils.h"
//---------------------------------------------------------------------------
void float4x4::deserialize_float32(std::istream &s)
{
for (size_t i = 0; i < 16; i++)
e[i] = sn_utils::ld_float32(s);
}
void float4x4::deserialize_float64(std::istream &s)
{
for (size_t i = 0; i < 16; i++)
e[i] = (float)sn_utils::ld_float64(s);
}
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;