x-axis, to get a better view of the model
git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1264
7f0cb862-5218-0410-a997-
914c9d46530a
- <tt>q Q </tt> Quit
- <tt>i I </tt> Show info
- <tt>p P </tt> Toggle perspective or orthographic projection
- <tt>q Q </tt> Quit
- <tt>i I </tt> Show info
- <tt>p P </tt> Toggle perspective or orthographic projection
+ - <tt>r R </tt> Toggle fixed or animated rotation around model X-axis
- <tt>= + </tt> Increase \a slices
- <tt>- _ </tt> Decreate \a slices
- <tt>, < </tt> Decreate \a stacks
- <tt>= + </tt> Increase \a slices
- <tt>- _ </tt> Decreate \a slices
- <tt>, < </tt> Decreate \a stacks
static GLboolean show_info = GL_TRUE;
static float ar;
static GLboolean persProject = GL_TRUE;
static GLboolean show_info = GL_TRUE;
static float ar;
static GLboolean persProject = GL_TRUE;
+static GLboolean animateXRot = GL_FALSE;
/*
* These one-liners draw particular objects, fetching appropriate
/*
* These one-liners draw particular objects, fetching appropriate
{
const double t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
const double a = t*90.0;
{
const double t = glutGet(GLUT_ELAPSED_TIME) / 1000.0;
const double a = t*90.0;
+ const double b = (animateXRot?t:1)*60.0;
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glPushMatrix();
glTranslated(0,1.2,-6);
glPushMatrix();
glTranslated(0,1.2,-6);
glRotated(a,0,0,1);
table [function_index].solid ();
glPopMatrix();
glPushMatrix();
glTranslated(0,-1.2,-6);
glRotated(a,0,0,1);
table [function_index].solid ();
glPopMatrix();
glPushMatrix();
glTranslated(0,-1.2,-6);
glRotated(a,0,0,1);
table [function_index].wire ();
glPopMatrix();
glRotated(a,0,0,1);
table [function_index].wire ();
glPopMatrix();
case 'P':
case 'p': persProject=!persProject; break;
case 'P':
case 'p': persProject=!persProject; break;
+ case 'R':
+ case 'r': animateXRot=!animateXRot; break;
+