public override V2DShape GetV2DShape() { V2DShape result = new V2DShape(); result.IsCircle = true; result.CenterX = Center.X; result.CenterY = Center.Y; result.Radius = Radius; return(result); }
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); }