diff options
author | Constantin Riß <constantin.riss@dre.de> | 2009-12-23 22:55:41 +0100 |
---|---|---|
committer | Constantin Riß <constantin.riss@dre.de> | 2009-12-23 22:55:41 +0100 |
commit | 349b62dc7563be0817df55f0b4c8db5dfef6642f (patch) | |
tree | 476fe0a7a6cc1cf4102c6a7efc2fadeee962bc97 /Temparray.h | |
parent | 0a29cdf46803de6887fc6ab43b2592f803ebe1e6 (diff) | |
download | c3d-349b62dc7563be0817df55f0b4c8db5dfef6642f.tar c3d-349b62dc7563be0817df55f0b4c8db5dfef6642f.zip |
CMakeLists aktualisiert und fehlerhaftes Temparray ohne Lösung :'-(
Diffstat (limited to 'Temparray.h')
-rw-r--r-- | Temparray.h | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/Temparray.h b/Temparray.h index 629a4fe..72b5068 100644 --- a/Temparray.h +++ b/Temparray.h @@ -7,10 +7,11 @@ class Temparray { public: - Temparray(float initialtemp, int size[3]){ - teperature = new float[size[0]][size[1]][size[2]][4][6]; - cubearray = new Cubehole[size[0]][size[1]][size[2]]; - tempInit(initialtemp, size); + Temparray(float initialtemp, int size0[3]){ + float *temperature = new float[size0[0]][size0[1]][size0[2]][4][6]; + Cubehole *cubearray = new Cubehole[size0[0]][size0[1]][size0[2]]; + tempInit(initialtemp, size0); + size[0] = size0[0]; size[1] = size0[1];size[2] = size0[2]; } ~Temparray(){ delete[] temperature; @@ -18,7 +19,7 @@ class Temparray } void setTemp(float temp, int x, int y, int z, int direct, int pos){ - temperature[x][y][z][direct][pos]= temp; + temperature[x][y][z][direct][pos] = temp; } void deactivateCube(int x, int y, int z){ for(int i=0; i<4; i++){ @@ -30,13 +31,14 @@ class Temparray void display(); private: - float *temperature = 0; - Cubehole *cubearray = 0; + float *temperature; + Cubehole *cubearray; + int size[3]; - void tempInit(float temp0, int size[3]){ - for(int i=0; i<size[0]; i++){ - for(int j=0; j<size[1]; j++){ - for(int k=0; k<size[2]; k++){ + void tempInit(float temp0, int size0[3]){ + for(int i=0; i<size0[0]; i++){ + for(int j=0; j<size0[1]; j++){ + for(int k=0; k<size0[2]; k++){ for(int l=0; l<4; l++){ for(int m=0; m<6; m++){ setTemp(temp0, i, j, k, l, m); |