expanded Array and replaced all usages of std::vector with bear::Array
[libbear.git] / physics / src / graphics / graphics.cpp
index afc4441..baf36d8 100644 (file)
@@ -35,7 +35,7 @@ using std::endl;
 /// ***** Private Method Headers *****
 
 void glDrawCircle(int);
-void glDrawPolygon( const std::vector<Vector2>& points );
+void glDrawPolygon( const Array<Vector2>& points );
 void sdlInit();
 void glInit();
 
@@ -69,7 +69,7 @@ void graphics::drawCircle(float radius, const Vector2& pos, const float* color)
 
 void graphics::drawPolygon
 (
-  const std::vector<Vector2>& points,
+  const Array<Vector2>& points,
   const float* color
 )
 {
@@ -98,12 +98,12 @@ void glDrawCircle(int pieces)
     glEnd();
 }
 
-void glDrawPolygon( const std::vector<Vector2>& points )
+void glDrawPolygon( const Array<Vector2>& points )
 {
     glBegin(GL_POLYGON);
-        for(unsigned int n = 0; n < points.size(); n++)
+        for(unsigned int n = 0; n < points.getLength(); n++)
         {
-            const Vector2& vec = points.at(n);
+            const Vector2& vec = points.getAt(n);
 
             glVertex3f(vec.m_fX, vec.m_fY, 0);
         }