PDA

View Full Version : How a matrix transforms a point?



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)

trinitrotoluene
10-06-2008, 07:12 PM
It seem you have posted the question twice. the answer is in this thread (http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=246823&Main=48161#Post246823)

baconbeastnz
10-07-2008, 12:25 AM
whoops this was supposed to be a different question, which I have now posted in the other thread.

Cheers.