summaryrefslogtreecommitdiff
path: root/src/mesa/math
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@vmware.com>2009-01-14 23:33:41 +0000
committerAlan Hourihane <alanh@vmware.com>2009-01-14 23:33:41 +0000
commit658b1bdb1cc5f9910be910dc156a2e81ed999756 (patch)
tree98d15bcf83b662dd8c7186dd423e3d8ebbd87f1c /src/mesa/math
parente82784559e00cb534993c01309ad1832e9b3e56b (diff)
parent03188b09e071ace9d9e21ccc56c01e90c0fa8639 (diff)
Merge commit 'origin/master' into gallium-0.2
Conflicts: docs/install.html docs/relnotes-7.3.html src/mesa/shader/slang/slang_codegen.c src/mesa/shader/slang/slang_compile.c src/mesa/shader/slang/slang_emit.c src/mesa/shader/slang/slang_preprocess.c src/mesa/shader/slang/slang_preprocess.h
Diffstat (limited to 'src/mesa/math')
-rw-r--r--src/mesa/math/m_matrix.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/math/m_matrix.h b/src/mesa/math/m_matrix.h
index e8303f3ac5c..a8d9000e89b 100644
--- a/src/mesa/math/m_matrix.h
+++ b/src/mesa/math/m_matrix.h
@@ -189,6 +189,18 @@ do { \
} while (0)
+/**
+ * Transform a direction by a matrix.
+ */
+#define TRANSFORM_DIRECTION( TO, DIR, MAT ) \
+do { \
+ TO[0] = DIR[0] * MAT[0] + DIR[1] * MAT[4] + DIR[2] * MAT[8]; \
+ TO[1] = DIR[0] * MAT[1] + DIR[1] * MAT[5] + DIR[2] * MAT[9]; \
+ TO[2] = DIR[0] * MAT[2] + DIR[1] * MAT[6] + DIR[2] * MAT[10];\
+} while (0)
+
+
+
/*@}*/