Permalink
Browse files

Merge pull request #14 from Wu-Hao/NumVerts

Fixed Num verts
  • Loading branch information...
2 parents 2dfad07 + 8d55bf2 commit ca6042419830d5192160205b7346b4a33e834ac5 @josephg committed Nov 8, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 cp.js
View
14 cp.js
@@ -1235,17 +1235,17 @@ PolyShape.prototype.segmentQuery = function(a, b)
}
};
-/*
-PolyShape.getNumVerts = function()
+
+PolyShape.prototype.getNumVerts = function()
{
- return this.verts.length;
-};*/
+ return this.verts.length/2;
+};
+
-/*
PolyShape.prototype.getVert = function(idx)
{
- return this.verts[idx];
-};*/
+ return new Vect(this.verts[idx*2],this.verts[idx*2+1]);
+};
PolyShape.prototype.valueOnAxis = function(n, d)
{

1 comment on commit ca60424

Owner

josephg commented on ca60424 Dec 22, 2012

This only edited the built file (cp.js) and didn't fix the problem in cpPolyShape.

Please sign in to comment.