Newbie question

Started by
2 comments, last by Anfoa 24 years, 1 month ago
just one newbie question: how can I move a whole polygon, not just one vertex?
Advertisement
You do this by specifying a transform matrix that every vertex in the polygon will be transformed with.

What API are you using? OpenGL, DirectX or something else?
OpenGL of course

Then you''ll want to do this:

glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(x,y,z);

This way when you render the polygon all vertices will be moved by adding (x,y,z).





This topic is closed to new replies.

Advertisement