summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DisplayClass.cpp8
-rw-r--r--Temparray.cpp7
2 files changed, 7 insertions, 8 deletions
diff --git a/DisplayClass.cpp b/DisplayClass.cpp
index 5940cfe..3294fac 100644
--- a/DisplayClass.cpp
+++ b/DisplayClass.cpp
@@ -59,15 +59,15 @@ DisplayClass::~DisplayClass() {
}
void DisplayClass::renderScene(unsigned long delta) {
- angle += delta*0.055;
+ angle += delta*0.025;
if(angle >= 360)
angle -= 360;
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity(); // Clean up matrix
- glTranslatef(0.0, -2.0, -10.0); // Then set up transformation
- glRotatef(15, 1.0, 0.0, 0.0);
+ glTranslatef(0.0, -2.0, -20.0); // Then set up transformation
+ glRotatef(-10, 1.0, 0.0, 0.0);
glRotatef(angle, 0.0, 1.0, 0.0);
// glRotatef(angle*2, 1.0, 0.0, 0.0);
// glRotatef(angle*3, 0.0, 0.0, 1.0);
@@ -75,7 +75,7 @@ void DisplayClass::renderScene(unsigned long delta) {
// static Temparray temp(20, x, y, z);
- static House house(20, x, y, z, 80, 300, 53.55, 0.82, 2.82, 0.0047, 40, 45, 1900, 3, 11500);
+ static House house(20, x, y, z, 100, 400, 53.55, 0.82, 2.82, 0.0047, 40, 45, 1900, 3, 11500);
triangles=house.getTriangles();
house.controller();
//// temp.calcTemp();
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);