2125 SphereNormal temp; 2126 for (int y2=0;y2<=scaled_square_size;y2++) 2127 { 2128 my1 = my + y2; 2129 2130 for (int x2=0;x2<=scaled_square_size;x2++) 2131 { 2132 mx1 = mx + x2; 2133 2134 float q = qualities_interp[y2][x2]; 2135 temp.phi = (normals[my1][mx1]->phi + (normals_2[my1][mx1]->phi - normals[my1][mx1]->phi) * q); 2136 temp.theta = (normals[my1][mx1]->theta + (normals_2[my1][mx1]->theta - normals[my1][mx1]->theta) * q ); 2137 2138 float S = sin(temp.phi); 2139 calc_normals[y2][x2].x = S * cos(temp.theta); 2140 calc_normals[y2][x2].y = S * sin(temp.theta); 2141 calc_normals[y2][x2].z = cos(temp.phi); 2142 2143 } 2144 }