projects
/
physics.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added color to polygons
[physics.git]
/
src
/
Entities
/
Polygon.cpp
diff --git
a/src/Entities/Polygon.cpp
b/src/Entities/Polygon.cpp
index
cd03d85
..
ecaf2c4
100644
(file)
--- a/
src/Entities/Polygon.cpp
+++ b/
src/Entities/Polygon.cpp
@@
-25,8
+25,8
@@
/// ***** Constructors/Destructors *****
/// ***** Constructors/Destructors *****
-Polygon::Polygon(const vector<Vector2>& points)
- : PhysicsEntity(Vector2(0,0)), points(points)
+Polygon::Polygon(const vector<Vector2>& points
, const float* color
)
+ : PhysicsEntity(Vector2(0,0)), points(points)
, color(color)
{
DASSERT(0 < points.size());
{
DASSERT(0 < points.size());
@@
-42,7
+42,7
@@
Polygon::~Polygon()
void Polygon::draw() const
{
void Polygon::draw() const
{
- graphics::drawPolygon(points);
+ graphics::drawPolygon(points
, color
);
}
/// ***** Private Class Methods *****
}
/// ***** Private Class Methods *****