QUOTE(isam @ 11/25/07, 12:29 PM) [snapback]276946[/snapback]
ok got it! if anyone's interested, u place the x y in the last line of the matrix, the rest of the matrix is the identity matrix,, and just multiply matrices
Please dont do that. A point vector is a 1x4 matrix all ready and works quite correctly in multiplication directly, No need to convert anything to a matrix. (waste of time)
the mPoint (read the docs of MPoint, it also offers the other way around, in wich case its trasposed) class directly multiplies with matrices.
so basically its just.
MPoint*MMatrix
(should be that way i never remember which way is which, usually i think that the notation in matrix math is inverse to natural reading order)
And that is called point matrix multiplication because it quite clearly is point times matrix. Basically the transformation matrix just packs the information of your coordinate system.
theres a related function to this which is
MVector*MMatrix
which does the same, almost (difference is that the last value of the 4 dimensional vector the last value of a point is 1 and a vector is 0 this means MPoint works like your matrix and is fully affected, whereas the Vector does only scale and rotate but does not offset), theres a 3rd class of 3d "vectors" the normal wich you shouldnt try to transform with a matrix it will fail at peculiar moments.
I suggest you read the lore of a TD section, chapter 1.1 basic computer graphics, of this document:
http://www.renderman.org/RMR/Books/sig02.course16.pdf.gz
it covers most of all the maths you NEED to know. And s very well written IMHO. Anyway the site was temporarily down. If it keeps being down i do have a copy of the pdf on my drive, so send me PM and i will upload it somewhere where you can get it from. You may find the document a invaluable aid in thinking.
PS: maya does provide a node that lets you do this too so your node dont necceserily need to do this itself.