Drawing cylinder & cone bounding objects according to how they will act in the physics simulation.

This commit is contained in:
Kester Maddock 2004-05-16 13:23:59 +00:00
parent 15849ce3d2
commit a0d82b242f

@ -3208,13 +3208,16 @@ static void draw_bb_quadric(BoundBox *bb, short type)
gluSphere(qobj, 1.0, 8, 5);
}
else if(type==OB_BOUND_CYLINDER) {
float radius = size[0] > size[1] ? size[0] : size[1];
glTranslatef(cent[0], cent[1], cent[2]-size[2]);
glScalef(size[0], size[1], 2.0*size[2]);
glScalef(radius, radius, 2.0*size[2]);
gluCylinder(qobj, 1.0, 1.0, 1.0, 8, 1);
}
else if(type==OB_BOUND_CONE) {
glTranslatef(cent[0], cent[1], cent[2]-size[2]);
glScalef(size[0], size[1], 2.0*size[2]);
float radius = size[0] > size[1] ? size[0] : size[1];
glTranslatef(cent[0], cent[2]-size[2], cent[1]);
glScalef(radius, 2.0*size[2], radius);
glRotatef(-90., 1.0, 0.0, 0.0);
gluCylinder(qobj, 1.0, 0.0, 1.0, 8, 1);
}
glPopMatrix();