project: COLLADA 2 BIN

Details

Program that converts geometric and animation 3D scene data, from a COLLADA "*.dae" file to a binary file, with a custom format.

  • current version: 1.0
  • last updated: February, 2019
Download source

src > math > quat.cpp

View raw
#include "./mat4.h"
#include "./quat.h"

namespace math
{
  
  QUAT fROT_XYZ(const VEC3 &angle) {
    MAT4 m;
    m.identity();
    m.rotateYXZ(angle);
    return m.getRot();
  }

  QUAT fLERP_ANGLE(const VEC3 &a, const VEC3 &b, float t) { // TODO: optimization
    return fROT_XYZ(a).lerp(fROT_XYZ(b), t);//.normal();
  }

}