summaryrefslogtreecommitdiffstats
path: root/src/math/Matrix.h
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-06-01 17:35:04 +0200
committereray orçunus <erayorcunus@gmail.com>2020-06-01 17:35:04 +0200
commitabef04c6376cb45946ea363df20fbe6473a2252c (patch)
treedaa75bd4ac0ae3337b75b2484472139b77abf8a2 /src/math/Matrix.h
parentDrawStandardMenus, VC menu array and minor fixes (diff)
parenthanim fix (diff)
downloadre3-abef04c6376cb45946ea363df20fbe6473a2252c.tar
re3-abef04c6376cb45946ea363df20fbe6473a2252c.tar.gz
re3-abef04c6376cb45946ea363df20fbe6473a2252c.tar.bz2
re3-abef04c6376cb45946ea363df20fbe6473a2252c.tar.lz
re3-abef04c6376cb45946ea363df20fbe6473a2252c.tar.xz
re3-abef04c6376cb45946ea363df20fbe6473a2252c.tar.zst
re3-abef04c6376cb45946ea363df20fbe6473a2252c.zip
Diffstat (limited to 'src/math/Matrix.h')
-rw-r--r--src/math/Matrix.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/math/Matrix.h b/src/math/Matrix.h
index 9979e701..46789c94 100644
--- a/src/math/Matrix.h
+++ b/src/math/Matrix.h
@@ -130,13 +130,18 @@ public:
{
float *pFloatMatrix = (float*)&m_matrix;
for (int i = 0; i < 3; i++)
-#ifdef FIX_BUGS // BUGFIX from VC
for (int j = 0; j < 3; j++)
-#else
- for (int j = 0; j < 4; j++)
-#endif
pFloatMatrix[i * 4 + j] *= scale;
}
+ void Scale(float sx, float sy, float sz)
+ {
+ float *pFloatMatrix = (float*)&m_matrix;
+ for (int i = 0; i < 3; i++){
+ pFloatMatrix[i * 4 + 0] *= sx;
+ pFloatMatrix[i * 4 + 1] *= sy;
+ pFloatMatrix[i * 4 + 2] *= sz;
+ }
+ }
void SetRotateXOnly(float angle){
@@ -224,6 +229,7 @@ public:
void SetRotate(float xAngle, float yAngle, float zAngle);
void Rotate(float x, float y, float z);
void RotateX(float x);
+ void RotateY(float y);
void RotateZ(float z);
void Reorthogonalise(void);