#include #include #include #include #include "Sphere.h" using namespace std; Sphere::Sphere() { init(48); } Sphere::Sphere(int prec) { // prec is precision, or number of slices init(prec); } float Sphere::toRadians(float degrees) { return (degrees*2.0f*3.14159f)/360.0f; } void Sphere::init(int prec) { numVertices = (prec+1)*(prec+1); numIndices = prec*prec*6; for(int i = 0; i Sphere::getIndices() { return indices; } std::vector Sphere::getVertices() { return vertices; } std::vector Sphere::getTexCoords() { return texCoords; } std::vector Sphere::getNormals() { return normals; }