summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Cuboid.h34
-rw-r--r--DisplayClass.h10
-rw-r--r--main.cpp7
3 files changed, 24 insertions, 27 deletions
diff --git a/Cuboid.h b/Cuboid.h
index 25d9f73..d1c600d 100644
--- a/Cuboid.h
+++ b/Cuboid.h
@@ -5,26 +5,26 @@
#include <list>
-class Cuboid
-{
+class Cuboid
+{
public:
Cuboid() : width(0), height(0), depth(0), x(0), y(0), z(0) {}
- Cuboid(float width, float height, float depth);
- Cuboid(float width, float height, float depth, float x, float y, float z);
- float getHeight();
- float getWidth();
- float getDepth();
- float getPosX();
- float getPosY();
- float getPosZ();
- void setSize(float w, float h, float d);
- void setPos(float x, float y, float z);
- std::list<Triangle> getTriangles();
-
+ Cuboid(float width, float height, float depth);
+ Cuboid(float width, float height, float depth, float x, float y, float z);
+ float getHeight();
+ float getWidth();
+ float getDepth();
+ float getPosX();
+ float getPosY();
+ float getPosZ();
+ void setSize(float w, float h, float d);
+ void setPos(float x, float y, float z);
+ std::list<Triangle> getTriangles();
+
private:
- float width, height, depth;
+ float width, height, depth;
float x, y, z;
-
-};
+
+};
#endif /*_CUBOID_H_*/
diff --git a/DisplayClass.h b/DisplayClass.h
index ab9add0..2145966 100644
--- a/DisplayClass.h
+++ b/DisplayClass.h
@@ -5,12 +5,12 @@
#include "Temparray.h"
#include "BSPTree.h"
-class DisplayClass
-{
+class DisplayClass
+{
public:
DisplayClass(int x, int y, int z);
virtual ~DisplayClass();
-
+
void renderScene(unsigned long delta);
private:
@@ -25,7 +25,7 @@ class DisplayClass
float angle;
//Cubehole cubehole0, cubehole1, cubehole2, cubehole3, cubehole4, cubehole5;
std::list<Triangle> triangles;
- //BSPTree *tree;
-};
+ //BSPTree *tree;
+};
#endif /*_DISPLAYCLASS_H_*/
diff --git a/main.cpp b/main.cpp
index 8d59951..d0a294c 100644
--- a/main.cpp
+++ b/main.cpp
@@ -223,10 +223,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
}
void resize(int width, int height);
-
- void initGL(bool multisample) {
- glClearColor(0.0, 0.0, 0.0, 1.0);//glClearColor(1.0, 0.85, 0.06, 1.0);
- glClearDepth(1.0);
+
delta = GetTickCount()-ticks;
if(delta < MIN_FRAME_DELTA) {
@@ -236,7 +233,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
ticks += delta;
- static DisplayClass render();
+ static DisplayClass render(5, 5, 5);
render.renderScene(delta);
SwapBuffers(hDC);
}