summaryrefslogtreecommitdiffstats
path: root/DisplayClass.h
diff options
context:
space:
mode:
Diffstat (limited to 'DisplayClass.h')
-rw-r--r--DisplayClass.h22
1 files changed, 17 insertions, 5 deletions
diff --git a/DisplayClass.h b/DisplayClass.h
index d297ca4..0341469 100644
--- a/DisplayClass.h
+++ b/DisplayClass.h
@@ -1,8 +1,7 @@
#ifndef _DISPLAYCLASS_H_
#define _DISPLAYCLASS_H_
-#include "Cuboid.h"
-#include "Cubehole.h"
+#include "Trapezocube.h"
class DisplayClass
{
@@ -12,11 +11,24 @@ class DisplayClass
void renderScene(unsigned long delta);
private:
- struct RenderVisitor {
- void operator() (const Triangle &t) const;
+ struct OpaqueRenderer {
+ void operator() (const Triangle &t) const {
+ if(t.getColor().a() == 1.0)
+ t.render();
+ }
};
- Cuboid cubes[5][5][5];
+ struct TransparentRenderer {
+ void operator() (const Triangle &t) const {
+ if(t.getColor().a() != 1.0)
+ t.render();
+ }
+ };
+
+ static OpaqueRenderer opaqueRenderer;
+ static TransparentRenderer transparentRenderer;
+
+ Trapezocube cubeing[8];
};
#endif /*_DISPLAYCLASS_H_*/