public CCPoint[] GetPoints() { var shapes = _info.getShapes(); cpVect[] outPoints = new cpVect[shapes.Count]; for (int i = 0; i < shapes.Count; i++) { outPoints[i] = new cpVect(((cpSegmentShape)shapes[i]).a); } return(PhysicsHelper.cpVectsTpCCPoints(outPoints)); }
/** move the points to the center */ public static void RecenterPoints(CCPoint[] points, int count, CCPoint center) { var cpPoints = PhysicsHelper.CCPointsTocpVects(points); cp.RecenterPoly(count, cpPoints); points = PhysicsHelper.cpVectsTpCCPoints(cpPoints); if (center != CCPoint.Zero) { for (int i = 0; i < points.Length; ++i) { points[i] += center; } } }
public void GetPoints(out CCPoint[] outPoints) //cpVect outPoints { cpShape shape = _info.GetShapes().FirstOrDefault(); outPoints = PhysicsHelper.cpVectsTpCCPoints(((cpPolyShape)shape).GetVertices()); }