Advertisement

question about matrices

Started by September 10, 2000 09:18 PM
4 comments, last by Bino 24 years, 3 months ago
If I have a 4x4 translation matrix like this: float translateMatrix[4][4] = {{ 1.0, 0.0, 0.0, 5.0 }, { 0.0, 1.0, 0.0, 3.0 }, { 0.0, 0.0, 1.0, 0.0 }, { 0.0, 0.0, 0.0, 1.0 }}; What do I do after that. I''m using OpenGL so should I use the MultMatrix function or a for loop? What do I do and how do I do it?
c''mon I know someone on this board can help me!?
Advertisement
I''m sorry, but I don''t exactly understand your question. Could you rephrase it?

Do you want to multiply this matrix with another?

(ps: I bet more people on this board will be able to answer this )

I wanna know what I have to do to translate my object using that matrix. p.s. This is my first time using matrices.
    glMultMatrixf(translateMatrix);    


If you still don''t have a good help reference for OpenGL, you should get one! It''s unmissable. Also some good examples will help you...check out NeHe orso...

I found out what was wrong. I had my coordinates lined up wrong. They should have been going across, so that bottom row should look like this { 5.0, 3.0, 0.0, 1.0 }};

But thanks anyway,
Bino

This topic is closed to new replies.

Advertisement