Cube. http://images.cnblogs.com/cnblogs_com/bitzhuwei/554293/o_CubeModel.jpg

Uses 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;
        }
Exemplo n.º 2
0
        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;
        }