一个球体的模型。 http://images.cnblogs.com/cnblogs_com/bitzhuwei/554293/o_sphere.jpg

使用OneIndexBuffer

Inheritance: IBufferable
        private static IBufferable GetModel(BuildInSceneObject buildIn)
        {
            IBufferable bufferable = null;

            switch (buildIn)
            {
                case BuildInSceneObject.Cube:
                    bufferable = new Cube();
                    break;
                case BuildInSceneObject.Sphere:
                    bufferable = new Sphere();
                    break;
                case BuildInSceneObject.Ground:
                    bufferable = new Ground(1, 1000, 1000);
                    break;
                case BuildInSceneObject.Axis:
                    bufferable = new Axis();
                    break;
                default:
                    throw new NotImplementedException();
            }

            return bufferable;
        }
        private static IBufferable GetModel(BuildInSceneObject buildIn)
        {
            IBufferable model = null;

            switch (buildIn)
            {
                case BuildInSceneObject.Cube:
                    model = new Cube();
                    break;

                case BuildInSceneObject.Sphere:
                    model = new Sphere();
                    break;

                case BuildInSceneObject.Ground:
                    model = new Ground(1, groundXLength / 2, groundZLength / 2);
                    break;

                case BuildInSceneObject.Axis:
                    model = new Axis();
                    break;

                default:
                    throw new NotImplementedException();
            }

            return model;
        }