added z/s keys to reset/step rotation

This commit is contained in:
Brian 2007-11-16 15:18:30 -07:00
parent fb69fe58a0
commit 8211b20026
1 changed files with 12 additions and 2 deletions

View File

@ -106,8 +106,12 @@ Redisplay(void)
static void
Idle(void)
{
Zrot = glutGet(GLUT_ELAPSED_TIME) * 0.0005;
glutPostRedisplay();
if (anim) {
Zrot = glutGet(GLUT_ELAPSED_TIME) * 0.0005;
glutPostRedisplay();
}
else
abort();
}
@ -149,6 +153,12 @@ Key(unsigned char key, int x, int y)
else
glutIdleFunc(NULL);
break;
case 'z':
Zrot = 0;
break;
case 's':
Zrot += 0.05;
break;
case 27:
CleanUp();
exit(0);