summaryrefslogtreecommitdiffstats
path: root/DisplayClass.h
blob: 5b646edb6d151c943037c2cdea00854d590f15b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef _DISPLAYCLASS_H_
#define _DISPLAYCLASS_H_

//#include "Cubehole.h"
//#include "Temparray.h"
#include "BSPTree.h"
#include "gl.h"
#include "House.h"
#include <bitset>

class DisplayClass
{
  public:
    DisplayClass(int x, int y, int z);
    virtual ~DisplayClass();

    void renderScene(unsigned long delta, std::bitset<256>& keys);

  private:
    struct Renderer {
      void operator() (const Triangle &t) const {
        t.render();
      }
    };

    static Renderer render;

    float angle;
    int x, y, z;
    //Cubehole cubehole0, cubehole1, cubehole2, cubehole3, cubehole4, cubehole5;
    std::list<Triangle> triangles;
    void keyhandler(std::bitset<256>& keys);
    //BSPTree *tree;
};
#endif /*_DISPLAYCLASS_H_*/