summaryrefslogtreecommitdiffstats
path: root/Temparray.h
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2010-02-08 23:07:48 +0100
committerConstantin Riß <constantin.riss@dre.de>2010-02-08 23:07:48 +0100
commit8fd9c234206718b4f3b3b07ac06a47d4d6c90a18 (patch)
tree931050b85a1cdda8bfa6ac34935c9497bb1ed683 /Temparray.h
parent3b4db495c6fe7452fddc096d3085e44470830694 (diff)
downloadc3d-8fd9c234206718b4f3b3b07ac06a47d4d6c90a18.tar
c3d-8fd9c234206718b4f3b3b07ac06a47d4d6c90a18.zip
kleinere fehler da...
Diffstat (limited to 'Temparray.h')
-rw-r--r--Temparray.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/Temparray.h b/Temparray.h
index 409b780..19040a2 100644
--- a/Temparray.h
+++ b/Temparray.h
@@ -31,12 +31,15 @@ class Temparray
private:
float *temparrayold, *temparraynew;
Cubehole *cubearray;
- int sx, sy, sz;
+ int sx, sy, sz, *weight1, maxweight;
float averagetemp, earthtemp, probetemp, input, inputpower, factor;
Cubehole& cubehole(int x, int y, int z, int line) {
return cubearray[x*sy*sz*6 + y*sz*6 + z*6 + line];
}
+ int& weight(int x, int y, int z){
+ return weight1[x*sy*sz + y*sz + z];
+ }
void mergetemperature(){
for(int i=0; i<sx; i++){
for(int j=0; j<sy; j++){
@@ -77,6 +80,18 @@ class Temparray
averagetemp = tempcache/times;
// std::cerr << averagetemp << std::endl;
}
+ void calcweight();
+ int howmanyweights(int weight0) {
+ int counter = 0;
+ for(int i=0; i<sx; ++i){
+ for(int j=0; j<sy; ++j){
+ for(int k=0; k<sz; ++k){
+ if(weight(i, j, k) == weight0) ++counter;
+ }
+ }
+ }
+ return counter;
+ }
};
#endif /* _TEMPARRAY_H_ */