mirror of
https://github.com/orange-cpp/omath.git
synced 2026-02-13 15:03:27 +00:00
removed method from Mat added method for unity
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user