Beispiel #1
0
        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));
        }
Beispiel #2
0
        /** 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;
                }
            }
        }
Beispiel #3
0
        public void GetPoints(out CCPoint[] outPoints)         //cpVect outPoints
        {
            cpShape shape = _info.GetShapes().FirstOrDefault();

            outPoints = PhysicsHelper.cpVectsTpCCPoints(((cpPolyShape)shape).GetVertices());
        }