Ejemplo n.º 1
0
        public JDCamera(Game game, JDCameraObject cameraObject)
            : base(game)
        {
            farPlaneDistance = cameraObject.FarPlaneDistance;
            nearPlaneDistance = cameraObject.NearPlaneDistance;
            Position = cameraObject.Position;
            Target = Position + Vector3.Normalize(cameraObject.Target);

            widthOver2 = game.Window.ClientBounds.Width / 2;
            heightOver2 = game.Window.ClientBounds.Height / 2;
            aspectRatio = (float)game.Window.ClientBounds.Width / (float)game.Window.ClientBounds.Height;
            UpdateProjection();
        }
Ejemplo n.º 2
0
 public JDDebugCamera(Game game, JDCameraObject cameraObject)
     : base(game, cameraObject)
 {
     Mouse.SetPosition(widthOver2, heightOver2);
 }