summaryrefslogtreecommitdiffstats
path: root/src/math/Matrix.h
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-07 18:36:55 +0200
committeraap <aap@papnet.eu>2019-07-07 18:36:55 +0200
commitc1f3ce8cceb675a9c76b4dc4e7cdfb18b17c4f2f (patch)
tree03233dd562394ce53c3a0024d7f9dfe71d722ac8 /src/math/Matrix.h
parentthe great reorganization (diff)
downloadre3-c1f3ce8cceb675a9c76b4dc4e7cdfb18b17c4f2f.tar
re3-c1f3ce8cceb675a9c76b4dc4e7cdfb18b17c4f2f.tar.gz
re3-c1f3ce8cceb675a9c76b4dc4e7cdfb18b17c4f2f.tar.bz2
re3-c1f3ce8cceb675a9c76b4dc4e7cdfb18b17c4f2f.tar.lz
re3-c1f3ce8cceb675a9c76b4dc4e7cdfb18b17c4f2f.tar.xz
re3-c1f3ce8cceb675a9c76b4dc4e7cdfb18b17c4f2f.tar.zst
re3-c1f3ce8cceb675a9c76b4dc4e7cdfb18b17c4f2f.zip
Diffstat (limited to 'src/math/Matrix.h')
-rw-r--r--src/math/Matrix.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/math/Matrix.h b/src/math/Matrix.h
index 6e1001cb..5cc7d12f 100644
--- a/src/math/Matrix.h
+++ b/src/math/Matrix.h
@@ -306,6 +306,15 @@ Multiply3x3(const CMatrix &mat, const CVector &vec)
mat.m_matrix.right.z * vec.x + mat.m_matrix.up.z * vec.y + mat.m_matrix.at.z * vec.z);
}
+inline CVector
+Multiply3x3(const CVector &vec, const CMatrix &mat)
+{
+ return CVector(
+ mat.m_matrix.right.x * vec.x + mat.m_matrix.right.y * vec.y + mat.m_matrix.right.z * vec.z,
+ mat.m_matrix.up.x * vec.x + mat.m_matrix.up.y * vec.y + mat.m_matrix.up.z * vec.z,
+ mat.m_matrix.at.x * vec.x + mat.m_matrix.at.y * vec.y + mat.m_matrix.at.z * vec.z);
+}
+
class CCompressedMatrixNotAligned
{
CVector m_vecPos;