public static List<Uni2DMeshShape2D> Get2DVerticesFromContours(List<Contour> a_rDominantContoursList, Vector2 a_f2Scale, Vector3 a_f3PivotPoint) { List<Uni2DMeshShape2D> oShapes = new List<Uni2DMeshShape2D>(); int iContourCount = a_rDominantContoursList.Count; for( int iContourIndex = 0; iContourIndex < iContourCount; ++iContourIndex ) { Contour rContour = a_rDominantContoursList[iContourIndex]; List<Vector2> oVertices = new List<Vector2>(); Add2DVerticesFromContour(rContour, a_f2Scale, a_f3PivotPoint, ref oVertices); Uni2DMeshShape2D oShape = new Uni2DMeshShape2D(); oShape.vertices = oVertices.ToArray(); oShapes.Add(oShape); } return oShapes; }
public static List <Uni2DMeshShape2D> Get2DVerticesFromContours(List <Contour> a_rDominantContoursList, Vector2 a_f2Scale, Vector3 a_f3PivotPoint) { List <Uni2DMeshShape2D> oShapes = new List <Uni2DMeshShape2D>(); int iContourCount = a_rDominantContoursList.Count; for (int iContourIndex = 0; iContourIndex < iContourCount; ++iContourIndex) { Contour rContour = a_rDominantContoursList[iContourIndex]; List <Vector2> oVertices = new List <Vector2>(); Add2DVerticesFromContour(rContour, a_f2Scale, a_f3PivotPoint, ref oVertices); Uni2DMeshShape2D oShape = new Uni2DMeshShape2D(); oShape.vertices = oVertices.ToArray(); oShapes.Add(oShape); } return(oShapes); }