private static void DisplayCubeRotation() { CubeRotationEventArgs curCRArgs = crArgs.Peek(); Gl.glMatrixMode(Gl.GL_MODELVIEW); Gl.glPushMatrix(); double direction = 1.0; if (curCRArgs.CR.Anticlockwise) { direction = -1.0; } if (curCRArgs.CR.X) { Gl.glRotated(angle, -direction, 0, 0); } else if (curCRArgs.CR.Y) { Gl.glRotated(angle, 0, -direction, 0); } else { Gl.glRotated(angle, 0, 0, -direction); } Display(); Gl.glPopMatrix(); AngleIncrementation(90.0); }
private static void rc_CubeRotationEvent(object sender, CubeRotationEventArgs args) { //throw new NotImplementedException(); //crArgs = args; //rcPrev = new RubiksCube((RubiksCube)sender); crArgs.Enqueue(args); rcOld.Enqueue(new RubiksCube((RubiksCube)sender)); isERArgs.Enqueue(false); if (rcOld.Count == 1) { Glut.glutDisplayFunc(DisplayCubeRotation); } Glut.glutPostRedisplay(); //Glut.glutMainLoopEvent(); }