baconbeastnz

10-06-2008, 06:47 PM

My modelview matrix is currently:

1 0 0 0

0 cos45 -sin45 0

0 sin45 cos45 0

0 0 0 0

Now I call glTranslate(0,2,0) and multiply the above matrix with the below one.

1000

0101

0010

0001

I can figure out the first 3x3 block which is just

1 0 0

0 cos45 -sin45 0

0 sin45 cos45 0

But how do I figure out the right most column ( the translation values)

1 0 0 0

0 cos45 -sin45 0

0 sin45 cos45 0

0 0 0 0

Now I call glTranslate(0,2,0) and multiply the above matrix with the below one.

1000

0101

0010

0001

I can figure out the first 3x3 block which is just

1 0 0

0 cos45 -sin45 0

0 sin45 cos45 0

But how do I figure out the right most column ( the translation values)