mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-03 20:40:35 +00:00
AngAxis toEuler
Add Euler set and to functions to AngAxis. Removes the need to use a matrix
This commit is contained in:
parent
a4e2bfe34e
commit
5527207805
3 changed files with 72 additions and 5 deletions
|
|
@ -54,16 +54,14 @@
|
|||
|
||||
inline AngAxisF mEulDegToAng(EulerF euler)
|
||||
{
|
||||
MatrixF tempMat = MatrixF(euler * M_PI_F / 180.0f, Point3F::Zero);
|
||||
AngAxisF angAx = AngAxisF(tempMat);
|
||||
AngAxisF angAx;
|
||||
angAx.set(euler * M_PI_F / 180.0f);
|
||||
return angAx;
|
||||
}
|
||||
|
||||
inline EulerF mAngToEul(AngAxisF angAx)
|
||||
{
|
||||
MatrixF tempMat;
|
||||
angAx.setMatrix(&tempMat);
|
||||
EulerF euler = tempMat.toEuler();
|
||||
EulerF euler = angAx.toEuler();
|
||||
euler *= 180.0f / M_PI_F;
|
||||
return euler;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue