diff options
Diffstat (limited to 'Trapezocube.h')
-rw-r--r-- | Trapezocube.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/Trapezocube.h b/Trapezocube.h index 694ecde..c291e21 100644 --- a/Trapezocube.h +++ b/Trapezocube.h @@ -9,17 +9,12 @@ class Trapezocube { public: Trapezocube(): widthfront(0), widthback(0), height(0), depth(0), x(0), y(0), z(0), rotate(0) {} - Trapezocube(float widthfront, float widthback, float height, float depth): x(0), y(0), z(0), rotate(0){ - setSize(widthfront, widthback, height, depth); - } - Trapezocube(float widthfront, float widthback, float height, float depth, float x, float y, float z): rotate(0) { - setSize(widthfront, widthback, height, depth); - setPos(x, y, z); - } - Trapezocube(float widthfront, float widthback, float height, float depth, float x, float y, float z, float rotate) { + + Trapezocube(float widthfront, float widthback, float height, float depth, float x, float y, float z, float rotate, const vmml::vec4f &col) { setSize(widthfront, widthback, height, depth); setPos(x, y, z); setRotate(rotate); + setColor(col); } float getHeight() {return height;} float getWidthFront() {return widthfront;} @@ -29,6 +24,8 @@ class Trapezocube float getPosY() {return y;} float getPosZ() {return z;} float getRotate() {return rotate;} + vmml::vec4f getColor() {return color;} + void setSize(float wf, float wb, float h, float d) { widthfront = wf; @@ -44,7 +41,7 @@ class Trapezocube } void setRotate(float r) {rotate = r;} void setColor(const vmml::vec4f &col) {color = col;} - std::list<Triangle> getTriangles(/*const Matrix &modelview*/); + std::list<Triangle> getTriangles(); private: float x, y, z, widthfront, widthback, height, depth, rotate; |