Mercurial > pidgin.yaz
view gtk/plugins/crazychat/eye.c @ 15165:2c0e3ef91e37
[gaim-migrate @ 17950]
credit
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sun, 10 Dec 2006 23:32:28 +0000 |
parents | 009db0b357b5 |
children |
line wrap: on
line source
/* This file was produced by Deep Exploration Plugin: CPP Export filter. Deep Exploration Copyright (c) 1999-2003 Right Hemisphere, Inc WWW http://www.righthemisphere.com/dexp.htm eMail support@righthemisphere.com */ //#include <windows.h> #include <GL/gl.h> #include <GL/glu.h> #include <math.h> typedef struct sample_MATERIAL{ GLfloat ambient[3]; GLfloat diffuse[3]; GLfloat specular[3]; GLfloat emission[3]; GLfloat alpha; GLfloat phExp; int texture; } sample_MATERIAL; typedef struct sample_TEXTURE{ char * name; GLint id; } sample_TEXTURE; static sample_MATERIAL materials [2] = { {{0.117647f,0.117647f,0.117647f}, {0.752941f,0.752941f,0.752941f}, {0.752941f,0.752941f,0.752941f}, {0.0f,0.0f,0.0f}, 1.0f,8.0f,-1}, //Explorer Default {{1.0f,1.0f,1.0f}, {1.0f,1.0f,1.0f}, {1.0f,1.0f,1.0f}, {1.0f,1.0f,1.0f}, 1.0f,32.0f,0} //Material #5 }; static sample_TEXTURE texture_maps [1] = { {"eye10.bmp_0.bmp",0} }; // 244 Verticies // 152 Texture Coordinates // 328 Normals // 448 Triangles static short face_indicies[448][9] = { // Object #-1 {0,1,2 ,0,1,2 ,0,1,2 }, {0,2,3 ,3,2,4 ,3,2,4 }, {0,3,4 ,5,4,6 ,5,4,6 }, {0,4,5 ,7,6,8 ,7,6,8 }, {0,5,6 ,9,8,10 ,9,8,10 }, {0,6,7 ,11,10,12 ,11,10,12 }, {0,7,8 ,13,12,14 ,13,12,14 }, {0,8,9 ,15,14,16 ,15,14,16 }, {0,9,10 ,17,16,18 ,17,16,18 }, {0,10,11 ,19,18,20 ,19,18,20 }, {0,11,12 ,21,20,22 ,21,20,22 }, {0,12,13 ,23,22,24 ,23,22,24 }, {0,13,14 ,25,24,26 ,25,24,26 }, {0,14,15 ,27,26,28 ,27,26,28 }, {0,15,16 ,29,28,30 ,29,28,30 }, {0,16,1 ,31,30,31 ,31,30,32 }, {1,17,18 ,1,32,33 ,1,33,34 }, {1,18,2 ,1,33,2 ,1,34,2 }, {2,18,19 ,2,33,34 ,2,34,35 }, {2,19,3 ,2,34,4 ,2,35,4 }, {3,19,20 ,4,34,35 ,4,35,36 }, {3,20,4 ,4,35,6 ,4,36,6 }, {4,20,21 ,6,35,36 ,6,36,37 }, {4,21,5 ,6,36,8 ,6,37,8 }, {5,21,22 ,8,36,37 ,8,37,38 }, {5,22,6 ,8,37,10 ,8,38,10 }, {6,22,23 ,10,37,38 ,10,38,39 }, {6,23,7 ,10,38,12 ,10,39,12 }, {7,23,24 ,12,38,39 ,12,39,40 }, {7,24,8 ,12,39,14 ,12,40,14 }, {8,24,25 ,14,39,40 ,14,40,41 }, {8,25,9 ,14,40,16 ,14,41,16 }, {9,25,26 ,16,40,41 ,16,41,42 }, {9,26,10 ,16,41,18 ,16,42,18 }, {10,26,27 ,18,41,42 ,18,42,43 }, {10,27,11 ,18,42,20 ,18,43,20 }, {11,27,28 ,20,42,43 ,20,43,44 }, {11,28,12 ,20,43,22 ,20,44,22 }, {12,28,29 ,22,43,44 ,22,44,45 }, {12,29,13 ,22,44,24 ,22,45,24 }, {13,29,30 ,24,44,45 ,24,45,46 }, {13,30,14 ,24,45,26 ,24,46,26 }, {14,30,31 ,26,45,46 ,26,46,47 }, {14,31,15 ,26,46,28 ,26,47,28 }, {15,31,32 ,28,46,47 ,28,47,48 }, {15,32,16 ,28,47,30 ,28,48,30 }, {16,32,17 ,30,47,48 ,30,48,49 }, {16,17,1 ,30,49,49 ,30,49,32 }, {17,33,34 ,32,50,51 ,33,50,51 }, {17,34,18 ,32,51,33 ,33,51,34 }, {18,34,35 ,33,51,52 ,34,51,52 }, {18,35,19 ,33,52,34 ,34,52,35 }, {19,35,36 ,34,52,53 ,35,52,53 }, {19,36,20 ,34,53,35 ,35,53,36 }, {20,36,37 ,35,53,54 ,36,53,54 }, {20,37,21 ,35,54,36 ,36,54,37 }, {21,37,38 ,36,54,55 ,37,54,55 }, {21,38,22 ,36,55,37 ,37,55,38 }, {22,38,39 ,37,55,56 ,38,55,56 }, {22,39,23 ,37,56,38 ,38,56,39 }, {23,39,40 ,38,56,57 ,39,56,57 }, {23,40,24 ,38,57,39 ,39,57,40 }, {24,40,41 ,39,57,58 ,40,57,58 }, {24,41,25 ,39,58,40 ,40,58,41 }, {25,41,42 ,40,58,59 ,41,58,59 }, {25,42,26 ,40,59,41 ,41,59,42 }, {26,42,43 ,41,59,60 ,42,59,60 }, {26,43,27 ,41,60,42 ,42,60,43 }, {27,43,44 ,42,60,61 ,43,60,61 }, {27,44,28 ,42,61,43 ,43,61,44 }, {28,44,45 ,43,61,62 ,44,61,62 }, {28,45,29 ,43,62,44 ,44,62,45 }, {29,45,46 ,44,62,63 ,45,62,63 }, {29,46,30 ,44,63,45 ,45,63,46 }, {30,46,47 ,45,63,64 ,46,63,64 }, {30,47,31 ,45,64,46 ,46,64,47 }, {31,47,48 ,46,64,65 ,47,64,65 }, {31,48,32 ,46,65,47 ,47,65,48 }, {32,48,33 ,47,65,66 ,48,65,66 }, {32,33,17 ,47,67,67 ,48,66,49 }, {33,49,50 ,50,68,69 ,50,67,68 }, {33,50,34 ,50,69,51 ,50,68,51 }, {34,50,51 ,51,69,70 ,51,68,69 }, {34,51,35 ,51,70,52 ,51,69,52 }, {35,51,52 ,52,70,71 ,52,69,70 }, {35,52,36 ,52,71,53 ,52,70,53 }, {36,52,53 ,53,71,72 ,53,70,71 }, {36,53,37 ,53,72,54 ,53,71,54 }, {37,53,54 ,54,72,73 ,54,71,72 }, {37,54,38 ,54,73,55 ,54,72,55 }, {38,54,55 ,55,73,74 ,55,72,73 }, {38,55,39 ,55,74,56 ,55,73,56 }, {39,55,56 ,56,74,75 ,56,73,74 }, {39,56,40 ,56,75,57 ,56,74,57 }, {40,56,57 ,57,75,76 ,57,74,75 }, {40,57,41 ,57,76,58 ,57,75,58 }, {41,57,58 ,58,76,77 ,58,75,76 }, {41,58,42 ,58,77,59 ,58,76,59 }, {42,58,59 ,59,77,78 ,59,76,77 }, {42,59,43 ,59,78,60 ,59,77,60 }, {43,59,60 ,60,78,79 ,60,77,78 }, {43,60,44 ,60,79,61 ,60,78,61 }, {44,60,61 ,61,79,80 ,61,78,79 }, {44,61,45 ,61,80,62 ,61,79,62 }, {45,61,62 ,62,80,81 ,62,79,80 }, {45,62,46 ,62,81,63 ,62,80,63 }, {46,62,63 ,63,81,82 ,63,80,81 }, {46,63,47 ,63,82,64 ,63,81,64 }, {47,63,64 ,64,82,83 ,64,81,82 }, {47,64,48 ,64,83,65 ,64,82,65 }, {48,64,49 ,65,83,84 ,65,82,83 }, {48,49,33 ,65,85,85 ,65,83,66 } // Object #-1 , {65,66,67 ,86,87,88 ,0,1,2 }, {65,67,68 ,89,88,90 ,3,2,4 }, {65,68,69 ,91,90,92 ,5,4,6 }, {65,69,70 ,93,92,94 ,7,6,8 }, {65,70,71 ,95,94,96 ,9,8,10 }, {65,71,72 ,97,96,98 ,11,10,12 }, {65,72,73 ,99,98,100 ,13,12,14 }, {65,73,74 ,101,100,102 ,15,14,16 }, {65,74,75 ,103,102,104 ,17,16,18 }, {65,75,76 ,105,104,106 ,19,18,20 }, {65,76,77 ,107,106,108 ,21,20,22 }, {65,77,78 ,109,108,110 ,23,22,24 }, {65,78,79 ,111,110,112 ,25,24,26 }, {65,79,80 ,113,112,114 ,27,26,28 }, {65,80,81 ,115,114,116 ,29,28,30 }, {65,81,66 ,117,116,117 ,31,30,32 }, {66,82,83 ,87,118,119 ,1,33,34 }, {66,83,67 ,87,119,88 ,1,34,2 }, {67,83,84 ,88,119,120 ,2,34,35 }, {67,84,68 ,88,120,90 ,2,35,4 }, {68,84,85 ,90,120,121 ,4,35,36 }, {68,85,69 ,90,121,92 ,4,36,6 }, {69,85,86 ,92,121,122 ,6,36,37 }, {69,86,70 ,92,122,94 ,6,37,8 }, {70,86,87 ,94,122,123 ,8,37,38 }, {70,87,71 ,94,123,96 ,8,38,10 }, {71,87,88 ,96,123,124 ,10,38,39 }, {71,88,72 ,96,124,98 ,10,39,12 }, {72,88,89 ,98,124,125 ,12,39,40 }, {72,89,73 ,98,125,100 ,12,40,14 }, {73,89,90 ,100,125,126 ,14,40,41 }, {73,90,74 ,100,126,102 ,14,41,16 }, {74,90,91 ,102,126,127 ,16,41,42 }, {74,91,75 ,102,127,104 ,16,42,18 }, {75,91,92 ,104,127,128 ,18,42,43 }, {75,92,76 ,104,128,106 ,18,43,20 }, {76,92,93 ,106,128,129 ,20,43,44 }, {76,93,77 ,106,129,108 ,20,44,22 }, {77,93,94 ,108,129,130 ,22,44,45 }, {77,94,78 ,108,130,110 ,22,45,24 }, {78,94,95 ,110,130,131 ,24,45,46 }, {78,95,79 ,110,131,112 ,24,46,26 }, {79,95,96 ,112,131,132 ,26,46,47 }, {79,96,80 ,112,132,114 ,26,47,28 }, {80,96,97 ,114,132,133 ,28,47,48 }, {80,97,81 ,114,133,116 ,28,48,30 }, {81,97,82 ,116,133,134 ,30,48,49 }, {81,82,66 ,116,135,135 ,30,49,32 }, {82,98,99 ,118,136,137 ,33,50,51 }, {82,99,83 ,118,137,119 ,33,51,34 }, {83,99,100 ,119,137,138 ,34,51,52 }, {83,100,84 ,119,138,120 ,34,52,35 }, {84,100,101 ,120,138,139 ,35,52,53 }, {84,101,85 ,120,139,121 ,35,53,36 }, {85,101,102 ,121,139,140 ,36,53,54 }, {85,102,86 ,121,140,122 ,36,54,37 }, {86,102,103 ,122,140,141 ,37,54,55 }, {86,103,87 ,122,141,123 ,37,55,38 }, {87,103,104 ,123,141,142 ,38,55,56 }, {87,104,88 ,123,142,124 ,38,56,39 }, {88,104,105 ,124,142,143 ,39,56,57 }, {88,105,89 ,124,143,125 ,39,57,40 }, {89,105,106 ,125,143,144 ,40,57,58 }, {89,106,90 ,125,144,126 ,40,58,41 }, {90,106,107 ,126,144,145 ,41,58,59 }, {90,107,91 ,126,145,127 ,41,59,42 }, {91,107,108 ,127,145,146 ,42,59,60 }, {91,108,92 ,127,146,128 ,42,60,43 }, {92,108,109 ,128,146,147 ,43,60,61 }, {92,109,93 ,128,147,129 ,43,61,44 }, {93,109,110 ,129,147,148 ,44,61,62 }, {93,110,94 ,129,148,130 ,44,62,45 }, {94,110,111 ,130,148,149 ,45,62,63 }, {94,111,95 ,130,149,131 ,45,63,46 }, {95,111,112 ,131,149,150 ,46,63,64 }, {95,112,96 ,131,150,132 ,46,64,47 }, {96,112,113 ,132,150,151 ,47,64,65 }, {96,113,97 ,132,151,133 ,47,65,48 }, {97,113,98 ,133,151,152 ,48,65,66 }, {97,98,82 ,133,153,153 ,48,66,49 }, {98,114,115 ,136,154,155 ,50,67,68 }, {98,115,99 ,136,155,137 ,50,68,51 }, {99,115,116 ,137,155,156 ,51,68,69 }, {99,116,100 ,137,156,138 ,51,69,52 }, {100,116,117 ,138,156,157 ,52,69,70 }, {100,117,101 ,138,157,139 ,52,70,53 }, {101,117,118 ,139,157,158 ,53,70,71 }, {101,118,102 ,139,158,140 ,53,71,54 }, {102,118,119 ,140,158,159 ,54,71,72 }, {102,119,103 ,140,159,141 ,54,72,55 }, {103,119,120 ,141,159,160 ,55,72,73 }, {103,120,104 ,141,160,142 ,55,73,56 }, {104,120,121 ,142,160,161 ,56,73,74 }, {104,121,105 ,142,161,143 ,56,74,57 }, {105,121,122 ,143,161,162 ,57,74,75 }, {105,122,106 ,143,162,144 ,57,75,58 }, {106,122,123 ,144,162,163 ,58,75,76 }, {106,123,107 ,144,163,145 ,58,76,59 }, {107,123,124 ,145,163,164 ,59,76,77 }, {107,124,108 ,145,164,146 ,59,77,60 }, {108,124,125 ,146,164,165 ,60,77,78 }, {108,125,109 ,146,165,147 ,60,78,61 }, {109,125,126 ,147,165,166 ,61,78,79 }, {109,126,110 ,147,166,148 ,61,79,62 }, {110,126,127 ,148,166,167 ,62,79,80 }, {110,127,111 ,148,167,149 ,62,80,63 }, {111,127,128 ,149,167,168 ,63,80,81 }, {111,128,112 ,149,168,150 ,63,81,64 }, {112,128,129 ,150,168,169 ,64,81,82 }, {112,129,113 ,150,169,151 ,64,82,65 }, {113,129,114 ,151,169,170 ,65,82,83 }, {113,114,98 ,151,171,171 ,65,83,66 }, {114,130,131 ,154,172,173 ,67,84,85 }, {114,131,115 ,154,173,155 ,67,85,68 }, {115,131,132 ,155,173,174 ,68,85,86 }, {115,132,116 ,155,174,156 ,68,86,69 }, {116,132,133 ,156,174,175 ,69,86,87 }, {116,133,117 ,156,175,157 ,69,87,70 }, {117,133,134 ,157,175,176 ,70,87,88 }, {117,134,118 ,157,176,158 ,70,88,71 }, {118,134,135 ,158,176,177 ,71,88,89 }, {118,135,119 ,158,177,159 ,71,89,72 }, {119,135,136 ,159,177,178 ,72,89,90 }, {119,136,120 ,159,178,160 ,72,90,73 }, {120,136,137 ,160,178,179 ,73,90,91 }, {120,137,121 ,160,179,161 ,73,91,74 }, {121,137,138 ,161,179,180 ,74,91,92 }, {121,138,122 ,161,180,162 ,74,92,75 }, {122,138,139 ,162,180,181 ,75,92,93 }, {122,139,123 ,162,181,163 ,75,93,76 }, {123,139,140 ,163,181,182 ,76,93,94 }, {123,140,124 ,163,182,164 ,76,94,77 }, {124,140,141 ,164,182,183 ,77,94,95 }, {124,141,125 ,164,183,165 ,77,95,78 }, {125,141,142 ,165,183,184 ,78,95,96 }, {125,142,126 ,165,184,166 ,78,96,79 }, {126,142,143 ,166,184,185 ,79,96,97 }, {126,143,127 ,166,185,167 ,79,97,80 }, {127,143,144 ,167,185,186 ,80,97,98 }, {127,144,128 ,167,186,168 ,80,98,81 }, {128,144,145 ,168,186,187 ,81,98,99 }, {128,145,129 ,168,187,169 ,81,99,82 }, {129,145,130 ,169,187,188 ,82,99,100 }, {129,130,114 ,169,189,189 ,82,100,83 }, {130,146,147 ,172,190,191 ,84,101,102 }, {130,147,131 ,172,191,173 ,84,102,85 }, {131,147,148 ,173,191,192 ,85,102,103 }, {131,148,132 ,173,192,174 ,85,103,86 }, {132,148,149 ,174,192,193 ,86,103,104 }, {132,149,133 ,174,193,175 ,86,104,87 }, {133,149,150 ,175,193,194 ,87,104,105 }, {133,150,134 ,175,194,176 ,87,105,88 }, {134,150,151 ,176,194,195 ,88,105,106 }, {134,151,135 ,176,195,177 ,88,106,89 }, {135,151,152 ,177,195,196 ,89,106,107 }, {135,152,136 ,177,196,178 ,89,107,90 }, {136,152,153 ,178,196,197 ,90,107,108 }, {136,153,137 ,178,197,179 ,90,108,91 }, {137,153,154 ,179,197,198 ,91,108,109 }, {137,154,138 ,179,198,180 ,91,109,92 }, {138,154,155 ,180,198,199 ,92,109,110 }, {138,155,139 ,180,199,181 ,92,110,93 }, {139,155,156 ,181,199,200 ,93,110,111 }, {139,156,140 ,181,200,182 ,93,111,94 }, {140,156,157 ,182,200,201 ,94,111,112 }, {140,157,141 ,182,201,183 ,94,112,95 }, {141,157,158 ,183,201,202 ,95,112,113 }, {141,158,142 ,183,202,184 ,95,113,96 }, {142,158,159 ,184,202,203 ,96,113,114 }, {142,159,143 ,184,203,185 ,96,114,97 }, {143,159,160 ,185,203,204 ,97,114,115 }, {143,160,144 ,185,204,186 ,97,115,98 }, {144,160,161 ,186,204,205 ,98,115,116 }, {144,161,145 ,186,205,187 ,98,116,99 }, {145,161,146 ,187,205,206 ,99,116,117 }, {145,146,130 ,187,207,207 ,99,117,100 }, {146,162,163 ,190,208,209 ,101,118,119 }, {146,163,147 ,190,209,191 ,101,119,102 }, {147,163,164 ,191,209,210 ,102,119,120 }, {147,164,148 ,191,210,192 ,102,120,103 }, {148,164,165 ,192,210,211 ,103,120,121 }, {148,165,149 ,192,211,193 ,103,121,104 }, {149,165,166 ,193,211,212 ,104,121,122 }, {149,166,150 ,193,212,194 ,104,122,105 }, {150,166,167 ,194,212,213 ,105,122,123 }, {150,167,151 ,194,213,195 ,105,123,106 }, {151,167,168 ,195,213,214 ,106,123,124 }, {151,168,152 ,195,214,196 ,106,124,107 }, {152,168,169 ,196,214,215 ,107,124,125 }, {152,169,153 ,196,215,197 ,107,125,108 }, {153,169,170 ,197,215,216 ,108,125,126 }, {153,170,154 ,197,216,198 ,108,126,109 }, {154,170,171 ,198,216,217 ,109,126,127 }, {154,171,155 ,198,217,199 ,109,127,110 }, {155,171,172 ,199,217,218 ,110,127,128 }, {155,172,156 ,199,218,200 ,110,128,111 }, {156,172,173 ,200,218,219 ,111,128,129 }, {156,173,157 ,200,219,201 ,111,129,112 }, {157,173,174 ,201,219,220 ,112,129,130 }, {157,174,158 ,201,220,202 ,112,130,113 }, {158,174,175 ,202,220,221 ,113,130,131 }, {158,175,159 ,202,221,203 ,113,131,114 }, {159,175,176 ,203,221,222 ,114,131,132 }, {159,176,160 ,203,222,204 ,114,132,115 }, {160,176,177 ,204,222,223 ,115,132,133 }, {160,177,161 ,204,223,205 ,115,133,116 }, {161,177,162 ,205,223,224 ,116,133,134 }, {161,162,146 ,205,225,225 ,116,134,117 }, {178,163,162 ,226,209,208 ,135,119,118 }, {178,164,163 ,227,210,209 ,136,120,119 }, {178,165,164 ,228,211,210 ,137,121,120 }, {178,166,165 ,229,212,211 ,138,122,121 }, {178,167,166 ,230,213,212 ,139,123,122 }, {178,168,167 ,231,214,213 ,140,124,123 }, {178,169,168 ,232,215,214 ,141,125,124 }, {178,170,169 ,233,216,215 ,142,126,125 }, {178,171,170 ,234,217,216 ,143,127,126 }, {178,172,171 ,235,218,217 ,144,128,127 }, {178,173,172 ,236,219,218 ,145,129,128 }, {178,174,173 ,237,220,219 ,146,130,129 }, {178,175,174 ,238,221,220 ,147,131,130 }, {178,176,175 ,239,222,221 ,148,132,131 }, {178,177,176 ,240,223,222 ,149,133,132 }, {178,162,177 ,241,241,223 ,150,151,133 } // Object #-1 , {179,180,181 ,242,243,244 ,0,1,2 }, {179,181,182 ,245,244,246 ,3,2,4 }, {179,182,183 ,247,246,248 ,5,4,6 }, {179,183,184 ,249,248,250 ,7,6,8 }, {179,184,185 ,251,250,252 ,9,8,10 }, {179,185,186 ,253,252,254 ,11,10,12 }, {179,186,187 ,255,254,256 ,13,12,14 }, {179,187,188 ,257,256,258 ,15,14,16 }, {179,188,189 ,259,258,260 ,17,16,18 }, {179,189,190 ,261,260,262 ,19,18,20 }, {179,190,191 ,263,262,264 ,21,20,22 }, {179,191,192 ,265,264,266 ,23,22,24 }, {179,192,193 ,267,266,268 ,25,24,26 }, {179,193,194 ,269,268,270 ,27,26,28 }, {179,194,195 ,271,270,272 ,29,28,30 }, {179,195,180 ,273,272,273 ,31,30,32 }, {180,196,197 ,243,274,275 ,1,33,34 }, {180,197,181 ,243,275,244 ,1,34,2 }, {181,197,198 ,244,275,276 ,2,34,35 }, {181,198,182 ,244,276,246 ,2,35,4 }, {182,198,199 ,246,276,277 ,4,35,36 }, {182,199,183 ,246,277,248 ,4,36,6 }, {183,199,200 ,248,277,278 ,6,36,37 }, {183,200,184 ,248,278,250 ,6,37,8 }, {184,200,201 ,250,278,279 ,8,37,38 }, {184,201,185 ,250,279,252 ,8,38,10 }, {185,201,202 ,252,279,280 ,10,38,39 }, {185,202,186 ,252,280,254 ,10,39,12 }, {186,202,203 ,254,280,281 ,12,39,40 }, {186,203,187 ,254,281,256 ,12,40,14 }, {187,203,204 ,256,281,282 ,14,40,41 }, {187,204,188 ,256,282,258 ,14,41,16 }, {188,204,205 ,258,282,283 ,16,41,42 }, {188,205,189 ,258,283,260 ,16,42,18 }, {189,205,206 ,260,283,284 ,18,42,43 }, {189,206,190 ,260,284,262 ,18,43,20 }, {190,206,207 ,262,284,285 ,20,43,44 }, {190,207,191 ,262,285,264 ,20,44,22 }, {191,207,208 ,264,285,286 ,22,44,45 }, {191,208,192 ,264,286,266 ,22,45,24 }, {192,208,209 ,266,286,287 ,24,45,46 }, {192,209,193 ,266,287,268 ,24,46,26 }, {193,209,210 ,268,287,288 ,26,46,47 }, {193,210,194 ,268,288,270 ,26,47,28 }, {194,210,211 ,270,288,289 ,28,47,48 }, {194,211,195 ,270,289,272 ,28,48,30 }, {195,211,196 ,272,289,290 ,30,48,49 }, {195,196,180 ,272,291,291 ,30,49,32 }, {196,212,213 ,274,292,293 ,33,50,51 }, {196,213,197 ,274,293,275 ,33,51,34 }, {197,213,214 ,275,293,294 ,34,51,52 }, {197,214,198 ,275,294,276 ,34,52,35 }, {198,214,215 ,276,294,295 ,35,52,53 }, {198,215,199 ,276,295,277 ,35,53,36 }, {199,215,216 ,277,295,296 ,36,53,54 }, {199,216,200 ,277,296,278 ,36,54,37 }, {200,216,217 ,278,296,297 ,37,54,55 }, {200,217,201 ,278,297,279 ,37,55,38 }, {201,217,218 ,279,297,298 ,38,55,56 }, {201,218,202 ,279,298,280 ,38,56,39 }, {202,218,219 ,280,298,299 ,39,56,57 }, {202,219,203 ,280,299,281 ,39,57,40 }, {203,219,220 ,281,299,300 ,40,57,58 }, {203,220,204 ,281,300,282 ,40,58,41 }, {204,220,221 ,282,300,301 ,41,58,59 }, {204,221,205 ,282,301,283 ,41,59,42 }, {205,221,222 ,283,301,302 ,42,59,60 }, {205,222,206 ,283,302,284 ,42,60,43 }, {206,222,223 ,284,302,303 ,43,60,61 }, {206,223,207 ,284,303,285 ,43,61,44 }, {207,223,224 ,285,303,304 ,44,61,62 }, {207,224,208 ,285,304,286 ,44,62,45 }, {208,224,225 ,286,304,305 ,45,62,63 }, {208,225,209 ,286,305,287 ,45,63,46 }, {209,225,226 ,287,305,306 ,46,63,64 }, {209,226,210 ,287,306,288 ,46,64,47 }, {210,226,227 ,288,306,307 ,47,64,65 }, {210,227,211 ,288,307,289 ,47,65,48 }, {211,227,212 ,289,307,308 ,48,65,66 }, {211,212,196 ,289,309,309 ,48,66,49 }, {212,228,229 ,292,310,311 ,50,67,68 }, {212,229,213 ,292,311,293 ,50,68,51 }, {213,229,230 ,293,311,312 ,51,68,69 }, {213,230,214 ,293,312,294 ,51,69,52 }, {214,230,231 ,294,312,313 ,52,69,70 }, {214,231,215 ,294,313,295 ,52,70,53 }, {215,231,232 ,295,313,314 ,53,70,71 }, {215,232,216 ,295,314,296 ,53,71,54 }, {216,232,233 ,296,314,315 ,54,71,72 }, {216,233,217 ,296,315,297 ,54,72,55 }, {217,233,234 ,297,315,316 ,55,72,73 }, {217,234,218 ,297,316,298 ,55,73,56 }, {218,234,235 ,298,316,317 ,56,73,74 }, {218,235,219 ,298,317,299 ,56,74,57 }, {219,235,236 ,299,317,318 ,57,74,75 }, {219,236,220 ,299,318,300 ,57,75,58 }, {220,236,237 ,300,318,319 ,58,75,76 }, {220,237,221 ,300,319,301 ,58,76,59 }, {221,237,238 ,301,319,320 ,59,76,77 }, {221,238,222 ,301,320,302 ,59,77,60 }, {222,238,239 ,302,320,321 ,60,77,78 }, {222,239,223 ,302,321,303 ,60,78,61 }, {223,239,240 ,303,321,322 ,61,78,79 }, {223,240,224 ,303,322,304 ,61,79,62 }, {224,240,241 ,304,322,323 ,62,79,80 }, {224,241,225 ,304,323,305 ,62,80,63 }, {225,241,242 ,305,323,324 ,63,80,81 }, {225,242,226 ,305,324,306 ,63,81,64 }, {226,242,243 ,306,324,325 ,64,81,82 }, {226,243,227 ,306,325,307 ,64,82,65 }, {227,243,228 ,307,325,326 ,65,82,83 }, {227,228,212 ,307,327,327 ,65,83,66 } }; static GLfloat vertices [244][3] = { {-0.0594632f,0.340244f,-0.227837f},{-0.0839977f,0.221099f,-0.344899f},{-0.162438f,0.228128f,-0.353657f}, {-0.225394f,0.248142f,-0.339163f},{-0.260027f,0.278097f,-0.302629f},{-0.260012f,0.31343f,-0.250458f}, {-0.227263f,0.348764f,-0.192603f},{-0.169721f,0.378718f,-0.139431f},{-0.0976165f,0.398733f,-0.0989695f}, {-0.0212892f,0.405761f,-0.0760573f},{0.0490029f,0.398733f,-0.07301f},{0.103337f,0.378718f,-0.0900053f}, {0.133847f,0.348764f,-0.124503f},{0.136676f,0.31343f,-0.171127f},{0.11215f,0.278097f,-0.223036f}, {0.0633403f,0.248142f,-0.273514f},{-0.00471581f,0.228128f,-0.316247f},{-0.088416f,0.0664659f,-0.404402f}, {-0.236654f,0.0794526f,-0.421905f},{-0.358018f,0.116435f,-0.394699f},{-0.421142f,0.171783f,-0.323727f}, {-0.413035f,0.237071f,-0.223224f},{-0.344259f,0.302359f,-0.116005f},{-0.237289f,0.357707f,-0.0234628f}, {-0.111046f,0.39469f,0.0427706f},{0.0221782f,0.407676f,0.079975f},{0.148264f,0.39469f,0.0859734f}, {0.246652f,0.357707f,0.0561923f},{0.29851f,0.302359f,-0.00828875f},{0.29812f,0.237071f,-0.0951606f}, {0.252434f,0.171783f,-0.188204f},{0.169761f,0.116435f,-0.27625f},{0.0538453f,0.0794525f,-0.351645f}, {-0.0747728f,-0.100115f,-0.397927f},{-0.265094f,-0.083147f,-0.413132f},{-0.421072f,-0.0348269f,-0.371959f}, {-0.498119f,0.0374891f,-0.276676f},{-0.479955f,0.122792f,-0.147509f},{-0.38696f,0.208094f,-0.0154702f}, {-0.253427f,0.28041f,0.0930117f},{-0.0998485f,0.328731f,0.16876f},{0.0671615f,0.345698f,0.215499f}, {0.23274f,0.32873f,0.230046f},{0.363571f,0.28041f,0.196764f},{0.42705f,0.208094f,0.1102f}, {0.416969f,0.122792f,-0.00920004f},{0.351655f,0.0374891f,-0.13296f},{0.247216f,-0.034827f,-0.245038f}, {0.104266f,-0.083147f,-0.337127f},{-0.0513718f,-0.253282f,-0.328305f},{-0.247586f,-0.234916f,-0.330761f}, {-0.405745f,-0.182615f,-0.278113f},{-0.481724f,-0.104341f,-0.176241f},{-0.460848f,-0.01201f,-0.0465844f}, {-0.365803f,0.0803208f,0.0816631f},{-0.230648f,0.158595f,0.186497f},{-0.0716892f,0.210896f,0.263634f}, {0.107899f,0.229262f,0.318551f},{0.29045f,0.210896f,0.342957f},{0.434324f,0.158595f,0.311819f}, {0.5f,0.0803207f,0.215496f},{0.481891f,-0.0120101f,0.079437f},{0.404727f,-0.104341f,-0.060354f}, {0.289283f,-0.182615f,-0.182709f},{0.136409f,-0.234917f,-0.275803f},{0.117563f,-0.01201f,0.375843f}, {0.114291f,0.139643f,0.336151f},{0.0508502f,0.128099f,0.322581f},{-0.00136173f,0.0952246f,0.31399f}, {-0.0363813f,0.0460249f,0.311237f},{-0.0508667f,-0.01201f,0.314621f},{-0.0436149f,-0.0700451f,0.323833f}, {-0.0152835f,-0.119245f,0.337453f},{0.0315462f,-0.152119f,0.352954f},{0.0919289f,-0.163663f,0.367573f}, {0.158049f,-0.152119f,0.379363f},{0.219457f,-0.119245f,0.387409f},{0.264776f,-0.070045f,0.391145f}, {0.284658f,-0.01201f,0.389721f},{0.274768f,0.046025f,0.382324f},{0.237279f,0.0952247f,0.369285f}, {0.180111f,0.128099f,0.352767f},{0.0852956f,0.268208f,0.257515f},{-0.0287871f,0.246877f,0.236747f}, {-0.11952f,0.186134f,0.224289f},{-0.178349f,0.0952246f,0.219546f},{-0.201037f,-0.0120101f,0.223154f}, {-0.186517f,-0.119245f,0.236486f},{-0.136378f,-0.210154f,0.258079f},{-0.0543631f,-0.270898f,0.282448f}, {0.0529195f,-0.292228f,0.30343f},{0.173518f,-0.270898f,0.318397f},{0.288544f,-0.210154f,0.328679f}, {0.374946f,-0.119245f,0.335885f},{0.412602f,-0.01201f,0.338198f},{0.391946f,0.0952246f,0.331038f}, {0.317893f,0.186134f,0.31199f},{0.207926f,0.246877f,0.284788f},{0.0448437f,0.354112f,0.145691f}, {-0.105491f,0.326243f,0.122505f},{-0.226023f,0.246877f,0.108312f},{-0.303201f,0.128099f,0.1019f}, {-0.329682f,-0.0120101f,0.10436f},{-0.30443f,-0.152119f,0.118065f},{-0.232051f,-0.270898f,0.141232f}, {-0.120388f,-0.350263f,0.166539f},{0.0202984f,-0.378132f,0.186412f},{0.174378f,-0.350263f,0.198924f}, {0.318361f,-0.270898f,0.207861f},{0.424351f,-0.152119f,0.216955f},{0.468735f,-0.01201f,0.224104f}, {0.440595f,0.128099f,0.221864f},{0.345624f,0.246877f,0.204744f},{0.204291f,0.326243f,0.175963f}, {0.00299471f,0.384278f,0.00834511f},{-0.168323f,0.354112f,-0.0183378f},{-0.310292f,0.268208f,-0.037007f}, {-0.400615f,0.139643f,-0.0453738f},{-0.426773f,-0.0120101f,-0.0417815f},{-0.388287f,-0.163663f,-0.0263951f}, {-0.294627f,-0.292228f,-0.00363743f},{-0.159976f,-0.378132f,0.0188579f},{-0.000457861f,-0.408298f,0.0352872f}, {0.16409f,-0.378132f,0.0457485f},{0.309093f,-0.292228f,0.0547918f},{0.409769f,-0.163663f,0.0655529f}, {0.448241f,-0.01201f,0.0751867f},{0.417527f,0.139643f,0.0763255f},{0.321835f,0.268208f,0.063497f}, {0.17583f,0.354112f,0.038304f},{-0.0360629f,0.354112f,-0.137422f},{-0.205101f,0.326243f,-0.16811f}, {-0.349242f,0.246877f,-0.191968f},{-0.440435f,0.128099f,-0.202512f},{-0.462794f,-0.0120101f,-0.19744f}, {-0.416476f,-0.152119f,-0.179929f},{-0.314265f,-0.270898f,-0.157067f},{-0.17459f,-0.350263f,-0.136191f}, {-0.0174526f,-0.378132f,-0.120891f},{0.135495f,-0.350263f,-0.109443f},{0.261894f,-0.270898f,-0.097771f}, {0.343535f,-0.152119f,-0.084796f},{0.37068f,-0.01201f,-0.0746691f},{0.341234f,0.128099f,-0.0735399f}, {0.257546f,0.246877f,-0.0848152f},{0.126641f,0.326243f,-0.107522f},{-0.0665829f,0.268208f,-0.265518f}, {-0.201637f,0.246877f,-0.29431f},{-0.317741f,0.186134f,-0.317323f},{-0.391187f,0.0952246f,-0.328168f}, {-0.408078f,-0.0120101f,-0.324621f},{-0.36797f,-0.119245f,-0.309713f},{-0.281561f,-0.210154f,-0.289619f}, {-0.165397f,-0.270898f,-0.270117f},{-0.0379277f,-0.292228f,-0.253812f},{0.0821894f,-0.270898f,-0.239781f}, {0.178018f,-0.210154f,-0.226133f},{0.237495f,-0.119245f,-0.213409f},{0.255139f,-0.01201f,-0.205296f}, {0.2303f,0.0952247f,-0.205955f},{0.164496f,0.186134f,-0.217195f},{0.0619701f,0.246877f,-0.238064f}, {-0.0811905f,0.139643f,-0.350506f},{-0.154437f,0.128099f,-0.367526f},{-0.216526f,0.0952246f,-0.381076f}, {-0.25596f,0.0460249f,-0.38821f},{-0.2656f,-0.0120101f,-0.387748f},{-0.244385f,-0.0700451f,-0.380633f}, {-0.196993f,-0.119245f,-0.369252f},{-0.132114f,-0.152119f,-0.356197f},{-0.0603973f,-0.163663f,-0.343273f}, {0.00732452f,-0.152119f,-0.331343f},{0.0615615f,-0.119245f,-0.320972f},{0.0953903f,-0.070045f,-0.313197f}, {0.104981f,-0.01201f,-0.309621f},{0.0893241f,0.046025f,-0.311711f},{0.0498191f,0.0952246f,-0.319978f}, {-0.00948911f,0.128099f,-0.333609f},{-0.0775452f,-0.01201f,-0.377355f},{0.0662412f,0.347573f,0.213013f}, {0.0212595f,0.408298f,0.0769026f},{-0.0451443f,0.401592f,0.0751623f},{-0.0935056f,0.382495f,0.0933802f}, {-0.116134f,0.353914f,0.12753f},{-0.110884f,0.320201f,0.170755f},{-0.080312f,0.286488f,0.216042f}, {-0.0293751f,0.257908f,0.258144f},{0.03577f,0.238811f,0.293126f},{0.107193f,0.232105f,0.316787f}, {0.174518f,0.238811f,0.324478f},{0.226144f,0.257908f,0.312906f},{0.252486f,0.286488f,0.282327f}, {0.249094f,0.320201f,0.237371f},{0.217421f,0.353914f,0.185944f},{0.163196f,0.382495f,0.13702f}, {0.094519f,0.401592f,0.0986572f},{-0.0221509f,0.405034f,-0.0793323f},{-0.152293f,0.392643f,-0.0835134f}, {-0.245868f,0.357357f,-0.0457555f},{-0.283508f,0.304547f,0.0260588f},{-0.265498f,0.242254f,0.112987f}, {-0.205055f,0.17996f,0.197406f},{-0.114628f,0.12715f,0.272443f},{-0.00092518f,0.0918637f,0.336653f}, {0.128716f,0.0794728f,0.383462f},{0.257523f,0.0918637f,0.400483f},{0.359249f,0.12715f,0.377982f}, {0.40988f,0.17996f,0.316212f},{0.400654f,0.242254f,0.226581f},{0.339502f,0.304547f,0.127003f}, {0.240755f,0.357357f,0.0348431f},{0.116104f,0.392644f,-0.0370932f},{-0.0601391f,0.33828f,-0.2307f}, {-0.242846f,0.32209f,-0.243002f},{-0.375234f,0.275986f,-0.193027f},{-0.422369f,0.206987f,-0.0888319f}, {-0.388625f,0.125596f,0.037377f},{-0.302564f,0.0442061f,0.155468f},{-0.18679f,-0.0247935f,0.257432f}, {-0.0468511f,-0.0708974f,0.344428f},{0.116548f,-0.087087f,0.405712f},{0.28691f,-0.0708974f,0.421904f}, {0.426097f,-0.0247934f,0.382089f},{0.495355f,0.0442061f,0.291519f},{0.482076f,0.125596f,0.169311f}, {0.402609f,0.206987f,0.0401854f},{0.279861f,0.275986f,-0.0764741f},{0.123549f,0.32209f,-0.169952f}, {-0.0843006f,0.218197f,-0.34676f},{-0.291441f,0.200673f,-0.367557f},{-0.445002f,0.150771f,-0.314761f}, {-0.5f,0.0760863f,-0.194992f},{-0.460848f,-0.01201f,-0.0465844f},{-0.363663f,-0.100106f,0.0934045f}, {-0.238408f,-0.174791f,0.213396f},{-0.0925815f,-0.224693f,0.31132f},{0.0771405f,-0.242217f,0.372066f}, {0.258422f,-0.224693f,0.375976f},{0.411136f,-0.174791f,0.318319f},{0.49075f,-0.100106f,0.211715f}, {0.481891f,-0.0120101f,0.0794369f},{0.402881f,0.0760863f,-0.0539284f},{0.278634f,0.150771f,-0.173653f}, {0.115875f,0.200673f,-0.27448f} }; static GLfloat normals [328][3] = { {0.14128f,0.678859f,-0.720549f},{0.141183f,0.470342f,-0.871117f},{0.0436259f,0.538027f,-0.841798f}, {0.0679973f,0.716579f,-0.694184f},{-0.119311f,0.639257f,-0.759681f},{-0.00235058f,0.772214f,-0.635358f}, {-0.255136f,0.759046f,-0.598962f},{-0.0474012f,0.827055f,-0.560118f},{-0.314039f,0.853304f,-0.416235f}, {-0.0600024f,0.866637f,-0.495318f},{-0.292773f,0.915841f,-0.274809f},{-0.049072f,0.891986f,-0.449392f}, {-0.212481f,0.95807f,-0.192231f},{-0.0178326f,0.908456f,-0.417599f},{-0.0920599f,0.982527f,-0.161757f}, {0.0370726f,0.914058f,-0.403886f},{0.0521203f,0.982077f,-0.18113f},{0.108309f,0.902514f,-0.416819f}, {0.201428f,0.946854f,-0.250789f},{0.179027f,0.872331f,-0.45496f},{0.331459f,0.872109f,-0.359945f}, {0.23599f,0.827361f,-0.509688f},{0.418216f,0.768374f,-0.484455f},{0.271011f,0.775009f,-0.570888f}, {0.450676f,0.660369f,-0.60067f},{0.28066f,0.726565f,-0.627163f},{0.433824f,0.571637f,-0.69644f}, {0.269128f,0.691375f,-0.670501f},{0.379646f,0.512038f,-0.77051f},{0.242614f,0.670979f,-0.70066f}, {0.296688f,0.482442f,-0.824152f},{0.20092f,0.665188f,-0.719135f},{0.111321f,0.0838976f,-0.990237f}, {-0.029379f,0.177399f,-0.983701f},{-0.36291f,0.315654f,-0.876732f},{-0.636533f,0.537885f,-0.552726f}, {-0.692297f,0.698565f,-0.180919f},{-0.609692f,0.790176f,0.0624294f},{-0.463645f,0.864983f,0.191929f}, {-0.266794f,0.932768f,0.242413f},{-0.0294763f,0.976851f,0.211879f},{0.23276f,0.968844f,0.0846355f}, {0.473096f,0.871906f,-0.126332f},{0.622688f,0.697126f,-0.355352f},{0.663374f,0.512375f,-0.54535f}, {0.624155f,0.368076f,-0.689167f},{0.531327f,0.266649f,-0.804108f},{0.396108f,0.19478f,-0.897307f}, {0.301284f,0.331535f,-0.894043f},{0.293635f,0.335978f,-0.894929f},{0.0262531f,-0.314782f,-0.948801f}, {-0.145065f,-0.279238f,-0.949201f},{-0.600169f,-0.204803f,-0.773209f},{-0.94784f,0.0687263f,-0.311249f}, {-0.931339f,0.326478f,0.161309f},{-0.775903f,0.471621f,0.418986f},{-0.595717f,0.581008f,0.554573f}, {-0.378996f,0.685218f,0.621963f},{-0.1154f,0.782225f,0.612215f},{0.228237f,0.846899f,0.480282f}, {0.608238f,0.775101f,0.17107f},{0.820052f,0.537806f,-0.19565f},{0.837034f,0.294875f,-0.460893f}, {0.762505f,0.126921f,-0.634411f},{0.630338f,0.00231725f,-0.776317f},{0.436413f,-0.113109f,-0.892609f}, {0.320267f,0.0147375f,-0.947213f},{0.348327f,-0.00790562f,-0.93734f},{-0.0276759f,-0.417145f,-0.908418f}, {-0.141207f,-0.463983f,-0.874517f},{-0.573196f,-0.464631f,-0.674955f},{-0.943646f,-0.249543f,-0.217397f}, {-0.961507f,0.0693531f,0.265886f},{-0.808033f,0.269491f,0.523886f},{-0.636184f,0.393708f,0.663524f}, {-0.43775f,0.497816f,0.748702f},{-0.202579f,0.60248f,0.771997f},{0.122768f,0.708696f,0.694751f}, {0.564416f,0.712283f,0.417239f},{0.875302f,0.482711f,-0.0289185f},{0.906907f,0.205191f,-0.367988f}, {0.825239f,0.0254238f,-0.564212f},{0.68962f,-0.103674f,-0.716712f},{0.478163f,-0.232147f,-0.847035f}, {0.283993f,-0.306895f,-0.908385f},{0.330854f,-0.348141f,-0.877117f},{-0.24469f,0.240557f,0.939286f}, {-0.251704f,0.385303f,0.887799f},{-0.308507f,0.32877f,0.892599f},{-0.289709f,0.216471f,0.932314f}, {-0.380036f,0.257873f,0.888298f},{-0.323023f,0.177913f,0.929518f},{-0.428302f,0.18168f,0.885183f}, {-0.338313f,0.138727f,0.930752f},{-0.452208f,0.105373f,0.885666f},{-0.339696f,0.105884f,0.934556f}, {-0.448119f,0.0223869f,0.893694f},{-0.329378f,0.0709806f,0.941526f},{-0.403498f,-0.0769257f,0.911741f}, {-0.29726f,0.026574f,0.954427f},{-0.305208f,-0.184313f,0.934279f},{-0.23761f,-0.0127996f,0.971276f}, {-0.164885f,-0.266084f,0.949743f},{-0.171302f,-0.0247511f,0.984908f},{-0.0181081f,-0.289546f,0.956993f}, {-0.124133f,-0.0109379f,0.992205f},{0.104381f,-0.239271f,0.965326f},{-0.0977336f,0.0144596f,0.995108f}, {0.181061f,-0.110489f,0.977246f},{-0.0826528f,0.0527337f,0.995182f},{0.187283f,0.0757574f,0.97938f}, {-0.0822454f,0.112191f,0.990277f},{0.118036f,0.252508f,0.960368f},{-0.106176f,0.17836f,0.97822f}, {0.00684446f,0.362199f,0.932075f},{-0.148821f,0.225033f,0.962919f},{-0.110459f,0.398641f,0.910431f}, {-0.196851f,0.244267f,0.949517f},{-0.245786f,0.641112f,0.727025f},{-0.343754f,0.521981f,0.780621f}, {-0.477819f,0.373685f,0.795015f},{-0.560849f,0.220352f,0.798056f},{-0.604243f,0.0766681f,0.793103f}, {-0.610293f,-0.0768122f,0.788443f},{-0.549029f,-0.268252f,0.791586f},{-0.376462f,-0.476467f,0.794516f}, {-0.114499f,-0.619894f,0.776287f},{0.154797f,-0.653379f,0.741036f},{0.39318f,-0.579683f,0.713707f}, {0.593512f,-0.372979f,0.713183f},{0.677704f,-0.00981577f,0.735269f},{0.551652f,0.373004f,0.746021f}, {0.301968f,0.598489f,0.742041f},{0.0536017f,0.664757f,0.745134f},{-0.100712f,0.511852f,0.85315f}, {-0.129771f,0.495908f,0.858624f},{-0.224077f,0.885635f,0.406743f},{-0.377848f,0.760571f,0.52798f}, {-0.594967f,0.529479f,0.604703f},{-0.714454f,0.270365f,0.645336f},{-0.764684f,0.0271108f,0.643835f}, {-0.762621f,-0.221975f,0.607566f},{-0.664936f,-0.506592f,0.548839f},{-0.41186f,-0.772743f,0.482949f}, {-0.051096f,-0.907492f,0.41695f},{0.296775f,-0.888489f,0.350018f},{0.596061f,-0.754371f,0.275021f}, {0.85112f,-0.486344f,0.197646f},{0.98554f,-0.0575001f,0.159391f},{0.884713f,0.423397f,0.194983f}, {0.588143f,0.759515f,0.277894f},{0.243699f,0.899532f,0.362565f},{0.0295394f,0.808074f,0.588339f}, {0.00266324f,0.793476f,0.608596f},{-0.166151f,0.985993f,-0.0145344f},{-0.359567f,0.924003f,0.130114f}, {-0.671899f,0.688429f,0.273162f},{-0.862314f,0.339548f,0.375661f},{-0.920945f,-0.0299612f,0.38854f}, {-0.869365f,-0.38079f,0.314966f},{-0.692245f,-0.695493f,0.192579f},{-0.384078f,-0.919936f,0.0787546f}, {-0.0074353f,-0.999946f,0.00727214f},{0.355557f,-0.933553f,-0.0453544f},{0.663383f,-0.738106f,-0.122974f}, {0.877978f,-0.422365f,-0.225307f},{0.955101f,-0.0281345f,-0.294941f},{0.883327f,0.374643f,-0.281737f}, {0.66969f,0.716173f,-0.196498f},{0.354359f,0.930543f,-0.0922975f},{0.141093f,0.97558f,0.168336f}, {0.137781f,0.975371f,0.172241f},{-0.0634033f,0.902267f,-0.426491f},{-0.254884f,0.910829f,-0.324692f}, {-0.616918f,0.75457f,-0.223688f},{-0.913479f,0.387278f,-0.12479f},{-0.991529f,-0.0944241f,-0.0891887f}, {-0.854436f,-0.500204f,-0.140481f},{-0.601812f,-0.762834f,-0.236446f},{-0.297768f,-0.898656f,-0.322104f}, {0.0285855f,-0.925596f,-0.377432f},{0.355549f,-0.835223f,-0.419508f},{0.633205f,-0.614776f,-0.470215f}, {0.79464f,-0.30479f,-0.525023f},{0.829099f,0.0136054f,-0.558937f},{0.771688f,0.307959f,-0.55647f}, {0.624717f,0.582898f,-0.519575f},{0.382273f,0.799786f,-0.462828f},{0.208037f,0.945407f,-0.250852f}, {0.208547f,0.945131f,-0.251467f},{0.0633847f,0.652646f,-0.755007f},{-0.0776665f,0.694041f,-0.715734f}, {-0.348809f,0.594039f,-0.724879f},{-0.609141f,0.313102f,-0.728639f},{-0.706685f,-0.109053f,-0.699073f}, {-0.589105f,-0.460862f,-0.663748f},{-0.380198f,-0.649568f,-0.658416f},{-0.154288f,-0.721326f,-0.675192f}, {0.0801603f,-0.709847f,-0.69978f},{0.317168f,-0.612361f,-0.724167f},{0.519448f,-0.425555f,-0.740997f}, {0.638214f,-0.189666f,-0.74613f},{0.666605f,0.0358181f,-0.74455f},{0.628162f,0.235219f,-0.741677f}, {0.529309f,0.420798f,-0.736723f},{0.367696f,0.579372f,-0.727412f},{0.253299f,0.765813f,-0.591076f}, {0.239904f,0.778869f,-0.57949f},{0.155817f,0.364748f,-0.917976f},{0.0934699f,0.390725f,-0.91575f}, {-0.0428585f,0.321547f,-0.945923f},{-0.16274f,0.162966f,-0.973118f},{-0.222045f,-0.0578604f,-0.973318f}, {-0.196312f,-0.258955f,-0.945729f},{-0.111267f,-0.384068f,-0.916576f},{0.00190306f,-0.435736f,-0.900072f}, {0.130312f,-0.42732f,-0.89466f},{0.263266f,-0.362605f,-0.893985f},{0.379493f,-0.249171f,-0.89101f}, {0.455659f,-0.111402f,-0.883156f},{0.483731f,0.022104f,-0.874938f},{0.469613f,0.140137f,-0.871679f}, {0.418676f,0.244517f,-0.874598f},{0.333936f,0.331632f,-0.88233f},{0.274051f,0.497279f,-0.823171f}, {0.259802f,0.511801f,-0.818879f},{0.196491f,0.175512f,-0.964669f},{0.137502f,0.144211f,-0.979947f}, {0.0851134f,0.0758425f,-0.993481f},{0.0551697f,-0.0171193f,-0.99833f},{0.0548916f,-0.101711f,-0.993298f}, {0.0738492f,-0.156685f,-0.984884f},{0.101758f,-0.187181f,-0.977041f},{0.142158f,-0.201712f,-0.969073f}, {0.202039f,-0.192944f,-0.960184f},{0.271485f,-0.147866f,-0.951016f},{0.324833f,-0.0743643f,-0.942843f}, {0.347908f,0.000269599f,-0.937529f},{0.347281f,0.0599932f,-0.93584f},{0.33107f,0.108334f,-0.937367f}, {0.299181f,0.148955f,-0.942498f},{0.252396f,0.174568f,-0.951747f},{-0.101791f,0.89554f,0.433181f}, {-0.10134f,0.982935f,0.153519f},{-0.198237f,0.947331f,0.251529f},{-0.164187f,0.866134f,0.472075f}, {-0.328502f,0.861858f,0.386377f},{-0.22236f,0.81515f,0.534871f},{-0.407264f,0.738985f,0.53669f}, {-0.261475f,0.745438f,0.61315f},{-0.423584f,0.613071f,0.666874f},{-0.268118f,0.677242f,0.685169f}, {-0.392497f,0.519335f,0.759103f},{-0.24919f,0.634149f,0.731956f},{-0.338078f,0.471162f,0.814684f}, {-0.22364f,0.617892f,0.753787f},{-0.270615f,0.460525f,0.84539f},{-0.194833f,0.616506f,0.762863f}, {-0.183681f,0.479089f,0.858333f},{-0.149814f,0.630977f,0.761199f},{-0.0646262f,0.532383f,0.844033f}, {-0.0833697f,0.671555f,0.736249f},{0.0858598f,0.628864f,0.77276f},{-0.0110594f,0.735267f,0.677687f}, {0.225661f,0.746376f,0.626099f},{0.0402802f,0.800838f,0.597525f},{0.297614f,0.844032f,0.446135f}, {0.0578062f,0.850871f,0.522185f},{0.287181f,0.911623f,0.294058f},{0.0462129f,0.884f,0.465197f}, {0.212292f,0.957645f,0.194545f},{0.0112676f,0.903058f,0.429371f},{0.0946535f,0.984007f,0.1509f}, {-0.0411956f,0.907323f,0.418412f},{-0.0768357f,0.963819f,-0.255243f},{-0.231191f,0.968651f,-0.0909206f}, {-0.478011f,0.865024f,0.152442f},{-0.613761f,0.668302f,0.420321f},{-0.621661f,0.468695f,0.627584f}, {-0.555999f,0.333983f,0.761131f},{-0.465216f,0.269773f,0.843087f},{-0.358395f,0.248428f,0.899909f}, {-0.215945f,0.246155f,0.944868f},{-0.00160027f,0.275933f,0.961176f},{0.307449f,0.391756f,0.867181f}, {0.57879f,0.576987f,0.57627f},{0.658558f,0.716536f,0.229952f},{0.597679f,0.801598f,-0.0148259f}, {0.460401f,0.872625f,-0.162965f},{0.266984f,0.934523f,-0.235344f},{0.103983f,0.993374f,-0.048947f}, {0.105796f,0.993123f,-0.0501399f},{-0.0197862f,0.790362f,-0.61232f},{-0.242279f,0.852503f,-0.463184f}, {-0.632416f,0.763443f,-0.131166f},{-0.817379f,0.505342f,0.276625f},{-0.788174f,0.265216f,0.555375f}, {-0.687043f,0.131972f,0.714531f},{-0.56985f,0.0751975f,0.818301f},{-0.421735f,0.0372272f,0.905954f}, {-0.203784f,-0.0289837f,0.978587f},{0.124815f,-0.104369f,0.986675f},{0.577569f,-0.0689256f,0.813427f}, {0.917184f,0.152931f,0.367949f},{0.924202f,0.373489f,-0.0797226f},{0.792991f,0.508953f,-0.334863f}, {0.620113f,0.617825f,-0.483478f},{0.394039f,0.719565f,-0.571804f},{0.224221f,0.865854f,-0.447239f}, {0.212217f,0.873358f,-0.438418f},{0.0136589f,0.693472f,-0.720354f},{-0.145306f,0.729801f,-0.668039f}, {-0.601517f,0.69868f,-0.387329f},{-0.891335f,0.442876f,0.0968627f},{-0.872552f,0.175056f,0.45608f}, {-0.763231f,0.0371769f,0.645055f},{-0.642575f,-0.0180662f,0.76601f},{-0.48495f,-0.0563598f,0.872724f}, {-0.238167f,-0.142315f,0.960741f},{0.123424f,-0.279803f,0.952091f},{0.574493f,-0.347868f,0.740908f}, {0.939284f,-0.188771f,0.28655f},{0.979786f,0.0995065f,-0.173547f},{0.850407f,0.302179f,-0.430692f}, {0.68788f,0.4362f,-0.580131f},{0.478047f,0.550419f,-0.684478f},{0.3163f,0.607377f,-0.72873f}, {0.292721f,0.633415f,-0.71631f} }; static GLfloat textures [152][2] = { {0.0f,1.0f},{0.0f,0.875f},{0.0625f,0.875f}, {0.0625f,1.0f},{0.125f,0.875f},{0.125f,1.0f}, {0.1875f,0.875f},{0.1875f,1.0f},{0.25f,0.875f}, {0.25f,1.0f},{0.3125f,0.875f},{0.3125f,1.0f}, {0.375f,0.875f},{0.375f,1.0f},{0.4375f,0.875f}, {0.4375f,1.0f},{0.5f,0.875f},{0.5f,1.0f}, {0.5625f,0.875f},{0.5625f,1.0f},{0.625f,0.875f}, {0.625f,1.0f},{0.6875f,0.875f},{0.6875f,1.0f}, {0.75f,0.875f},{0.75f,1.0f},{0.8125f,0.875f}, {0.8125f,1.0f},{0.875f,0.875f},{0.875f,1.0f}, {0.9375f,0.875f},{0.9375f,1.0f},{1.0f,0.875f}, {0.0f,0.75f},{0.0625f,0.75f},{0.125f,0.75f}, {0.1875f,0.75f},{0.25f,0.75f},{0.3125f,0.75f}, {0.375f,0.75f},{0.4375f,0.75f},{0.5f,0.75f}, {0.5625f,0.75f},{0.625f,0.75f},{0.6875f,0.75f}, {0.75f,0.75f},{0.8125f,0.75f},{0.875f,0.75f}, {0.9375f,0.75f},{1.0f,0.75f},{0.0f,0.625f}, {0.0625f,0.625f},{0.125f,0.625f},{0.1875f,0.625f}, {0.25f,0.625f},{0.3125f,0.625f},{0.375f,0.625f}, {0.4375f,0.625f},{0.5f,0.625f},{0.5625f,0.625f}, {0.625f,0.625f},{0.6875f,0.625f},{0.75f,0.625f}, {0.8125f,0.625f},{0.875f,0.625f},{0.9375f,0.625f}, {1.0f,0.625f},{0.0f,0.5f},{0.0625f,0.5f}, {0.125f,0.5f},{0.1875f,0.5f},{0.25f,0.5f}, {0.3125f,0.5f},{0.375f,0.5f},{0.4375f,0.5f}, {0.5f,0.5f},{0.5625f,0.5f},{0.625f,0.5f}, {0.6875f,0.5f},{0.75f,0.5f},{0.8125f,0.5f}, {0.875f,0.5f},{0.9375f,0.5f},{1.0f,0.5f}, {0.0f,0.375f},{0.0625f,0.375f},{0.125f,0.375f}, {0.1875f,0.375f},{0.25f,0.375f},{0.3125f,0.375f}, {0.375f,0.375f},{0.4375f,0.375f},{0.5f,0.375f}, {0.5625f,0.375f},{0.625f,0.375f},{0.6875f,0.375f}, {0.75f,0.375f},{0.8125f,0.375f},{0.875f,0.375f}, {0.9375f,0.375f},{1.0f,0.375f},{0.0f,0.25f}, {0.0625f,0.25f},{0.125f,0.25f},{0.1875f,0.25f}, {0.25f,0.25f},{0.3125f,0.25f},{0.375f,0.25f}, {0.4375f,0.25f},{0.5f,0.25f},{0.5625f,0.25f}, {0.625f,0.25f},{0.6875f,0.25f},{0.75f,0.25f}, {0.8125f,0.25f},{0.875f,0.25f},{0.9375f,0.25f}, {1.0f,0.25f},{0.0f,0.125f},{0.0625f,0.125f}, {0.125f,0.125f},{0.1875f,0.125f},{0.25f,0.125f}, {0.3125f,0.125f},{0.375f,0.125f},{0.4375f,0.125f}, {0.5f,0.125f},{0.5625f,0.125f},{0.625f,0.125f}, {0.6875f,0.125f},{0.75f,0.125f},{0.8125f,0.125f}, {0.875f,0.125f},{0.9375f,0.125f},{1.0f,0.125f}, {0.0f,1.25145e-008f},{0.0625f,1.25145e-008f},{0.125f,1.25145e-008f}, {0.1875f,1.25145e-008f},{0.25f,1.25145e-008f},{0.3125f,1.25145e-008f}, {0.375f,1.25145e-008f},{0.4375f,1.25145e-008f},{0.5f,1.25145e-008f}, {0.5625f,1.25145e-008f},{0.625f,1.25145e-008f},{0.6875f,1.25145e-008f}, {0.75f,1.25145e-008f},{0.8125f,1.25145e-008f},{0.875f,1.25145e-008f}, {0.9375f,1.25145e-008f},{1.0f,0.125f} }; /*Material indicies*/ /*{material index,face count}*/ static int material_ref [3][2] = { {0,112}, {1,224}, {0,112} }; //comment out /* struct DIB2D{ BITMAPINFOHEADER *Info; RGBQUAD *palette; BYTE *bits; }; struct GLTXTLOAD{ GLint format; GLint perpixel; GLint Width; GLint Height; BYTE* bits; }; */ /* BOOL LoadDIB(char*file,DIB2D*dib) Only trueColor and 256 color ucompressed bitmaps supported */ //comment out /* BOOL LoadDIB(char*file,DIB2D*dib) { BOOL result=FALSE; HANDLE hfile=CreateFile(file,GENERIC_READ,FILE_SHARE_READ,NULL,OPEN_EXISTING ,FILE_ATTRIBUTE_NORMAL,0); if(hfile!=INVALID_HANDLE_VALUE) { DWORD readed; int size=GetFileSize(hfile,0); if(size>sizeof(BITMAPFILEHEADER)) { BITMAPFILEHEADER bmfh; ReadFile(hfile,&bmfh,sizeof(BITMAPFILEHEADER),&readed,0); if((readed==sizeof(BITMAPFILEHEADER)) && (bmfh.bfType==0x4d42)) { dib->Info=(BITMAPINFOHEADER*)(new BYTE[size-sizeof(BITMAPFILEHEADER)]); ReadFile(hfile,dib->Info,size-sizeof(BITMAPFILEHEADER),&readed,0); dib->bits=(BYTE*)(dib->Info+1); if(dib->Info->biBitCount==8) { dib->palette=(RGBQUAD*)dib->bits; if(dib->Info->biClrUsed)dib->bits+=dib->Info->biClrUsed*4;else dib->bits+=1024; }else{ dib->palette=NULL; } result=TRUE; } } CloseHandle(hfile); } return result; }; long ScanBytes(int pixWidth, int bitsPixel) { return (((long)pixWidth*bitsPixel+31) / 32) * 4; } BOOL ScaleImage(DIB2D&dib,GLTXTLOAD&p) { GLint glMaxTexDim; // OpenGL maximum texture dimension GLint XDMaxTexDim=512; // user maximum texture dimension GLint minsize =2; double xPow2, yPow2; int ixPow2, iyPow2; int xSize2, ySize2; GLint m_iWidth=dib.Info->biWidth; GLint m_iHeight=dib.Info->biHeight; glGetIntegerv(GL_MAX_TEXTURE_SIZE, &glMaxTexDim); glMaxTexDim = min(XDMaxTexDim, glMaxTexDim); if (m_iWidth <= glMaxTexDim) xPow2 = log((double)m_iWidth) / log(2.0); else xPow2 = log((double)glMaxTexDim) / log(2.0); if (m_iHeight <= glMaxTexDim) yPow2 = log((double)m_iHeight) / log(2.0); else yPow2 = log((double)glMaxTexDim) / log(2.0); ixPow2 = (int)xPow2; iyPow2 = (int)yPow2; if (xPow2 != (double)ixPow2) ixPow2++; if (yPow2 != (double)iyPow2) iyPow2++; xSize2 = 1 << ixPow2; ySize2 = 1 << iyPow2; if(xSize2<minsize)xSize2=minsize; if(ySize2<minsize)ySize2=minsize; if(((xSize2==m_iWidth) && (ySize2==m_iHeight))) { if(dib.Info->biBitCount==24){ p.format=GL_BGR_EXT; p.perpixel=3; return FALSE; } if(dib.Info->biBitCount==32) { p.format=GL_BGRA_EXT; p.perpixel=4; return FALSE; } } BYTE *bits=(BYTE *)dib.bits; if(dib.Info->biBitCount==8){ // convert to TRUECOLOR int _perline=ScanBytes(8,m_iWidth); int perline=ScanBytes(24,m_iWidth); bits= new BYTE[perline*m_iHeight * sizeof(BYTE)]; for(int y=0;y<m_iHeight;y++){ BYTE *_b=((BYTE *)dib.bits)+y*_perline; BYTE *b=bits+y*perline; for(int x=0;x<m_iWidth;x++){ RGBQUAD _p=dib.palette[*_b]; _b++; *b=_p.rgbBlue;b++; *b=_p.rgbGreen;b++; *b=_p.rgbRed;b++; } } } BOOL isAlpha=(dib.Info->biBitCount==32); int _mem_size=xSize2 * ySize2 * sizeof(BYTE); if(isAlpha){ _mem_size*=4; p.perpixel=4; p.format=GL_BGRA_EXT; }else { _mem_size*=3; p.perpixel=3; p.format=GL_BGR_EXT; } BYTE *pData = (BYTE*)new BYTE[_mem_size]; if (!pData) return FALSE; if(isAlpha){ gluScaleImage(GL_BGRA_EXT, m_iWidth, m_iHeight, GL_UNSIGNED_BYTE, bits, xSize2, ySize2, GL_UNSIGNED_BYTE, pData); } else gluScaleImage(GL_RGB, m_iWidth, m_iHeight, GL_UNSIGNED_BYTE, bits, xSize2, ySize2, GL_UNSIGNED_BYTE, pData); if(bits!=dib.bits)delete bits; // m_pBits = pData; m_iWidth = xSize2 ; m_iHeight = ySize2 ; p.Width=m_iWidth; p.Height=m_iHeight; p.bits=pData; return TRUE ; } void LoadTexture(char*filename) { DIB2D dib; GLTXTLOAD load; if(LoadDIB(filename,&dib)) { glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); if(ScaleImage(dib,load)) { glTexImage2D(GL_TEXTURE_2D,0,load.perpixel, load.Width,load.Height,0, load.format,GL_UNSIGNED_BYTE, load.bits); delete load.bits; }else{ glTexImage2D(GL_TEXTURE_2D,0,load.perpixel, dib.Info->biWidth,dib.Info->biHeight, 0,load.format,GL_UNSIGNED_BYTE,dib.bits); } delete dib.Info; } //DeleteObject(hbitmap); }; */ void MyMaterial(GLenum mode,GLfloat *f,GLfloat alpha) { GLfloat d[4]; d[0]=f[0]; d[1]=f[1]; d[2]=f[2]; d[3]=alpha; glMaterialfv (GL_FRONT_AND_BACK,mode,d); } /* * SelectMaterial uses OpenGL commands to define facet colors. * * Returns: * Nothing */ void SelectMaterial(int i) { // // Define the reflective properties of the 3D Object faces. // glEnd(); GLfloat alpha=materials[i].alpha; MyMaterial (GL_AMBIENT, materials[i].ambient,alpha); MyMaterial (GL_DIFFUSE, materials[i].diffuse,alpha); MyMaterial (GL_SPECULAR, materials[i].specular,alpha); MyMaterial (GL_EMISSION, materials[i].emission,alpha); glMaterialf (GL_FRONT_AND_BACK,GL_SHININESS,materials[i].phExp); glEnd(); if(materials[i].texture>-1) { glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D,texture_maps[materials[i].texture].id); } else glDisable(GL_TEXTURE_2D); glBegin(GL_TRIANGLES); glBegin(GL_TRIANGLES); }; GLint Gen3DObjectList() { int i; int j; GLuint texture_name; for(i=0;i<244;i++){ vertices[i][2]-=5; } glGenTextures(1,&texture_name); texture_maps[0].id=texture_name; glBindTexture(GL_TEXTURE_2D,texture_name); //LoadTexture(texture_maps[0].name); GLint lid=glGenLists(1); int mcount=0; int mindex=0; glNewList(lid, GL_COMPILE); glBegin (GL_TRIANGLES); for(i=0;i<sizeof(face_indicies)/sizeof(face_indicies[0]);i++) { if(!mcount) { SelectMaterial(material_ref[mindex][0]); mcount=material_ref[mindex][1]; mindex++; } mcount--; for(j=0;j<3;j++) { int vi=face_indicies[i][j]; int ni=face_indicies[i][j+3];//Normal index int ti=face_indicies[i][j+6];//Texture index glNormal3f (normals[ni][0],normals[ni][1],normals[ni][2]); glTexCoord2f(textures[ti][0],textures[ti][1]); glVertex3f (vertices[vi][0],vertices[vi][1],vertices[vi][2]); } } glEnd (); glEndList(); return lid; };