3
using namespace SyntopiaCore::Math;
6
namespace SyntopiaCore {
10
//GLUquadric* Sphere::myQuad = 0;
12
Sphere::Sphere(SyntopiaCore::Math::Vector3f center, float radius) : center(center), radius(radius) {
13
myQuad = gluNewQuadric();
14
gluQuadricDrawStyle(myQuad, GLU_FILL);
17
Vector3f v = Vector3f(radius,radius,radius);
23
gluDeleteQuadric(myQuad);
26
void Sphere::draw() const {
27
glMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, primaryColor );
28
if (primaryColor[3] < 1) {
33
glTranslatef( center.x(), center.y(), center.z() );
34
gluSphere(myQuad, radius, 7, 7);