summaryrefslogtreecommitdiffstats
path: root/Cubehole.h
diff options
context:
space:
mode:
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);