00001 /*************************************************************************** 00002 cubedecoration.h 00003 ------------------- 00004 copyright : (C) 2004 by Jos van den Oever 00005 email : jos@vandenoever.info 00006 ***************************************************************************/ 00007 00008 /*************************************************************************** 00009 * * 00010 * This program is free software; you can redistribute it and/or modify * 00011 * it under the terms of the GNU General Public License as published by * 00012 * the Free Software Foundation; either version 2 of the License, or * 00013 * (at your option) any later version. * 00014 * * 00015 ***************************************************************************/ 00016 #ifndef CUBEDECORATION_H 00017 #define CUBEDECORATION_H 00018 #include "rotenums.h" 00019 00020 /* A cube decoration simply holds for the decoration of an original cube 00021 in a cubetest question. A cube has 6 sides. Each side has a decoration. 00022 When unfolded, a cube would look like this: 00023 2 00024 4015 00025 3 00026 The numbers relate to the positions in the arrays in this class. 00027 The array sym holds the symmetry of each side decoration. The array type 00028 holds the type of drawing. This is simply an enumeration. A side of type 1 00029 and symmettry C1 has a different decoration than a side of symmetry C1 and 00030 type 2. In effect, these arrays contain the only important information for 00031 the question and this information is generated by the QuestionGenerator 00032 class. 00033 00034 The other fields default to 0 and may be used by the QuestionLibrary class. 00035 */ 00036 00037 class CubeDecoration { 00038 public: 00039 Symmetry sym[6]; 00040 short type[6]; 00041 Rotation siderot[6]; 00042 bool operator==(const CubeDecoration &) const; 00043 short orientation; 00044 }; 00045 00046 #endif