Main Page   Class Hierarchy   Compound List   File List   Compound Members  

RubiksCube.h

00001 // A 3D simulation of Rubik's Cube using OpenGL.
00002 // Copyright (C) 2002  Martin Geisler <gimpster@gimpster.com>
00003 //
00004 // This program is free software; you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation; either version 2 of the License, or
00007 // (at your option) any later version.
00008 //
00009 // This program is distributed in the hope that it will be useful, but
00010 // WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00012 // General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU General Public License
00015 // along with this program; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 
00018 #ifndef RUBIKSCUBE_H
00019 #define RUBIKSCUBE_H
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 #include <GL/glut.h>
00026 #include "RoundedCube.h"
00027 
00030 class RubiksCube {
00031  private:
00032   RoundedCube *cubes[3][3][3];
00033   int rot_x[3], rot_y[3], rot_z[3];
00034   int total_x, total_y, total_z;
00035  public:
00037   RubiksCube();
00038 
00040   ~RubiksCube();
00041 
00045   void render();
00046 
00048   void rotateX(unsigned int block, int degrees);
00050   void rotateY(unsigned int block, int degrees);
00052   void rotateZ(unsigned int block, int degrees);
00053 };
00054 
00055 #endif

Generated on Wed Jan 23 17:53:15 2002 for rubik by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001