*******************************************************************************/
-#include <Moof/Camera.hh>
-#include <Moof/OpenGL.hh>
-#include <Moof/Sphere.hh>
+#include "Frustum.hh"
+#include "OpenGL.hh"
+#include "Sphere.hh"
namespace Mf {
void Sphere::encloseVertices(const Vector3 vertices[], unsigned count)
{
+ // TODO
}
void Sphere::draw(Scalar alpha) const
{
+ GLUquadricObj* sphereObj = gluNewQuadric();
+ gluQuadricDrawStyle(sphereObj, GLU_LINE);
+ glPushMatrix();
+
+ //glTranslate(point[0], point[1], point[2]);
+ glTranslate(point);
+ gluSphere(sphereObj, (GLdouble)radius, 16, 16);
+
+ glPopMatrix();
+
+ gluDeleteQuadric(sphereObj);
}
-bool Sphere::isVisible(const Camera& cam) const
+bool Sphere::isVisible(const Frustum& frustum) const
{
- return cam.getFrustum().containsSphere(*this);
+ return frustum.contains(*this);
}