private void BuildShapeGeometry()
        {
            //
            // We are concatenating all the geometry into one big vertex/index buffer. So
            // define the regions in the buffer each submesh covers.
            //

            var vertices = new List <Vertex>();
            var indices  = new List <short>();

            SubmeshGeometry box      = AppendMeshData(GeometryGenerator.CreateBox(1.0f, 1.0f, 1.0f, 3), vertices, indices);
            SubmeshGeometry grid     = AppendMeshData(GeometryGenerator.CreateGrid(20.0f, 30.0f, 60, 40), vertices, indices);
            SubmeshGeometry sphere   = AppendMeshData(GeometryGenerator.CreateSphere(0.5f, 20, 20), vertices, indices);
            SubmeshGeometry cylinder = AppendMeshData(GeometryGenerator.CreateCylinder(0.5f, 0.3f, 3.0f, 20, 20), vertices, indices);
            SubmeshGeometry quad     = AppendMeshData(GeometryGenerator.CreateQuad(0.0f, 0.0f, 1.0f, 1.0f, 0.0f), vertices, indices);

            var geo = MeshGeometry.New(Device, CommandList, vertices.ToArray(), indices.ToArray(), "shapeGeo");

            geo.DrawArgs["box"]      = box;
            geo.DrawArgs["grid"]     = grid;
            geo.DrawArgs["sphere"]   = sphere;
            geo.DrawArgs["cylinder"] = cylinder;
            geo.DrawArgs["quad"]     = quad;

            _geometries[geo.Name] = geo;
        }
        private void BuildShapeGeometry()
        {
            //
            // We are concatenating all the geometry into one big vertex/index buffer. So
            // define the regions in the buffer each submesh covers.
            //

            var vertices = new List <Vertex>();
            var indices  = new List <short>();

            SubmeshGeometry box      = AppendMeshData(GeometryGenerator.CreateBox(1.5f, 0.5f, 1.5f, 3), Color.DarkGreen, vertices, indices);
            SubmeshGeometry grid     = AppendMeshData(GeometryGenerator.CreateGrid(50.0f, 15.0f, 2, 40), Color.ForestGreen, vertices, indices);
            SubmeshGeometry sphere   = AppendMeshData(GeometryGenerator.CreateSphere(0.5f, 20, 20), Color.Crimson, vertices, indices);
            SubmeshGeometry cylinder = AppendMeshData(GeometryGenerator.CreateCylinder(0.5f, 0.3f, 3.0f, 20, 20), Color.SteelBlue, vertices, indices);
            SubmeshGeometry pyramid  = AppendMeshData(GeometryGenerator.Pyramid(1.5f, 0.5f, 1.5f, 3), Color.Purple, vertices, indices);
            SubmeshGeometry wedge    = AppendMeshData(GeometryGenerator.Wedge(1.5f, 0.5f, 1.5f, 3), Color.RosyBrown, vertices, indices);
            SubmeshGeometry diamond  = AppendMeshData(GeometryGenerator.Diamond(1.5f, 0.5f, 1.5f, 3), Color.MintCream, vertices, indices);
            SubmeshGeometry triPrism = AppendMeshData(GeometryGenerator.TriangularPrism(1.5f, 0.5f, 1.5f, 3), Color.DarkOrchid, vertices, indices);
            SubmeshGeometry hexPrism = AppendMeshData(GeometryGenerator.HexagonalPrism(1.5f, 0.5f, 1.5f, 3), Color.RoyalBlue, vertices, indices);
            SubmeshGeometry cone     = AppendMeshData(GeometryGenerator.CreateCone(0.5f, 0.3f, 3.0f, 20, 20), Color.SteelBlue, vertices, indices);
            var             geo      = MeshGeometry.New(Device, CommandList, vertices, indices.ToArray(), "shapeGeo");

            geo.DrawArgs["box"]      = box;
            geo.DrawArgs["grid"]     = grid;
            geo.DrawArgs["sphere"]   = sphere;
            geo.DrawArgs["cylinder"] = cylinder;
            geo.DrawArgs["pyramid"]  = pyramid;
            geo.DrawArgs["wedge"]    = wedge;
            geo.DrawArgs["diamond"]  = diamond;
            geo.DrawArgs["triPrism"] = triPrism;
            geo.DrawArgs["hexPrism"] = hexPrism;
            geo.DrawArgs["cone"]     = cone;
            _geometries[geo.Name]    = geo;
        }