X-Git-Url: http://gitweb.pgornicz.com/gitweb.cgi?a=blobdiff_plain;f=src%2FEntities%2FPolygon.h;h=7941f88024d6528a54a5cda241124d54ca6428d1;hb=HEAD;hp=5d8d10d744dd7a636dfe0ef8620f6bda54d5c403;hpb=3d1f081343dc603a3292538eeb9bd794b255deb6;p=physics.git diff --git a/src/Entities/Polygon.h b/src/Entities/Polygon.h index 5d8d10d..7941f88 100644 --- a/src/Entities/Polygon.h +++ b/src/Entities/Polygon.h @@ -18,8 +18,10 @@ #ifndef POLYGON_H #define POLYGON_H +#include +using namespace bear; + #include "PhysicsEntity.h" -#include "Vector2.h" #include using std::vector; @@ -30,20 +32,22 @@ using std::vector; class Polygon: public PhysicsEntity { public: - Polygon(const Vector2&, vector); + Polygon(const vector&, 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 points; + vector m_points; - // color; + const float* m_color; + private: void createBindingBox(); + void centerPosition(); }; #endif // POLYGON_H