示例#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);
        }
示例#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);
        }
示例#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;
        }
示例#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;
        }