static void Main(string[] args)
        {
            SlimDX11Renderer.Renderer3d renderer = new SlimDX11Renderer.Renderer3d("Cell-Centre Crypt Simulation");
            m_visualiser = new GameWorld.CellVisualiser(renderer);

            m_camera = new SlimDX11Renderer.Camera((float)(Math.PI / 3.0), 1280.0f / 768.0f, 0.1f, 10000.0f);

            Input = new SlimDX11Renderer.InputHandler();

            var funcs = new Core.UpdateFunctions();

            funcs.AddUpdateFunction(UpdateInput, new TimeSpan(0, 0, 0, 0, 20));
            funcs.AddUpdateFunction(m_visualiser.Tick, new TimeSpan(0, 0, 0, 0, 20));

            int camIndex = renderer.AddCamera(m_camera);

            renderer.SetCurrentCamera(camIndex);
            m_camera.Locator.Move(0.0f, 0.0f, 1000.0f);

            renderer.Run(funcs);

            renderer.Dispose();
        }
예제 #2
0
        static void Main(string[] args)
        {
            string filename        = "data.txt";
            float  cycleTime       = 108000f;
            float  attachmentForce = 0.001f;

            if (args.Count() > 2)
            {
                filename = args[0];
                if (float.TryParse(args[1], out cycleTime))
                {
                    cycleTime *= 3600f;
                }
                float.TryParse(args[2], out attachmentForce);
            }

            SlimDX11Renderer.Renderer3d renderer = new SlimDX11Renderer.Renderer3d("Cell-Centre Crypt Simulation");
            m_crypt = new GameWorld.CryptCC(renderer, filename, cycleTime, attachmentForce);

            m_camera = new SlimDX11Renderer.Camera((float)(Math.PI / 3.0), 1280.0f / 768.0f, 0.1f, 100000.0f);

            Input = new SlimDX11Renderer.InputHandler();

            var funcs = new Core.UpdateFunctions();

            funcs.AddUpdateFunction(UpdateInput, new TimeSpan(0, 0, 0, 0, 20));
            funcs.AddUpdateFunction(m_crypt.Tick, new TimeSpan(0, 0, 0, 0, 20));

            int camIndex = renderer.AddCamera(m_camera);

            renderer.SetCurrentCamera(camIndex);
            m_camera.Locator.Move(0.0f, -5000.0f, 5000.0f);

            renderer.Run(funcs);

            renderer.Dispose();
        }