Skip to content

Commit

Permalink
Revert Matrix44's CreateFromYawPitchRoll method to use the approach p…
Browse files Browse the repository at this point in the history
…reviously taken.
  • Loading branch information
sungiant committed Jan 16, 2022
1 parent ff525ce commit 8a7801c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions source/abacus/gen/main/Matrix44.t4
Original file line number Diff line number Diff line change
Expand Up @@ -473,13 +473,9 @@

// Angle of rotation, in radians. Angles are measured anti-clockwise when viewed from the rotation axis (positive side) toward the origin.
<#Inl();#>public static void CreateFromYawPitchRoll (ref <#=T#> yaw, ref <#=T#> pitch, ref <#=T#> roll, out Matrix44 r) {
<#=T#> cy = Maths.Cos (yaw), sy = Maths.Sin (yaw);
<#=T#> cx = Maths.Cos (pitch), sx = Maths.Sin (pitch);
<#=T#> cz = Maths.Cos (roll), sz = Maths.Sin (roll);
r.R0C0 = cz*cy+sz*sx*sy; r.R0C1 = sz*cx; r.R0C2 = -cz*sy+sz*sx*cy; r.R0C3 = 0;
r.R1C0 = -sz*cy+cz*sx*sy; r.R1C1 = cz*cx; r.R1C2 = -cz*sy+sz*sx*cy; r.R1C3 = 0;
r.R2C0 = cx*sy; r.R2C1 = -sx; r.R2C2 = cx*cy; r.R2C3 = 0;
r.R3C0 = 0; r.R3C1 = 0; r.R3C2 = 0; r.R3C3 = 1;
Quaternion quaternion;
Quaternion.CreateFromYawPitchRoll(ref yaw, ref pitch, ref roll, out quaternion);
CreateFromQuaternion(ref quaternion, out r);
}

// http://msdn.microsoft.com/en-us/library/bb205351(v=vs.85).aspx
Expand Down

0 comments on commit 8a7801c

Please sign in to comment.