summaryrefslogtreecommitdiffstats
path: root/DisplayClass.h
blob: ee245af66b1f970b72e5ca90052d3ea0f229da95 (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
#ifndef _DISPLAYCLASS_H_
#define _DISPLAYCLASS_H_

#include "BSPTree.h"
#include "gl.h"
#include "House.h"
#include "Keys.h"

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

    void renderScene(unsigned long delta, const Keyset &keys);

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

    static Renderer render;

    float angleY, angleX;
    float distance, distanceh;
    int x, y, z;
    //Cubehole cubehole0, cubehole1, cubehole2, cubehole3, cubehole4, cubehole5;
    std::list<Triangle> triangles;
    void handleKeys(unsigned long delta, const Keyset &keys);
    //BSPTree *tree;
};
#endif /*_DISPLAYCLASS_H_*/