示例#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();
        }
示例#2
0
 public JDDebugCamera(Game game, JDCameraObject cameraObject)
     : base(game, cameraObject)
 {
     Mouse.SetPosition(widthOver2, heightOver2);
 }