summaryrefslogtreecommitdiffstats
path: root/Trapezocube.h
diff options
context:
space:
mode:
authorMatthias Schiffer <matthias@gamezock.de>2009-12-10 21:24:40 +0100
committerMatthias Schiffer <matthias@gamezock.de>2009-12-10 21:24:40 +0100
commite744ab213aeaccfe1aea6050907019aad9cf1911 (patch)
treee9d741a393e2178c5b90f48df0d0e3975f564e63 /Trapezocube.h
parent823e55c9c49cf97531b66e6b15c41d9f9003bc32 (diff)
parentd439daec66c28f85debc2479e95eadb5fc3c00a2 (diff)
downloadc3d-e744ab213aeaccfe1aea6050907019aad9cf1911.tar
c3d-e744ab213aeaccfe1aea6050907019aad9cf1911.zip
Merge branch 'master' of git://git.gamezock.de/c3d
Conflicts: Cubehole.cpp Cubehole.h DisplayClass.cpp Trapezocube.cpp
Diffstat (limited to 'Trapezocube.h')
-rw-r--r--Trapezocube.h15
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;