rayzor
diff src/vmathmat.h @ 17:79609d482762
the renderer renders, also fixed an unnoticed matrix conversion problem between scenegraph and min3d
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 14 Apr 2014 07:34:45 +0300 |
parents | 964f8ea5f095 |
children |
line diff
1.1 --- a/src/vmathmat.h Sun Apr 13 09:54:51 2014 +0300 1.2 +++ b/src/vmathmat.h Mon Apr 14 07:34:45 2014 +0300 1.3 @@ -130,4 +130,12 @@ 1.4 *this = *this * m; 1.5 } 1.6 1.7 +inline Matrix4x4 normal_matrix(const Matrix4x4 &m) 1.8 +{ 1.9 + return Matrix4x4(m[0][0], m[0][1], m[0][2], 0, 1.10 + m[1][0], m[1][1], m[1][2], 0, 1.11 + m[2][0], m[2][1], m[2][2], 0, 1.12 + m[3][0], m[3][1], m[3][2], 1); 1.13 +} 1.14 + 1.15 #endif // VMATH_MATRIX_H_