named members m_* to quite -Wshadow
[physics.git] / src / Entities / Polygon.h
index d775352..7941f88 100644 (file)
 #ifndef POLYGON_H
 #define POLYGON_H
 
+#include <bear/Vector2.h>
+using namespace bear;
+
 #include "PhysicsEntity.h"
-#include "../Vector2.h"
 
 #include <vector>
 using std::vector;
@@ -30,20 +32,22 @@ using std::vector;
 class Polygon: public PhysicsEntity
 {
     public:
-        Polygon(const Vector2&, vector<Vector2>);
+        Polygon(const vector<Vector2>&, const float* color);
         virtual ~Polygon();
 
         virtual void draw() const;
 
-    protected:
-        Vector2 maxP; // stores the max bounding box point
-        Vector2 minP; // stores the min bounding box point
+    //protected:
+        Vector2 m_maxP; // stores the max bounding box point
+        Vector2 m_minP; // stores the min bounding box point
 
-        vector<Vector2> points;
+        vector<Vector2> m_points;
 
-        // color;
+        const float* m_color;
+        
     private:
         void createBindingBox();
+        void centerPosition();
 };
 
 #endif // POLYGON_H