src/types/matrix.cpp

changeset 1151
0eddb5bcf25b
parent 1072
9ce9496427f2
child 1159
6ad8cdcd88d9
--- a/src/types/matrix.cpp	Sat Feb 18 02:02:29 2017 +0200
+++ b/src/types/matrix.cpp	Mon Feb 20 07:56:21 2017 +0200
@@ -250,4 +250,15 @@
 int Matrix::ConstRowView::row()
 {
 	return _row;
-}
\ No newline at end of file
+}
+
+Matrix Matrix::fromRotationMatrix(const GLRotationMatrix& rotationMatrix)
+{
+	Matrix result;
+
+	for (int i = 0; i < 3; ++i)
+	for (int j = 0; j < 3; ++j)
+		result(i, j) = rotationMatrix(i, j);
+
+	return result;
+}

mercurial