Sign in to follow this  
franc82

finding cube coordinates

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this