
[clip] >> Alright. It seems that 4x4 matrices may have a slight advantage. However, If I were to >>change my Matrix3 class (which is a 3x3 matrix) into a 4x4 matrix class, would I not also >>have to add another point in my Vector Class so that a vector could be multiplied by a >>matrix?? So, instead of having X,Y,Z in my Vector Class.. I would have, for instance, >>X,Y,Z,W.. so that the multiplites woudl work out. Let me know and then I will descide >>whether or not I should implement the changes. I hope to hear from you soon, ROME.
If you only want to use a matrix for transformations and rotations, then you can always assume your coord to be in the format X, Y, Z, W where W is always 1.
For example, suppose you have a vertex( or vector ) (X, Y, Z) then it will be (X, Y, Z, 1) before the multiplication by the matrix. After the multiplication, your vertex will be (X', Y', Z', 1 ).
Now, if you want to do some fancy stuff, like including a projection matrix, you cant do that. You'll be in homogeneous coordinate and W wont be equal to 1. There is many advantage of this techniques: the clipping is very easy in homogeneous coordinate( after you have a good understanding of the theory. ). Also, all the objectspace to screen to the canonical view can be done with only 1 matrix. It is a very efficient way of doing things.
The only problem is tranfroming a point from homogeneous coordinate to screen space. You have to divide X, Y Z by W. BUT, some accelerator card does that in hardware( like the voodoo 2&3).
I hope I'm clear enough. :) My english is far from perfect. If you have some others questions, I'll do my best. :)
