|
-
Dec 19th, 2002, 05:42 AM
#1
Thread Starter
New Member
Open GL rotating problem
Hello
I am doing something in Open GL and here is my problem:
I've got polygon rotating around z-axis and I want it to stop rotating at 60 degrees and then return it back to stating point.
How could i do this:
here is the code:
float angle= 1.0;
.......
glPushMatrix();
glTranslatef(-50,0.0,0.0);
glRotatef(-angle,0.0,0.0,0.1);
glBegin(GL_QUADS);
glColor3f(0,0,0); glVertex3f(0.0f, 10.0f, -10.0f);
glColor3f(0,0,0); glVertex3f(0.0f, 10.0f, 10.0f);
glColor3f(0,0,0); glVertex3f( 50.0f, 10.0f, 10.0f);
glColor3f(0,0,0); glVertex3f( 50.0f, 10.0f, -10.0f); glEnd();
glPopMatrix();
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|