diff options
Diffstat (limited to 'Cubehole.h')
-rw-r--r-- | Cubehole.h | 17 |
1 files changed, 8 insertions, 9 deletions
@@ -10,7 +10,6 @@ class Cubehole { public: Cubehole(): width(0), height(0), depth(0), x(0), y(0), z(0), innerwidth(0), innerdepth(0) {} - Cubehole(float width0, float height0, float depth0, float x0, float y0, float z0, float innerwidth0, float innerdepth0, const vmml::vec4f &colorfront0, const vmml::vec4f &colorright0, @@ -20,8 +19,8 @@ class Cubehole setColor(colorfront0, colorright0, colorback0, colorleft0); front.setRotate(0); right.setRotate(90); - back.setRotate(180); - left.setRotate(270); + back.setRotate(180); + left.setRotate(270); } float getHeight() {return height;} @@ -49,16 +48,16 @@ class Cubehole x = x0; y = y0; z = z0; - front.setPos(x, y, depth-(depth-innerdepth)/2); - right.setPos(x, y, width-(width-innerwidth)/2); - back.setPos(x, y, depth-(depth-innerdepth)/2); - left.setPos(x, y, width-(width-innerwidth)/2); + 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*/); } void setColor(const vmml::vec4f &cf, const vmml::vec4f &cr, const vmml::vec4f &cb, const vmml::vec4f &cl) { front.setColor(cf); right.setColor(cr); - back.setColor(cb); - left.setColor(cl); + back.setColor(cb); + left.setColor(cl); } std::list<Triangle> getTriangles(); |