Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/render/box.cc')
-rw-r--r--src/render/box.cc49
1 files changed, 25 insertions, 24 deletions
diff --git a/src/render/box.cc b/src/render/box.cc
index 8819a40..79f62f7 100644
--- a/src/render/box.cc
+++ b/src/render/box.cc
@@ -17,6 +17,7 @@ Box::Box(Vector3f const & tl, Vector3f const &br) :
{
topcolor = Color::White();
bottomcolor= Color::White() * 0.7f;
+ radius = 1.0f;
}
Box::Box(const Box & other)
@@ -52,47 +53,47 @@ void Box::draw()
// top
color(topcolor);
- vertex(v2);
- vertex(v1);
- vertex(v5);
- vertex(v6);
+ vertex(radius*v2);
+ vertex(radius*v1);
+ vertex(radius*v5);
+ vertex(radius*v6);
// sides
color(bottomcolor);
- vertex(v0);
+ vertex(radius*v0);
color(topcolor);
- vertex(v1);
- vertex(v2);
+ vertex(radius*v1);
+ vertex(radius*v2);
color(bottomcolor);
- vertex(v3);
+ vertex(radius*v3);
- vertex(v3);
+ vertex(radius*v3);
color(topcolor);
- vertex(v2);
- vertex(v6);
+ vertex(radius*v2);
+ vertex(radius*v6);
color(bottomcolor);
- vertex(v7);
+ vertex(radius*v7);
- vertex(v4);
+ vertex(radius*v4);
color(topcolor);
- vertex(v5);
- vertex(v1);
+ vertex(radius*v5);
+ vertex(radius*v1);
color(bottomcolor);
- vertex(v0);
+ vertex(radius*v0);
- vertex(v7);
+ vertex(radius*v7);
color(topcolor);
- vertex(v6);
- vertex(v5);
+ vertex(radius*v6);
+ vertex(radius*v5);
color(bottomcolor);
- vertex(v4);
+ vertex(radius*v4);
// bottom
color(bottomcolor);
- vertex(v4);
- vertex(v0);
- vertex(v3);
- vertex(v7);
+ vertex(radius*v4);
+ vertex(radius*v0);
+ vertex(radius*v3);
+ vertex(radius*v7);
end();