summaryrefslogtreecommitdiffstats
path: root/Temparray.cpp
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2010-02-09 14:27:49 +0100
committerConstantin Riß <constantin.riss@dre.de>2010-02-09 14:27:49 +0100
commit57935140306a95ba35f713d399f2d917a121d9c3 (patch)
tree09991e0246e4072a5cc3eb342117a1db97f343f4 /Temparray.cpp
parent039f48ee3bb795421b3c50076a0c3ffe633cad00 (diff)
downloadc3d-57935140306a95ba35f713d399f2d917a121d9c3.tar
c3d-57935140306a95ba35f713d399f2d917a121d9c3.zip
...........
Diffstat (limited to 'Temparray.cpp')
-rw-r--r--Temparray.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/Temparray.cpp b/Temparray.cpp
index 1d8f8b7..7615d21 100644
--- a/Temparray.cpp
+++ b/Temparray.cpp
@@ -17,7 +17,7 @@ Temparray::Temparray(float initialtemp, int x0, int y0, int z0){
for(int j = 0; j < y0; ++j) {
for(int k = 0; k < z0; ++k) {
for(int l = 0; l < 6; ++l) {
- cubehole(i, j, k, l).setSize((6-l)/6.0*0.9, 0.9, (6-l)/6.0*0.9, (5-l)/6.0*0.9, (5-l)/6.0*0.9);
+ cubehole(i, j, k, l).setSize((6-l)/6.0*0.9, 0.15, (6-l)/6.0*0.9, (5-l)/6.0*0.9, (5-l)/6.0*0.9);
float x, y, z;
if(x0 % 2 == 0) x = -(x0/2)+i+0.5;
@@ -556,9 +556,8 @@ void Temparray::calcweight() {
}
else if (sx%2 == 1) {
- posx = sx/2.0-1; posx2 = sx/2.0;
- disth = abs(posx-i); disth2 = abs(posx2-i);
- if(disth < disth2) dist += disth; else dist += disth2;
+ posx = sx/2.0-0.5;
+ dist += abs(posx-i);
if (sy%2 == 0) {
posy = sy/2.0-1; posy2 = sy/2.0;
disth = abs(posy-j); disth2 = abs(posy2-j);