- Fixed eulerAngle*** not consistent for right-handed coordinate system (#173)
This commit is contained in:
@@ -70,10 +70,10 @@ namespace glm
|
||||
T sinY = glm::sin(angleY);
|
||||
|
||||
return detail::tmat4x4<T, defaultp>(
|
||||
cosY, -sinX * sinY, cosX * sinY, T(0),
|
||||
T(0), cosX, sinX, T(0),
|
||||
-sinY, -sinX * cosY, cosX * cosY, T(0),
|
||||
T(0), T(0), T(0), T(1));
|
||||
cosY, -sinX * -sinY, cosX * -sinY, T(0),
|
||||
T(0), cosX, sinX, T(0),
|
||||
sinY, -sinX * cosY, cosX * cosY, T(0),
|
||||
T(0), T(0), T(0), T(1));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@@ -89,10 +89,10 @@ namespace glm
|
||||
T sinY = glm::sin(angleY);
|
||||
|
||||
return detail::tmat4x4<T, defaultp>(
|
||||
cosY, T(0), sinY, T(0),
|
||||
-sinX * sinY, cosX, sinX * cosY, T(0),
|
||||
-cosX * sinY, -sinX, cosX * cosY, T(0),
|
||||
T(0), T(0), T(0), T(1));
|
||||
cosY, 0, -sinY, T(0),
|
||||
sinY * sinX, cosX, cosY * sinX, T(0),
|
||||
sinY * cosX, -sinX, cosY * cosX, T(0),
|
||||
T(0), T(0), T(0), T(1));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
@@ -115,6 +115,26 @@ namespace glm
|
||||
return eulerAngleZ(angleZ) * eulerAngleX(angleX);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleYZ
|
||||
(
|
||||
T const & angleY,
|
||||
T const & angleZ
|
||||
)
|
||||
{
|
||||
return eulerAngleY(angleY) * eulerAngleZ(angleZ);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleZY
|
||||
(
|
||||
T const & angleZ,
|
||||
T const & angleY
|
||||
)
|
||||
{
|
||||
return eulerAngleZ(angleZ) * eulerAngleY(angleY);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tmat4x4<T, defaultp> eulerAngleYXZ
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user