Example #1
0
 public Camera(Game1 game, Vector3 pos, Vector3 target, Vector3 up)
     : base(game)
 {
     // Build camera view matrix
     cameraPosition = pos;
     cameraDirection = target - pos;
     cameraDirection.Normalize();
     cameraUp = up;
     CreateLookAt();
     projection = Matrix.CreatePerspectiveFieldOfView
         (MathHelper.PiOver4, (float)Game.Window.ClientBounds.Width / (float)Game.Window.ClientBounds.Height, 1, 10000);
 }
Example #2
0
 static void Main()
 {
     using (var game = new Game1())
         game.Run();
 }