From 825d5a44bd312772c53fdaa8924e4009cfb320a3 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 10 Feb 2008 17:54:53 +0000 Subject: more entity updates --- src/render/box.cc | 49 +++++++++++++++++++++++++------------------------ 1 file changed, 25 insertions(+), 24 deletions(-) (limited to 'src/render/box.cc') 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(); -- cgit v1.2.3