Skip to content

Commit

Permalink
utils change
Browse files Browse the repository at this point in the history
  • Loading branch information
Todd Vanderlin committed Jul 12, 2013
1 parent d201f7e commit 3e491c6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions addon/ofxBox2d/src/ofxBox2dPolygonUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ static void addRandomPointsInside(vector <ofVec2f> & vertices, int amt=100) {


//-------------------------------------------------------------------
static vector <TriangleShape> triangulatePolygonWithOutline(const ofPolyline &pts,
static vector <TriangleShape> triangulatePolygonWithOutline(const ofPolyline &pts,
const ofPolyline &polyOutline) {

vector <TriangleShape> triangles;
Expand Down Expand Up @@ -372,7 +372,12 @@ static vector <TriangleShape> triangulatePolygonWithOutline(const ofPolyline &pt

return triangles;
}

static vector <TriangleShape> triangulatePolygonWithOutline(const vector <ofPoint> &pts,
const ofPolyline &polyOutline) {
ofPolyline p;
for (int i=0; i<pts.size(); i++) p.addVertex(pts[i]);
return triangulatePolygonWithOutline(p, polyOutline);
}

//-------------------------------------------------------------------
static vector <TriangleShape> triangulatePolygon(const vector <ofVec2f> &ptsIn, bool addPointsInside=false, int amt=100) {
Expand Down

0 comments on commit 3e491c6

Please sign in to comment.