Пример #1
0
        public override V2DShape GetV2DShape()
        {
            V2DShape result = new V2DShape();

            result.IsCircle = true;
            result.CenterX  = Center.X;
            result.CenterY  = Center.Y;
            result.Radius   = Radius;
            return(result);
        }
Пример #2
0
        public override V2DShape GetV2DShape()
        {
            V2DShape result = new V2DShape();

            float[] pts = new float[Points.Count * 2];
            for (int i = 0; i < Points.Count; i++)
            {
                pts[i * 2]     = Points[i].X;
                pts[i * 2 + 1] = Points[i].Y;
            }
            result.Data = pts;
            result.EnsureClockwise();
            //List<Vector2> pts = new List<Vector2>();
            //for (int i = 0; i < Points.Count; i++)
            //{
            //    pts.Add(new Vector2(Points[i].X, Points[i].Y));
            //}
            //result.Data = pts.ToArray();
            result.IsCircle = false;
            return(result);
        }