[Scummvm-git-logs] scummvm master -> 5fa8082dcb4bb44d529a7e78cc464e448c87e3be
aquadran
aquadran at gmail.com
Tue Nov 2 09:06:31 UTC 2021
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5fa8082dcb MATH: Change Vector argument in [un]project to const reference
Commit: 5fa8082dcb4bb44d529a7e78cc464e448c87e3be
https://github.com/scummvm/scummvm/commit/5fa8082dcb4bb44d529a7e78cc464e448c87e3be
Author: Orgad Shaneh (orgads at gmail.com)
Date: 2021-11-02T10:06:28+01:00
Commit Message:
MATH: Change Vector argument in [un]project to const reference
Changed paths:
math/glmath.cpp
math/glmath.h
diff --git a/math/glmath.cpp b/math/glmath.cpp
index 638d095f51..865f3c8b08 100644
--- a/math/glmath.cpp
+++ b/math/glmath.cpp
@@ -25,7 +25,7 @@
namespace Math {
// function based on gluUnProject from Mesa 5.0 glu GPLv2+ licensed sources
-bool gluMathUnProject(Vector3d win, const Matrix4 &mvpMatrix, const Common::Rect &viewport, Vector3d &obj) {
+bool gluMathUnProject(const Vector3d &win, const Matrix4 &mvpMatrix, const Common::Rect &viewport, Vector3d &obj) {
Matrix4 A;
Vector4d in, out;
diff --git a/math/glmath.h b/math/glmath.h
index 38be350304..a930ab716b 100644
--- a/math/glmath.h
+++ b/math/glmath.h
@@ -32,7 +32,7 @@ namespace Math {
// function based on gluProject from Mesa 5.0 glu GPLv2+ licensed sources
template<typename T, typename S>
-bool gluMathProject(Vector3d obj, const T model[16], const T proj[16], const S viewport[4], Vector3d &win) {
+bool gluMathProject(const Vector3d &obj, const T model[16], const T proj[16], const S viewport[4], Vector3d &win) {
Vector4d in, out;
Matrix4 modelMatrix, projMatrix;
@@ -65,7 +65,7 @@ bool gluMathProject(Vector3d obj, const T model[16], const T proj[16], const S v
return true;
}
-bool gluMathUnProject(Vector3d win, const Matrix4 &mvpMatrix, const Common::Rect &viewport, Vector3d &obj);
+bool gluMathUnProject(const Vector3d &win, const Matrix4 &mvpMatrix, const Common::Rect &viewport, Vector3d &obj);
Matrix4 makePerspectiveMatrix(double fovy, double aspect, double zNear, double zFar);
Matrix4 makeFrustumMatrix(double left, double right, double bottom, double top, double zNear, double zFar);
More information about the Scummvm-git-logs
mailing list