diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-12-10 09:08:16 +0100 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-12-10 09:08:16 +0100 |
commit | 1a321ed999334f0d9f5255249ebeeed0278871d6 (patch) | |
tree | fee0b09118849287d11346ee262dfc2ac81800ec /DisplayClass.h | |
parent | 59b00645ccfbade509b1d1694c9fcfc68e013a10 (diff) | |
download | c3d-1a321ed999334f0d9f5255249ebeeed0278871d6.tar c3d-1a321ed999334f0d9f5255249ebeeed0278871d6.zip |
Benutzte BSPTrees zum rendern
Diffstat (limited to 'DisplayClass.h')
-rw-r--r-- | DisplayClass.h | 22 |
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_*/ |