예제 #1
0
        public static AGameObject f16(ShaderProgram program, Vector4 position, bool IsTextured)
        {
            MyComplexObjectFactory2 objF16 = MyComplexObjectFactory2.LoadFromFile(@"Models\f16.obj", 0);
            ARenderable2            f16Rend;

            if (IsTextured)
            {
                f16Rend = new TextureRender2(program.program, objF16.GetVerts(), objF16.GetTextureCoords(), objF16.GetNormals(), objF16.GetIndices(), @"Textures\f16.bmp");
            }
            else
            {
                f16Rend = new TextureRender2(program.program, objF16.GetVerts(), objF16.GetIndices());
            }
            AGameObject f16 = new CowObject(f16Rend, new Vector4(0f, 0f, 0f, 0f), position, objF16.CalculateObjectCenter(), 100);

            f16.Rotate(0, null);
            return(f16);
        }
예제 #2
0
        public static AGameObject bus(ShaderProgram program, Vector4 position, bool IsTextured)
        {
            MyComplexObjectFactory2 objBus = MyComplexObjectFactory2.LoadFromFile(@"Models\bus.obj", 1);
            ARenderable2            busRend;

            if (IsTextured)
            {
                busRend = new TextureRender2(program.program, objBus.GetVerts(), objBus.GetTextureCoords(), objBus.GetNormals(), objBus.GetIndices(), @"Textures\bus.png");
            }
            else
            {
                busRend = new TextureRender2(program.program, objBus.GetVerts(), objBus.GetIndices());
            }
            AGameObject bus = new CowObject(busRend, new Vector4(0f, 0f, 0f, 0f), position, objBus.CalculateObjectCenter(), 100);

            bus.Rotate(150, null);
            bus.rot_dir = true;
            return(bus);
        }