static void makeSolidSphere( GLdouble radius, GLint slices, GLint stacks) { QUAD_OBJ_INIT(); gluQuadricDrawStyle(quadObj, GLU_FILL); gluQuadricNormals(quadObj, GLU_SMOOTH); gluSphere(quadObj, radius, slices, stacks); }
void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks) { QUAD_OBJ_INIT(); gluQuadricDrawStyle(quadObj, GLU_FILL); gluQuadricNormals(quadObj, GLU_SMOOTH); /* If we ever changed/used the texture or orientation state of quadObj, we'd need to change it to the defaults here with gluQuadricTexture and/or gluQuadricOrientation. */ gluSphere(quadObj, radius, slices, stacks); }
void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks) { QUAD_OBJ_INIT(); gluQuadricDrawStyle(quadObj, GLU_LINE); gluQuadricNormals(quadObj, GLU_SMOOTH); /* If we ever changed/used the texture or orientation state of quadObj, we'd need to change it to the defaults here with gluQuadricTexture and/or gluQuadricOrientation. */ gluCylinder(quadObj, base, 0.0, height, slices, stacks); }
/** * draw_sphere: * @solid: TRUE if the sphere should be solid. * @radius: the radius of the sphere. * @slices: the number of subdivisions around the Z axis (similar to lines of * longitude). * @stacks: the number of subdivisions along the Z axis (similar to lines of * latitude). * * Renders a sphere centered at the modeling coordinates origin of * the specified @radius. The sphere is subdivided around the Z axis into * @slices and along the Z axis into @stacks. * **/ void draw_sphere (gboolean solid, double radius, int slices, int stacks) { QUAD_OBJ_INIT(); if (solid) gluQuadricDrawStyle (quadObj, GLU_FILL); else gluQuadricDrawStyle (quadObj, GLU_LINE); gluQuadricNormals (quadObj, GLU_SMOOTH); /* If we ever changed/used the texture or orientation state of quadObj, we'd need to change it to the defaults here with gluQuadricTexture and/or gluQuadricOrientation. */ gluSphere (quadObj, radius, slices, stacks); }