diff options
Diffstat (limited to 'Cubehole.h')
-rw-r--r-- | Cubehole.h | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Cubehole.h b/Cubehole.h new file mode 100644 index 0000000..3f8f689 --- /dev/null +++ b/Cubehole.h @@ -0,0 +1,53 @@ +#ifndef _CUBEHOLE_H_ +#define _CUBEHOLE_H_ + +#include "Triangle.h" +#include "Matrix.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_*/ |