Skip to main content
gamedev.net
🔒 Locked

question about matrices

Started by Bino Sep 10, 2000 at 9:18 PM 4 replies 250+ views
Original Post
Bino
Bino
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?
Bino
Bino
c''mon I know someone on this board can help me!?
baskuenen
baskuenen
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 )

Bino
Bino
I wanna know what I have to do to translate my object using that matrix. p.s. This is my first time using matrices.
baskuenen
baskuenen
    
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...

Bino
Bino
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.