Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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;
        }
Exemple #4
0
        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;
        }