Esempio n. 1
0
        public float[,] GetGeometry()
        {
            float[,] heights = new float[VertexCountAlongXAxis, VertexCountAlongZAxis];

            VertexPositionNormal[] cpuVertices = new VertexPositionNormal[VertexCount];
            Vertices.GetData(cpuVertices);

            for (int x = 0; x < VertexCountAlongXAxis; x++)
            {
                for (int z = 0; z < VertexCountAlongZAxis; z++)
                {
                    heights[x, z] = cpuVertices[x + VertexCountAlongXAxis * z].Position.Y;
                }
            }

            return(heights);
        }
Esempio n. 2
0
        public float[,] GetGeometry()
        {
            float[,] heights = new float[VertexCountAlongXAxis, VertexCountAlongZAxis];

            VertexPositionNormal[] cpuVertices = new VertexPositionNormal[VertexCount];
            Vertices.GetData(cpuVertices);

            for (int x = 0; x < VertexCountAlongXAxis; x++)
            {
                for (int z = 0; z < VertexCountAlongZAxis; z++)
                {
                    heights[x, z] = cpuVertices[x + VertexCountAlongXAxis * z].Position.Y;
                }
            }

            return heights;
        }