Num verts #14

Merged
merged 2 commits into from Nov 8, 2012
Jump to file or symbol
Failed to load files and symbols.
+7 −7
Diff settings

Always

Just for now

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)
{