summaryrefslogtreecommitdiffstats
path: root/Cubehole.h
diff options
context:
space:
mode:
authorConstantin Riß <constantin.riss@dre.de>2009-12-10 22:13:21 +0100
committerConstantin Riß <constantin.riss@dre.de>2009-12-10 22:13:21 +0100
commit7b95a7d4bf899b4e87509ded6bf9633b944febaf (patch)
tree774529c58c79712c41149987e3b6fa89405210f8 /Cubehole.h
parentcb23d219b3b96aa07ac7ed03d7dfdb316c5f9b9b (diff)
downloadc3d-7b95a7d4bf899b4e87509ded6bf9633b944febaf.tar
c3d-7b95a7d4bf899b4e87509ded6bf9633b944febaf.zip
Cubehole wird richtig angezeigt.
Diffstat (limited to 'Cubehole.h')
-rw-r--r--Cubehole.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Cubehole.h b/Cubehole.h
index 3398ef4..835aa62 100644
--- a/Cubehole.h
+++ b/Cubehole.h
@@ -40,18 +40,18 @@ class Cubehole
innerwidth = iw;
innerdepth = id;
front.setSize(width, innerwidth, height, (depth-innerdepth)/2);
- right.setSize(depth, innerdepth, height, (width-innerwidth)/2);
+ right.setSize(innerdepth, depth, height, (width-innerwidth)/2);
back.setSize(width, innerwidth, height, (depth-innerdepth)/2);
- left.setSize(depth, innerdepth, height, (width-innerwidth)/2);
+ left.setSize(innerdepth, depth, height, (width-innerwidth)/2);
}
void setPos(float x0, float y0, float z0) {
x = x0;
y = y0;
z = z0;
- front.setPos(x, y, z/*(depth-(depth-innerdepth)/2*/);
- right.setPos(x-(width-innerwidth)/2, y, z/*width-(width-innerwidth)/2*/);
- back.setPos(x, y, z/*depth-(depth-innerdepth)/2*/);
- left.setPos(x-(width-innerwidth)/2, y, z/*width-(width-innerwidth)/2*/);
+ front.setPos(x, y, z+(depth/2-(depth-innerdepth)/4));
+ right.setPos(x, y, z-(width/2-(width-innerwidth)/4));
+ back.setPos(x, y, z+(depth/2-(depth-innerdepth)/4));
+ left.setPos(x, y, z-(width/2-(width-innerwidth)/4));
}
void setColor(const vmml::vec4f &cf, const vmml::vec4f &cr, const vmml::vec4f &cb, const vmml::vec4f &cl) {
front.setColor(cf);