Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add some spheres inside the objects

  • Loading branch information...
commit 3175c70ff7d06a5ef469fd339cde749e2870586d 1 parent 3c15a8f
@idris authored
Showing with 3 additions and 0 deletions.
  1. +2 −0  ball.cpp
  2. +1 −0  cube.cpp
View
2  ball.cpp
@@ -143,6 +143,8 @@ void Ball::draw() {
glPushMatrix();
glTranslatef(center[0], center[1], center[2]);
glMultMatrixd(rotation);
+ glColor3f(0.3, 0.3, 0.3);
+ gluSphere(gluNewQuadric(), 1.2*radius, 40, 20);
glTranslatef(0.0 - width/2, 0.0 - length/2, 0.0 - height/2);
glColor3fv(color);
View
1  cube.cpp
@@ -35,6 +35,7 @@ void Cube::draw() {
glPushMatrix();
glTranslated(center[0], center[1], center[2]);
glRotated(angle, 0.0, 0.0, 1.0);
+ gluSphere(gluNewQuadric(), 1.2*radius, 40, 20);
glTranslated(0.0 - width/2, 0.0 - length/2, 0.0 - height/2);
// front
Please sign in to comment.
Something went wrong with that request. Please try again.