This commit is contained in:
Бранимир Караџић
2021-10-08 19:06:53 -07:00
parent 5890cef12b
commit 6921fc3438
2 changed files with 3 additions and 3 deletions

View File

@@ -287,11 +287,11 @@ namespace
bx::sin(latitude) * bx::sin(m_delta) + bx::cos(latitude) * bx::cos(m_delta) * bx::cos(hh)
);
const bx::Quaternion rot0 = bx::rotateAxis(m_upDir, -azimuth);
const bx::Quaternion rot0 = bx::fromAxisAngle(m_upDir, -azimuth);
const bx::Vec3 dir = bx::mul(m_northDir, rot0);
const bx::Vec3 uxd = bx::cross(m_upDir, dir);
const bx::Quaternion rot1 = bx::rotateAxis(uxd, altitude);
const bx::Quaternion rot1 = bx::fromAxisAngle(uxd, altitude);
m_sunDir = bx::mul(dir, rot1);
}

View File

@@ -1046,7 +1046,7 @@ Srt toSrt(const void* _mtx)
void mtxFromSrt(float* _outMtx, const Srt& _srt)
{
mtxQuat(_outMtx, _srt.rotation);
mtxFromQuaternion(_outMtx, _srt.rotation);
store<Vec3>(&_outMtx[0], mul(load<Vec3>(&_outMtx[0]), _srt.scale.x) );
store<Vec3>(&_outMtx[4], mul(load<Vec3>(&_outMtx[4]), _srt.scale.y) );