public static VertexP[] GetVertexArray(uint sideVertexCount) { VertexP[] vertices = new VertexP[sideVertexCount * sideVertexCount]; for (int i = 0, index = 0; i < sideVertexCount; i++) { for (int j = 0; j < sideVertexCount; j++, index++) { vertices[index] = new VertexP(i, j, 0); } } return(vertices); }
public static VertexP[] GetCenteredVertexArray(uint sideVertexCount) { VertexP[] vertices = new VertexP[sideVertexCount * sideVertexCount]; float offset = sideVertexCount / 2; for (int i = 0, index = 0; i < sideVertexCount; i++) { for (int j = 0; j < sideVertexCount; j++, index++) { vertices[index] = new VertexP(i - offset, j - offset, 0); } } return(vertices); }
public static VertexP[] GetVertexArray(uint sideVertexCount) { VertexP[] vertices = new VertexP[sideVertexCount * sideVertexCount]; for (int i = 0, index = 0; i < sideVertexCount; i++) { for (int j = 0; j < sideVertexCount; j++, index++) { vertices[index] = new VertexP(i, j, 0); } } return vertices; }
public static VertexP[] GetCenteredVertexArray(uint sideVertexCount) { VertexP[] vertices = new VertexP[sideVertexCount * sideVertexCount]; float offset = sideVertexCount / 2; for (int i = 0, index = 0; i < sideVertexCount; i++) { for (int j = 0; j < sideVertexCount; j++, index++) { vertices[index] = new VertexP(i - offset, j - offset, 0); } } return vertices; }