summaryrefslogtreecommitdiffstats
path: root/Cubehole.h
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2009-12-03 22:15:45 +0100
committerConstantin Riß <constantin.riss@dre.de>2009-12-03 22:15:45 +0100
commitbfa11fa56f513f68cfd9ec1da1443c5cf624c4dc (patch)
tree7e1e8963f255df7d92a0c4389ae98e006714ddb5 /Cubehole.h
parent9581542002a57f72afcbaebfe1ae6fc3b4021400 (diff)
downloadc3d-bfa11fa56f513f68cfd9ec1da1443c5cf624c4dc.tar
c3d-bfa11fa56f513f68cfd9ec1da1443c5cf624c4dc.zip
Dateien zu adden wurde nachgeholt.
Diffstat (limited to 'Cubehole.h')
-rw-r--r--Cubehole.h53
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_*/