removed method from Mat added method for unity

This commit is contained in:
2025-04-16 17:52:19 +03:00
parent 7873047550
commit 592a98f38c
7 changed files with 22 additions and 18 deletions

View File

@@ -16,6 +16,9 @@ namespace omath::iw_engine
[[nodiscard]]
Vector3<float> UpVector(const ViewAngles& angles);
[[nodiscard]]
Mat4x4 RotationMatrix(const ViewAngles& angles);
[[nodiscard]] Mat4x4 CalcViewMatrix(const ViewAngles& angles, const Vector3<float>& cam_origin);

View File

@@ -12,7 +12,6 @@ namespace omath::source_engine
[[nodiscard]]
Mat4x4 RotationMatrix(const ViewAngles& angles);
[[nodiscard]]
Vector3<float> RightVector(const ViewAngles& angles);
@@ -21,9 +20,6 @@ namespace omath::source_engine
[[nodiscard]] Mat4x4 CalcViewMatrix(const ViewAngles& angles, const Vector3<float>& cam_origin);
[[nodiscard]]
Mat4x4 CalcPerspectiveProjectionMatrix(float fieldOfView, float aspectRatio, float near, float far);
} // namespace omath::source

View File

@@ -18,6 +18,8 @@ namespace omath::unity_engine
[[nodiscard]] Mat4x4 CalcViewMatrix(const ViewAngles& angles, const Vector3<float>& cam_origin);
[[nodiscard]]
Mat4x4 RotationMatrix(const ViewAngles& angles);
[[nodiscard]]
Mat4x4 CalcPerspectiveProjectionMatrix(float fieldOfView, float aspectRatio, float near, float far);

View File

@@ -428,13 +428,6 @@ namespace omath
} * MatTranslation<Type, St>(-cameraOrigin);
}
template<class Type = float, MatStoreType St = MatStoreType::ROW_MAJOR, class ViewAngles>
[[nodiscard]]
Mat<4, 4, Type, St> MatRotation(const ViewAngles& angles) noexcept
{
return MatRotationAxisZ(angles.yaw) * MatRotationAxisY(angles.pitch) * MatRotationAxisX(angles.roll);
}
template<class Type = float, MatStoreType St = MatStoreType::ROW_MAJOR>
[[nodiscard]]
Mat<4, 4, Type, St> MatPerspectiveLeftHanded(const float fieldOfView, const float aspectRatio, const float near,