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

View File

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