improved openg gl rotation matrix, added tests

This commit is contained in:
2025-04-16 19:11:02 +03:00
parent 127bae0b78
commit 0069b8bd96
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,