summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2008-08-19 09:32:24 +0200
committerDanny Baumann <dannybaumann@web.de>2008-08-19 09:32:24 +0200
commit13c2fbf3d585b8f0f916befbd7a0b1da9380d707 (patch)
treee3637ef67bcd8b63057ef9e6e5a0cb66158d5738
parent76b7ea9f795be57534257431de5748dfc0e58fc4 (diff)
downloadcompiz-with-glib-mainloop-13c2fbf3d585b8f0f916befbd7a0b1da9380d707.tar.gz
compiz-with-glib-mainloop-13c2fbf3d585b8f0f916befbd7a0b1da9380d707.tar.bz2
Added missing file.
-rw-r--r--include/compmatrix.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/include/compmatrix.h b/include/compmatrix.h
new file mode 100644
index 0000000..71db9ea
--- /dev/null
+++ b/include/compmatrix.h
@@ -0,0 +1,38 @@
+#ifndef _COMPMATRIX_H
+#define _COMPMATRIX_H
+
+#include <compvector.h>
+
+class CompMatrix {
+ public:
+ CompMatrix ();
+
+ const float* getMatrix () const;
+
+ CompMatrix& operator*= (const CompMatrix& rhs);
+
+ void reset ();
+ void toScreenSpace (CompOutput *output, float z);
+
+ void rotate (const float angle, const float x,
+ const float y, const float z);
+ void rotate (const float angle, const CompVector& vector);
+
+ void scale (const float x, const float y, const float z);
+ void scale (const CompVector& vector);
+
+ void translate (const float x, const float y, const float z);
+ void translate (const CompVector& vector);
+
+ private:
+ friend CompMatrix operator* (const CompMatrix& lhs,
+ const CompMatrix& rhs);
+ friend CompVector operator* (const CompMatrix& lhs,
+ const CompVector& rhs);
+
+ float m[16];
+};
+
+typedef CompMatrix CompTransform;
+
+#endif