diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-12-10 11:39:42 +0100 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-12-10 11:39:42 +0100 |
commit | e34b6f19888ab063201c7b4f2706b200fa93cd35 (patch) | |
tree | cb68a536ea8280734a60d590fd765bc06dc92957 /Cuboid.cpp | |
parent | 4f2236f36446a5b097e28c0f76e4962ce7e115b1 (diff) | |
parent | f31beab9a7160e913da7ff30d946eaf2a721fdc8 (diff) | |
download | c3d-e34b6f19888ab063201c7b4f2706b200fa93cd35.tar c3d-e34b6f19888ab063201c7b4f2706b200fa93cd35.zip |
Korrigierte BSPTree-Render-Reihenfolge gemerged
Diffstat (limited to 'Cuboid.cpp')
-rw-r--r-- | Cuboid.cpp | 32 |
1 files changed, 14 insertions, 18 deletions
@@ -68,19 +68,19 @@ std::list<Triangle> Cuboid::getTriangles(/*const Matrix &modelview*/) vmml::vec4f c(0.0, 0.0, 1.0, 0.5); triangles.push_back(Triangle(vmml::vec3f(x-width/2, y+height/2, z+depth/2), - vmml::vec3f(x+width/2, y+height/2, z+depth/2), - vmml::vec3f(x-width/2, y-height/2, z+depth/2), c)); + vmml::vec3f(x-width/2, y-height/2, z+depth/2), + vmml::vec3f(x+width/2, y+height/2, z+depth/2), c)); triangles.push_back(Triangle(vmml::vec3f(x-width/2, y-height/2, z+depth/2), - vmml::vec3f(x+width/2, y+height/2, z+depth/2), - vmml::vec3f(x+width/2, y-height/2, z+depth/2), c)); + vmml::vec3f(x+width/2, y-height/2, z+depth/2), + vmml::vec3f(x+width/2, y+height/2, z+depth/2), c)); // Back face c = vmml::vec4f(1.0, 1.0, 0.0, 0.5); triangles.push_back(Triangle(vmml::vec3f(x-width/2, y+height/2, z-depth/2), - vmml::vec3f(x-width/2, y-height/2, z-depth/2), - vmml::vec3f(x+width/2, y+height/2, z-depth/2), c)); + vmml::vec3f(x+width/2, y+height/2, z-depth/2), + vmml::vec3f(x-width/2, y-height/2, z-depth/2), c)); triangles.push_back(Triangle(vmml::vec3f(x-width/2, y-height/2, z-depth/2), vmml::vec3f(x+width/2, y+height/2, z-depth/2), @@ -90,12 +90,12 @@ std::list<Triangle> Cuboid::getTriangles(/*const Matrix &modelview*/) c = vmml::vec4f(0.0, 1.0, 0.0, 0.5); triangles.push_back(Triangle(vmml::vec3f(x-width/2, y+height/2, z+depth/2), - vmml::vec3f(x-width/2, y-height/2, z+depth/2), - vmml::vec3f(x-width/2, y+height/2, z-depth/2), c)); - - triangles.push_back(Triangle(vmml::vec3f(x-width/2, y-height/2, z-depth/2), vmml::vec3f(x-width/2, y+height/2, z-depth/2), vmml::vec3f(x-width/2, y-height/2, z+depth/2), c)); + + triangles.push_back(Triangle(vmml::vec3f(x-width/2, y-height/2, z-depth/2), + vmml::vec3f(x-width/2, y-height/2, z+depth/2), + vmml::vec3f(x-width/2, y+height/2, z-depth/2), c)); // Right face @@ -121,16 +121,12 @@ std::list<Triangle> Cuboid::getTriangles(/*const Matrix &modelview*/) // Bottom face triangles.push_back(Triangle(vmml::vec3f(x-width/2, y-height/2, z+depth/2), - vmml::vec3f(x+width/2, y-height/2, z+depth/2), - vmml::vec3f(x-width/2, y-height/2, z-depth/2), c)); + vmml::vec3f(x-width/2, y-height/2, z-depth/2), + vmml::vec3f(x+width/2, y-height/2, z+depth/2), c)); triangles.push_back(Triangle(vmml::vec3f(x+width/2, y-height/2, z+depth/2), - vmml::vec3f(x+width/2, y-height/2, z-depth/2), - vmml::vec3f(x-width/2, y-height/2, z-depth/2), c)); - - /*for(std::list<Triangle>::iterator t = triangles.begin(); t != triangles.end(); ++t) { - t->transform(modelview); - }*/ + vmml::vec3f(x-width/2, y-height/2, z-depth/2), + vmml::vec3f(x+width/2, y-height/2, z-depth/2), c)); return triangles; } |