summaryrefslogtreecommitdiffstats
path: root/Temparray.h
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2009-12-23 22:14:16 +0100
committerConstantin Riß <constantin.riss@dre.de>2009-12-23 22:14:16 +0100
commit85939636049685a2bed67110bd9e8bb663069954 (patch)
tree6cf9cc219e712eb60fa09b9a6fba6c9083cb4243 /Temparray.h
parentd2abe4f728824ef708dd1f316f4f211fb799251d (diff)
downloadc3d-85939636049685a2bed67110bd9e8bb663069954.tar
c3d-85939636049685a2bed67110bd9e8bb663069954.zip
Temperaturinitialisierung und Temperaturänderung von Temparray hinzugefügt.
Diffstat (limited to 'Temparray.h')
-rw-r--r--Temparray.h27
1 files changed, 24 insertions, 3 deletions
diff --git a/Temparray.h b/Temparray.h
index 05be3a0..6afbe3c 100644
--- a/Temparray.h
+++ b/Temparray.h
@@ -2,22 +2,43 @@
#define _TEMPARRAY_H_
#include "Cubehole.h"
+#include "gl.h"
class Temparray
{
public:
- Temparray(float initialtemp, int size0[3]){
- teperature = new float[size0[0]][size0[0]][size0[0]][4][6];
- cubearray = new Cubehole[size0[0]][size0[0]][size0[0]];
+ 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(){
delete[] temperature;
delete[] cubearray;
}
+ void setTemp(float temp, int x, int y, int z, int direct, int pos){
+ temperature[x][y][z][direct][pos]= temp;
+ }
+ void display();
+
private:
float *temperature = 0;
Cubehole *cubearray = 0;
+
+ 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++){
+ for(int l=0; l<4; l++){
+ for(int m=0; m<6; m++){
+ setTemp(temp0, i, j, k, l, m);
+ }
+ }
+ }
+ }
+ }
+ }
};
#endif /* _TEMPARRAY_H_ */