Example #1
0
        static void calculateScale()
        {
            LookBounds = new MPos((int)(CurrentZoom * WindowInfo.Ratio * 1024), (int)(CurrentZoom * 1024));
            // cast to [-1;1] | we use 0f to stop things glitching out of sight
            projection = Matrix4.CreateScale(2 / CurrentZoom / WindowInfo.Ratio, 2 / CurrentZoom, 0f);

            CameraVisibility.ZoomUpdated();
        }
Example #2
0
        static void calculatePosition()
        {
            var look = LookAt.ToVector();

            view = Matrix4.CreateTranslation(-look.X, -look.Y, 0);

            CameraVisibility.LookAtUpdated();
        }