PDA

View Full Version : gluSphere



GreenCat
05-10-2005, 10:01 AM
i want to draw a sphere with
void gluSphere(GLUquadricObj *qobj,
GLdouble radius,
GLint slices,
GLint stacks)

I know the radius and the center of the sphere.
Where should i put the x,y,z center points so to draw the sphere around those points ?

powerpad
05-10-2005, 10:26 AM
MSDN:
The gluSphere function draws a sphere of the given radius centered around the origin...

so your sphere will be located at (0, 0, 0)
use some translation
glTranslatef(yourCenterX, yourCenterY, yourCenterZ)

and the sphere will be located there