finding cube coordinates
I would like to draw a cube. The coordinates of the vertices of the floor is : glVertex3f (-5.0f, 0.0f, 5.0f); glVertex3f ( 5.0f, 0.0f, 5.0f); glVertex3f ( 5.0f, 0.0f, -5.0f); glVertex3f (-5.0f, 0.0f, -5.0f); How can I find out the coordinates of the other faces?
You gave us the coordinates of a square (drawed with quads, which isn't recommanded btw you should use 2 triangles). Now you want to make a cube out of it? Expend the Y (second) parameter ranging from -5 to 5 keeping the same logic. You will need 6 times these 4 vertex call for all 6 faces.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement