created input, graphics and game namespaces
[physics.git] / src / graphics / graphics.cpp
index a719662..54cda19 100644 (file)
@@ -1,48 +1,51 @@
 #include "graphics.h"
+#include "../debug.h"
 
 #include <GL/gl.h>
 #include <GL/glu.h>
 #include <SDL/SDL.h>
 #include <cmath>
 
-#include "../debug.h"
+#include "../mathw.h"
 
-static const float PI = 3.1415926535897;
 
 /// ***** Private Method Headers *****
-void drawCircle(int);
+
+void glDrawCircle(int);
 void sdlInit();
 void glInit();
 
-/// ***** Public Methods *****
+/// ***** Initializers/Cleaners *****
 
-void graphicsInit()
+void graphics::init()
 {
     sdlInit();
     glInit();
 }
 
-void graphicsCleanUp()
+void graphics::clean()
 {
 
 }
 
-void glDrawCircle(float radius, const Vector2* vec, const float* color)
+/// ***** Public Methods *****
+
+void graphics::drawCircle(float radius, const Vector2& vec, const float* color)
 {
     glMatrixMode(GL_MODELVIEW);
     glLoadIdentity();
-    glTranslatef(vec->x, vec->y, -1);
+    glTranslatef(vec.x, vec.y, -1);
     glScalef(radius, radius, radius);
 
     if(color != NULL)
         glColor3fv(color);
 
-    drawCircle(32);
+    glDrawCircle(32);
 }
 
 /// ***** Private Methods *****
 
-void drawCircle(int pieces)
+void glDrawCircle(int pieces)
 {
     glBegin(GL_POLYGON);
         for(int n = 0; n < pieces; n++)