Mercurial > hg > dmlib
changeset 281:9ba4f25abbce
Fix rotation matrix creation.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 11 Oct 2012 07:40:33 +0300 |
parents | 47f774734b88 |
children | 175328b20341 |
files | dmvecmat.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/dmvecmat.c Wed Oct 10 23:09:56 2012 +0300 +++ b/dmvecmat.c Thu Oct 11 07:40:33 2012 +0300 @@ -383,6 +383,8 @@ i = sx * sz, j = sx * cz; + memset(mat, 0, sizeof(DMMatrix)); + mat->m[0][0] = cy * cz; mat->m[0][1] = cy * sz; mat->m[0][2] = -sy; @@ -396,4 +398,6 @@ mat->m[2][0] = (sy * l) + i; mat->m[2][1] = (sy * q) - j; mat->m[2][2] = cx * cy; + + mat->m[3][3] = 1.0f; }