From bb5829eaf5cad431bfe3a8c7df2634fedc27a9f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20Ri=DF?= Date: Sun, 17 Jan 2010 18:20:19 +0100 Subject: =?UTF-8?q?startet=20ein=20bisschen=20anders/weniger=20Bl=F6cke=20?= =?UTF-8?q?aufgrund=20langsamkeit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DisplayClass.cpp | 13 ++++++++++--- DisplayClass.h | 1 + main.cpp | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/DisplayClass.cpp b/DisplayClass.cpp index d5d6b50..712251a 100644 --- a/DisplayClass.cpp +++ b/DisplayClass.cpp @@ -48,9 +48,11 @@ DisplayClass::DisplayClass(int x, int y, int z) : angle(0) { std::list t5 = cubehole5.getTriangles(); triangles.splice(triangles.end(), t5);*/ - Temparray temp(20, x, y, z); - triangles=temp.getTriangles(); - +// Temparray temp(20, x, y, z); +// triangles=temp.getTriangles(); +this->x=x; +this->y=y; +this->z=z; //tree = new BSPTree(triangles); } @@ -72,6 +74,11 @@ void DisplayClass::renderScene(unsigned long delta) { glRotatef(angle*3, 0.0, 0.0, 1.0); glRotatef(-angle*5, 1.0, 1.0, 1.0); + + Temparray temp(20, x, y, z); + triangles=temp.getTriangles(); + temp.calcTemp(); + //vmml::mat4f transform, inverseTransform; //glGetFloatv(GL_MODELVIEW_MATRIX, transform.array); diff --git a/DisplayClass.h b/DisplayClass.h index 2145966..175a1dc 100644 --- a/DisplayClass.h +++ b/DisplayClass.h @@ -23,6 +23,7 @@ class DisplayClass static Renderer render; float angle; + int x, y, z; //Cubehole cubehole0, cubehole1, cubehole2, cubehole3, cubehole4, cubehole5; std::list triangles; //BSPTree *tree; diff --git a/main.cpp b/main.cpp index d0a294c..27e4983 100644 --- a/main.cpp +++ b/main.cpp @@ -233,7 +233,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine ticks += delta; - static DisplayClass render(5, 5, 5); + static DisplayClass render(3, 3, 3); render.renderScene(delta); SwapBuffers(hDC); } -- cgit v1.2.3