Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergej Reich <sergej.reich@googlemail.com>2013-10-25 06:20:23 +0400
committerSergej Reich <sergej.reich@googlemail.com>2013-10-25 06:20:23 +0400
commit4514eeaa8e335a86de0bda68aa4814c0bafad7eb (patch)
treede1816b7c4969f24560c0c253f83e12ce060af5a
parent58db4b70f3faa473bd864c9caa43d242570d18be (diff)
drawobject: Fix sphere bounds drawing
Would draw ellipsoid instead, which is not so useful and wrong when used for rigid body collision shape visualization. svn merge -r59887:59888 ^/branches/soc-2013-rigid_body_sim
-rw-r--r--source/blender/editors/space_view3d/drawobject.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 5bfb8180bfc..06aedb2c36d 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -6216,8 +6216,9 @@ static void draw_bb_quadric(BoundBox *bb, char type)
glPushMatrix();
if (type == OB_BOUND_SPHERE) {
+ float scale = MAX3(size[0], size[1], size[2]);
glTranslatef(cent[0], cent[1], cent[2]);
- glScalef(size[0], size[1], size[2]);
+ glScalef(scale, scale, scale);
gluSphere(qobj, 1.0, 8, 5);
}
else if (type == OB_BOUND_CYLINDER) {