示例#1
0
文件: Game1.cs 项目: vegah/Library3d
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            IReader3d reader = new Reader3ds();
            using (Stream s = new FileStream("3dObjects/spherecube.3ds", FileMode.Open))
            {
                reader.FillScene(s,scene);
            }

            // TODO: use this.Content to load your game content here
        }
示例#2
0
        static void Main(string[] args)
        {
            IReader3d reader = new Reader3ds();
            IScene scene = new TestScene();
            using (Stream s = new FileStream("3dObjects/cube.3ds", FileMode.Open))
            {
                reader.FillScene(s, scene);
            }

            IScene scene2 = new TestScene();
            using (Stream s = new FileStream("3dObjects/donutcube.3ds", FileMode.Open))
            {
                reader.FillScene(s, scene2);
            }

            Console.ReadLine();
        }