public static UnityEngine.Vector3[] ToUnityVertices(this IEnumerable <double> arr, Hypar.Geometry.Transform t) { var list = arr.ToList(); var count = arr.Count(); var verts = new UnityEngine.Vector3[count / 3]; var index = 0; for (var i = 0; i < count; i += 3) { var vt = t.OfPoint(new Vector3(list[i], list[i + 1], list[i + 2])); // var v = new UnityEngine.Vector3((float)list[i], (float)list[i+1], (float)list[i+2]); var v = vt.ToUnityVector3(); verts[index] = v; index++; } return(verts); }