diff options
author | eray orçunus <erayorcunus@gmail.com> | 2019-10-04 00:18:47 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2019-10-04 00:18:47 +0200 |
commit | 6b4f6e05e2612af715246de58c28128d358b6916 (patch) | |
tree | dc2490e7fd6dc7123991840401048c06da6cd3ec /src/math | |
parent | Merge branch 'master' of git://github.com/GTAmodding/re3 into erorcun (diff) | |
parent | Fixed disappearing ammo count (diff) | |
download | re3-6b4f6e05e2612af715246de58c28128d358b6916.tar re3-6b4f6e05e2612af715246de58c28128d358b6916.tar.gz re3-6b4f6e05e2612af715246de58c28128d358b6916.tar.bz2 re3-6b4f6e05e2612af715246de58c28128d358b6916.tar.lz re3-6b4f6e05e2612af715246de58c28128d358b6916.tar.xz re3-6b4f6e05e2612af715246de58c28128d358b6916.tar.zst re3-6b4f6e05e2612af715246de58c28128d358b6916.zip |
Diffstat (limited to '')
-rw-r--r-- | src/math/Matrix.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/math/Matrix.h b/src/math/Matrix.h index 5a3473ad..5145f0ac 100644 --- a/src/math/Matrix.h +++ b/src/math/Matrix.h @@ -204,6 +204,22 @@ public: m_matrix.at.y = 0.0f; m_matrix.at.z = 1.0f; } + void SetRotateZOnlyScaled(float angle, float scale) { + float c = Cos(angle); + float s = Sin(angle); + + m_matrix.right.x = c * scale; + m_matrix.right.y = s * scale; + m_matrix.right.z = 0.0f; + + m_matrix.up.x = -s * scale; + m_matrix.up.y = c * scale; + m_matrix.up.z = 0.0f; + + m_matrix.at.x = 0.0f; + m_matrix.at.y = 0.0f; + m_matrix.at.z = scale; + } void SetRotateZ(float angle){ SetRotateZOnly(angle); m_matrix.pos.x = 0.0f; |