From 85f21b7ff3c227c73e8182b0480b6cbf8cb3f28d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20Ri=C3=9F?= Date: Wed, 30 Dec 2009 17:29:46 +0100 Subject: =?UTF-8?q?kleine=20=C3=A4nderung?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Temparray.h | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) (limited to 'Temparray.h') diff --git a/Temparray.h b/Temparray.h index fe9e91b..e730e07 100644 --- a/Temparray.h +++ b/Temparray.h @@ -8,8 +8,8 @@ class Temparray { public: 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]; + float *temperature = new float[x0, y0, z0, 6, 4]; + Cubehole *cubearray = new Cubehole[x0, y0, z0, 6]; tempInit(initialtemp, x0, y0, z0); size[0] = x0; size[1] = y0; size[2] = z0; } @@ -18,29 +18,34 @@ class Temparray delete[] cubearray; } - void setTemp(float temp, int x, int y, int z, int direct, int pos){ - temperature[x, y, z, direct, pos] = temp; + 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<4; i++){ - for(int j=0; j<6; j++){ +/* 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); } } - } + }*/ void display(); private: float *temperature; Cubehole *cubearray; int size[3]; + float averagetemp; + + void setColor(){ + } void tempInit(float temp0, int x0, int y0, int z0){ for(int i=0; i