Conversions

Commit from Azaezel to fix the naming of inspector fields.
TypeMatrixField still messes around on first responder, we know these functions convert angAxis to eul properly and from eul to angAxis but when the data comes to TypeMatrix it changes.... weird issue is weird.
This commit is contained in:
marauder2k7 2023-06-11 21:59:03 +01:00
parent 92920dbcd9
commit cbe2bd4c7b
7 changed files with 146 additions and 53 deletions

View file

@ -52,4 +52,20 @@
#include "math/mRotation.h"
#endif
inline AngAxisF mEulDegToAng(EulerF euler)
{
MatrixF tempMat = MatrixF(euler * M_PI_F / 180.0f, Point3F::Zero);
AngAxisF angAx = AngAxisF(tempMat);
return angAx;
}
inline EulerF mAngToEul(AngAxisF angAx)
{
MatrixF tempMat;
angAx.setMatrix(&tempMat);
EulerF euler = tempMat.toEuler();
euler *= 180.0f / M_PI_F;
return euler;
}
#endif //_MMATH_H_