summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2009-12-10 21:43:38 +0100
committerConstantin Riß <constantin.riss@dre.de>2009-12-10 21:43:38 +0100
commit327f92f8d668da57febe51b84e52667c241d4ba4 (patch)
treef940597a348cf46cf641cc2cda266c4395c31c38
parente744ab213aeaccfe1aea6050907019aad9cf1911 (diff)
downloadc3d-327f92f8d668da57febe51b84e52667c241d4ba4.tar
c3d-327f92f8d668da57febe51b84e52667c241d4ba4.zip
Größen bei Cubehole verbessert/richtig eingestellt.
-rw-r--r--Cubehole.cpp30
-rw-r--r--Cubehole.h18
2 files changed, 8 insertions, 40 deletions
diff --git a/Cubehole.cpp b/Cubehole.cpp
index 0806f79..03ddc28 100644
--- a/Cubehole.cpp
+++ b/Cubehole.cpp
@@ -17,33 +17,3 @@ std::list<Triangle> Cubehole::getTriangles()
return triangles;
}
-
-float Cubehole::getHeight()
-{
- return height;
-}
-
-float Cubehole::getWidth()
-{
- return width;
-}
-
-float Cubehole::getDepth()
-{
- return depth;
-}
-
-float Cubehole::getPosX()
-{
- return x;
-}
-
-float Cubehole::getPosY()
-{
- return y;
-}
-
-float Cubehole::getPosZ()
-{
- return z;
-}
diff --git a/Cubehole.h b/Cubehole.h
index c8e8736..a31fae9 100644
--- a/Cubehole.h
+++ b/Cubehole.h
@@ -24,12 +24,12 @@ class Cubehole
left.setRotate(270);
}
- float getHeight();
- float getWidth();
- float getDepth();
- float getPosX();
- float getPosY();
- float getPosZ();
+ float getHeight() {return height;}
+ float getWidth() {return width;}
+ float getDepth() {return depth;}
+ float getPosX() {return x;}
+ float getPosY() {return y;}
+ float getPosZ() {return z;}
float getInnerWidth() {return innerwidth;}
float getInnerDepth() {return innerdepth;}
@@ -41,11 +41,10 @@ class Cubehole
innerwidth = iw;
innerdepth = id;
front.setSize(width, innerwidth, height, (depth-innerdepth)/2);
- right.setSize(width, innerdepth, height, (width-innerwidth)/2);
+ right.setSize(depth, innerdepth, height, (width-innerwidth)/2);
back.setSize(width, innerwidth, height, (depth-innerdepth)/2);
- left.setSize(width, innerdepth, height, (width-innerwidth)/2);
+ left.setSize(depth, innerdepth, height, (width-innerwidth)/2);
}
-
void setPos(float x0, float y0, float z0) {
x = x0;
y = y0;
@@ -55,7 +54,6 @@ class Cubehole
back.setPos(x, y, depth-(depth-innerdepth)/2);
left.setPos(x, y, width-(width-innerwidth)/2);
}
-
void setColor(const vmml::vec4f &cf, const vmml::vec4f &cr, const vmml::vec4f &cb, const vmml::vec4f &cl) {
front.setColor(cf);
right.setColor(cr);