Matrices are my new best friends!

Started by
4 comments, last by Mithoric 19 years, 9 months ago
I had been avoiding matrices up until now because they looked strange and scary. However after browsing 100+ posts and articles on this site and opengl.org I decided that if I was going to make a camera class I'd probably have to learn matrices to follow any of those tutorials. In my travels over the web I found this website - matrices can be your friends - and I would recommend that anyone who doesn't understand matrices to have a look at it! How about that, I bet you don't see many people actually researching topics by themselves around here do you? [wink] ...
Advertisement
what? >_<
eh? what what?

I am building a camera class, I figured there is a lot of talk about quaternions so I may as well use them. Now the quaternion rotation matrix is [3][3] right, so does that mean that those values go into [0][1][2][4][5][6][8][9][10] in the [4][4] ([16]) OpenGL matrix?
[00][04][08][12] | [00][01][02][03]
[01][05][09][13] | [04][05][06][07]
[02][06][10][14] | [08][09][10][11]
[03][07][11][15] | [12][13][14][15]

Should be somewhere along the lines of this, depending on whether you're using column-major or row-major matrices.

I use 4x4 in my quaterion class, simply filling the none-used rows/columns with 1s & 0s as appropriate.

[X][X][X][0]
[X][X][X][0]
[X][X][X][0]
[0][0][0][1]

This way all vectors/matrices are 4D and I don't have to switch constantly.
How do I set my laser printer on stun?
I'm having the same problem, but I didn't understand that article at all. Even after the help on this site (and my own topic), matrices' practical use eludes me.
Thanks wildfire that's exctly what I was talking about! yay!
I was actually thinking about using a [4][4] in my class but I'm hardly up to the programming yet, I've still a few more articles to read and I've dug up a lot of code to have a look at.

This topic is closed to new replies.

Advertisement