Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I've been reading a lot about computer graphics lately and because of it I'm building my own math library's for fun. I was reading about Matrix Translation and Homogeneous Coords, and was wondering if these two both translate the x factor by 3.

{ 1, 0, 0, 3 } = { 1, 0, 0, 0 }
{ 0, 1, 0, 0 } = { 0, 1, 0, 0 }
{ 0, 0, 1, 0 } = { 0, 0, 1, 0 }
{ 0, 0, 0, 1 } = { 3, 0, 0, 1 }

I guess what i'm really asking is if I wanted to preform a translation would both of these be exceptible or only the first?

share|improve this question
    
First version = directX Second version = OpenGL –  Chris Condy Mar 5 '13 at 1:08
    
Untrue. Both APIs support both versions. –  Darth Satan Mar 5 '13 at 1:12

1 Answer 1

up vote 2 down vote accepted

Both are valid and the difference is that your first is a column-major translation matrix whereas your second is row-major. The difference lies in the order you multiply matrices and in how you perform the final position transform. I'd encourage you to research more on the terms "column-major" and "row-major" for further info.

share|improve this answer
    
Thanks, will do now that I have a word for it. Thanks again! :) –  Haywire Spark Mar 5 '13 at 1:29

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.