Fix Mtx_RotateX/Z to use standard mathematical convention (positive=CCW)
This commit is contained in:
parent
1e9e8ead11
commit
7d42b57289
@ -32,6 +32,6 @@ void Mtx_PerspStereoTilt(C3D_Mtx* mtx, float fovx, float invaspect, float near,
|
||||
// Translate to screen plane
|
||||
Mtx_Translate(mtx, 0, iod/2, 0);
|
||||
|
||||
// Rotate the matrix one quarter of a turn CCW in order to fix the 3DS screens' orientation
|
||||
Mtx_RotateZ(mtx, M_TAU/4, true);
|
||||
// Rotate the matrix one quarter of a turn clockwise in order to fix the 3DS screens' orientation
|
||||
Mtx_RotateZ(mtx, -M_TAU/4, true);
|
||||
}
|
||||
|
@ -39,6 +39,6 @@ void Mtx_PerspTilt(C3D_Mtx* mtx, float fovx, float invaspect, float near, float
|
||||
mp2.r[2].w = -0.5;
|
||||
Mtx_Multiply(mtx, &mp2, &mp);
|
||||
|
||||
// Rotate the matrix one quarter of a turn CCW in order to fix the 3DS screens' orientation
|
||||
Mtx_RotateZ(mtx, M_TAU/4, true);
|
||||
// Rotate the matrix one quarter of a turn clockwise in order to fix the 3DS screens' orientation
|
||||
Mtx_RotateZ(mtx, -M_TAU/4, true);
|
||||
}
|
||||
|
@ -10,8 +10,8 @@ void Mtx_RotateX(C3D_Mtx* mtx, float angle, bool bRightSide)
|
||||
Mtx_Zeros(&rm);
|
||||
rm.r[0].x = 1.0f;
|
||||
rm.r[1].y = cosAngle;
|
||||
rm.r[1].z = sinAngle;
|
||||
rm.r[2].y = -sinAngle;
|
||||
rm.r[1].z = -sinAngle;
|
||||
rm.r[2].y = sinAngle;
|
||||
rm.r[2].z = cosAngle;
|
||||
rm.r[3].w = 1.0f;
|
||||
|
||||
|
@ -9,8 +9,8 @@ void Mtx_RotateZ(C3D_Mtx* mtx, float angle, bool bRightSide)
|
||||
|
||||
Mtx_Zeros(&rm);
|
||||
rm.r[0].x = cosAngle;
|
||||
rm.r[0].y = sinAngle;
|
||||
rm.r[1].x = -sinAngle;
|
||||
rm.r[0].y = -sinAngle;
|
||||
rm.r[1].x = sinAngle;
|
||||
rm.r[1].y = cosAngle;
|
||||
rm.r[2].z = 1.0f;
|
||||
rm.r[3].w = 1.0f;
|
||||
|
Loading…
Reference in New Issue
Block a user