mirror of
https://github.com/SMGCommunity/Petari.git
synced 2026-11-10 12:51:40 -10:00
14 lines
467 B
C++
14 lines
467 B
C++
#pragma once
|
|
|
|
#include "Game/Util/MathUtil.hpp"
|
|
#include <JSystem/JGeometry.hpp>
|
|
|
|
namespace MR {
|
|
inline void getUpVecFromQuat(TVec3f* pOut, const TQuat4f& rQuat) {
|
|
pOut->set< f32 >((2.0f * (rQuat.x * rQuat.y)) - (2.0f * (rQuat.w * rQuat.z)),
|
|
((1.0f - (2.0f * (rQuat.x * rQuat.x))) - (2.0f * (rQuat.z * rQuat.z))),
|
|
((2.0f * (rQuat.y * rQuat.z)) + (2.0f * (rQuat.w * rQuat.x))));
|
|
}
|
|
|
|
}; // namespace MR
|