3x3 rotation matrix to 4x4?
Ok, in my previous post:
http://www.gamedev.net/community/forums/topic.asp?topic_id=63943
I couldnt figure it out, but in all the code i can find on the net they just read that info into a 3x3 matrix and that is the transformation matrix.
So say i fill up a 3x3 amtrix with this transform info, how would i use that with ad3d 4x4 matrix?
just fill in the 4x4 from [0-2][0-2] and then set the rest 0 (except the corner one, [4][4]?)
ByteMe95::~ByteMe95()
Cerebrum Software
quote:Original post by ByteMe95
just fill in the 4x4 from [0-2][0-2] and then set the rest 0 (except the corner one, [4][4]?)
I''m not sure if that''s correct (), but it is what I do when I convert quaternions to a 4x4 matrix. It seems to work just fine for me.
[Resist Windows XP''s Invasive Production Activation Technology!]
It is correct. It has the effect of maintainin scale, though for efficiency you would like to place your tranlation values along the bottom row (in a row-major matrix). ie, [3][0-2] = {tx, ty, tz} (where tx, ty and tz are x- y- and z-axis translation values respectively).
I know this is a typo, but the corner element is [3][3], not [4][4].
I know this is a typo, but the corner element is [3][3], not [4][4].
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement