From bfa11fa56f513f68cfd9ec1da1443c5cf624c4dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Constantin=20Ri=C3=9F?= Date: Thu, 3 Dec 2009 22:15:45 +0100 Subject: Dateien zu adden wurde nachgeholt. --- Cubehole.h | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 Cubehole.h (limited to 'Cubehole.h') 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 + +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 getTriangles(const Matrix &modelview); + + private: + float x, y, z, width, height, depth, innerwidth, innerdepth; + +}; + +#endif /*_CUBEHOLE_H_*/ -- cgit v1.2.3