Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU 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 Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * Contributor(s): Tao Ju 00019 * 00020 * ***** END GPL LICENSE BLOCK ***** 00021 */ 00022 00023 #include <math.h> 00024 #include "Projections.h" 00025 00026 const int vertmap[8][3] = { 00027 {0, 0, 0}, 00028 {0, 0, 1}, 00029 {0, 1, 0}, 00030 {0, 1, 1}, 00031 {1, 0, 0}, 00032 {1, 0, 1}, 00033 {1, 1, 0}, 00034 {1, 1, 1} 00035 }; 00036 00037 const int centmap[3][3][3][2] = { 00038 {{{0, 0}, {0, 1}, {1, 1}}, 00039 {{0, 2}, {0, 3}, {1, 3}}, 00040 {{2, 2}, {2, 3}, {3, 3}} 00041 }, 00042 00043 {{{0, 4}, {0, 5}, {1, 5}}, 00044 {{0, 6}, {0, 7}, {1, 7}}, 00045 {{2, 6}, {2, 7}, {3, 7}} 00046 }, 00047 00048 {{{4, 4}, {4, 5}, {5, 5}}, 00049 {{4, 6}, {4, 7}, {5, 7}}, 00050 {{6, 6}, {6, 7}, {7, 7}} 00051 } 00052 }; 00053 00054 const int edgemap[12][2] = { 00055 {0, 4}, 00056 {1, 5}, 00057 {2, 6}, 00058 {3, 7}, 00059 {0, 2}, 00060 {1, 3}, 00061 {4, 6}, 00062 {5, 7}, 00063 {0, 1}, 00064 {2, 3}, 00065 {4, 5}, 00066 {6, 7} 00067 }; 00068 00069 const int facemap[6][4] = { 00070 {0, 1, 2, 3}, 00071 {4, 5, 6, 7}, 00072 {0, 1, 4, 5}, 00073 {2, 3, 6, 7}, 00074 {0, 2, 4, 6}, 00075 {1, 3, 5, 7} 00076 };