summaryrefslogtreecommitdiffstats
path: root/Cubehole.h
blob: 9da20261f9f21e4077c61543e5d26b6b1ddff373 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef _CUBEHOLE_H_
#define _CUBEHOLE_H_

#include "Triangle.h"

#include <list>

class Cubehole
{
  public:
    Cubehole(): width(0), height(0), depth(0), x(0), y(0), z(0), innerwidth(0), innerdepth(0) {}
    Cubehole(float width, float height, float depth): x(0), y(0), z(0), innerwidth(0), innerdepth(0){
      setSize(width, height, depth);
    }
    Cubehole(float width, float height, float depth, float x, float y, float z): innerwidth(0), innerdepth(0) {
      setSize(width, height, depth);
      setPos(x, y, z);
    }
    Cubehole(float width, float height, float depth, float x, float y, float z, float innerwidth, float innerdepth) {
      setSize(width, height, depth);
      setPos(x, y, z);
      setInnerSize(innerwidth, innerdepth);
    }
    float getHeight();
    float getWidth();
    float getDepth();
    float getPosX();
    float getPosY();
    float getPosZ();
    float getInnerWidth()
    {
      return innerwidth;
    }
    float getInnerDepth()
    {
      return innerdepth;
    }
    void setInnerSize(float iw, float id)
    {
      innerwidth = iw;
      innerdepth = id;
    }
    void setSize(float w, float h, float d);
    void setPos(float x, float y, float z);
    std::list<Triangle> getTriangles(/*const Matrix &modelview*/);

  private:
    float x, y, z, width, height, depth, innerwidth, innerdepth;

};

#endif /*_CUBEHOLE_H_*/