#ifndef _TEMPARRAY_H_ #define _TEMPARRAY_H_ #include "Cubehole.h" #include "gl.h" #include class Temparray { public: Temparray(float initialtemp, int x0, int y0, int z0); ~Temparray(){ } void setTemp(float temp, int x, int y, int z, int line, int pos){ temperature(x, y, z, line, pos) = temp; calcAverage(); } void deactivateCube(int x, int y, int z){ for(int i=0; i<6; i++){ for(int j=0; j<4; j++){ setTemp(-100, x, y, z, i, j); } } } std::list getTriangles(); private: float *temparray; Cubehole *cubearray; int sx, sy, sz; float averagetemp; float& temperature(int x, int y, int z, int line, int pos) { return temparray[x*sy*sz*6*4 + y*sz*6*4 + z*6*4 + line*4 + pos]; } Cubehole& cubehole(int x, int y, int z, int line) { return cubearray[x*sy*sz*6 + y*sz*6 + z*6 + line]; } // void setColor(int x, int y, int z, int line){ // } void tempInit(float temp0, int x0, int y0, int z0){ for(int i=0; i