Ejemplo n.º 1
0
        public ConsoleLogger(MeshesController _meshesController)
        {
            meshesController = _meshesController;
            Thread consoleThread = new Thread(new ThreadStart(consoleThreadFunction));

            consoleThread.Start();
        }
Ejemplo n.º 2
0
 public void MeshesGridGenerationSizeAndDistanceTwo()
 {
     Vector3[] actualData = new Vector3[4] {
         new Vector3(-2, 0, -2), new Vector3(0, 0, -2), new Vector3(-2, 0, 0), new Vector3(0, 0, 0)
     };
     meshesController = new MeshesController(2, 2, 2, new Camera(new Vector3(0, 0, 0), 0));
     Assert.Equal(actualData, meshesController.meshesOriginPointGrid);
 }
Ejemplo n.º 3
0
 public void MeshesGridGenerationSizeAndDistanceThree()
 {
     Vector3[] actualData = new Vector3[9] {
         new Vector3(-4.5f, 0, -4.5f), new Vector3(-1.5f, 0, -4.5f), new Vector3(1.5f, 0, -4.5f), new Vector3(-4.5f, 0, -1.5f), new Vector3(-1.5f, 0, -1.5f), new Vector3(1.5f, 0, -1.5f), new Vector3(-4.5f, 0, 1.5f), new Vector3(-1.5f, 0, 1.5f), new Vector3(1.5f, 0, 1.5f)
     };
     meshesController = new MeshesController(2, 3, 3, new Camera(new Vector3(0, 0, 0), 0));
     Assert.Equal(actualData, meshesController.meshesOriginPointGrid);
 }
Ejemplo n.º 4
0
        protected override void OnLoad(EventArgs e)
        {
            camera = new Camera(Vector3.UnitY * 3, Width / (float)Height);

            GL.ClearColor(0.2f, 0.6f, 1f, 1.0f);

            GL.Enable(EnableCap.DepthTest);
            GL.PolygonMode(MaterialFace.FrontAndBack, PolygonMode.Line);

            meshController = new MeshesController(resolution, size, renderDistance, camera);
            log            = new ConsoleLogger(meshController);

            CursorVisible = false;

            base.OnLoad(e);
        }