sphere.h
author Dmitriy Morozov <morozov@cs.duke.edu>
Mon, 29 Jan 2007 10:56:09 -0500
changeset 11 b4cd9b9d6ca5
parent 9 b16a476ef46d
permissions -rw-r--r--
Switched to CMake

/*
	Create a sphere centered at c, with radius r, and precision n
	Draw a point for zero radius spheres

	Code by Paul Bourke	<http://astronomy.swin.edu.au/~pbourke/opengl/sphere/>
*/

#include <GL/gl.h>

const double TWOPI = 2*3.14;
const double PID2 = 3.14/2;

struct XYZ
{
	XYZ(GLfloat xx = 0, GLfloat yy = 0, GLfloat zz = 0):
		x(xx), y(yy), z(zz)
	{}
	
	GLfloat x,y,z;
};

void CreateSphere(XYZ c,double r,int n);