improved openg gl rotation matrix, added tests

This commit is contained in:
2025-04-16 19:11:02 +03:00
parent 2bface1c49
commit 06b891c827
3 changed files with 75 additions and 9 deletions

View File

@@ -33,7 +33,7 @@ namespace omath::opengl_engine
Mat4x4 RotationMatrix(const ViewAngles& angles)
{
return MatRotationAxisZ<float, MatStoreType::COLUMN_MAJOR>(angles.roll) *
MatRotationAxisY<float, MatStoreType::COLUMN_MAJOR>(angles.yaw) *
MatRotationAxisY<float, MatStoreType::COLUMN_MAJOR>(-angles.yaw) *
MatRotationAxisX<float, MatStoreType::COLUMN_MAJOR>(-angles.pitch);
}
Mat4x4 CalcPerspectiveProjectionMatrix(const float fieldOfView, const float aspectRatio, const float near,