summaryrefslogtreecommitdiffstats
path: root/Temparray.h
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2009-12-30 12:37:26 +0100
committerConstantin Riß <constantin.riss@dre.de>2009-12-30 12:37:26 +0100
commitd0b6aa0c6406c0a22404d8999f889242cef54e1e (patch)
tree30ad42fb868459ca450d4b09ebc43c330851a018 /Temparray.h
parent349b62dc7563be0817df55f0b4c8db5dfef6642f (diff)
downloadc3d-d0b6aa0c6406c0a22404d8999f889242cef54e1e.tar
c3d-d0b6aa0c6406c0a22404d8999f889242cef54e1e.zip
Temparray fehler behoben.
Diffstat (limited to 'Temparray.h')
-rw-r--r--Temparray.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/Temparray.h b/Temparray.h
index 72b5068..fe9e91b 100644
--- a/Temparray.h
+++ b/Temparray.h
@@ -7,11 +7,11 @@
class Temparray
{
public:
- 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(float initialtemp, int x0, int y0, int z0){
+ float *temperature = new float[x0, y0, z0, 4, 6];
+ Cubehole *cubearray = new Cubehole[x0, y0, z0];
+ tempInit(initialtemp, x0, y0, z0);
+ size[0] = x0; size[1] = y0; size[2] = z0;
}
~Temparray(){
delete[] temperature;
@@ -19,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++){
@@ -35,10 +35,10 @@ class Temparray
Cubehole *cubearray;
int size[3];
- 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++){
+ void tempInit(float temp0, int x0, int y0, int z0){
+ for(int i=0; i<x0; i++){
+ for(int j=0; j<y0; j++){
+ for(int k=0; k<z0; k++){
for(int l=0; l<4; l++){
for(int m=0; m<6; m++){
setTemp(temp0, i, j, k, l, m);