Kav/Cameras/Camera.cs

24 lines
537 B
C#

using Microsoft.Xna.Framework;
namespace Kav
{
public struct Camera
{
public Matrix Transform { get; }
public Matrix View
{
get
{
return Matrix.CreateLookAt(Transform.Translation, Transform.Translation + Transform.Forward, Transform.Up);
}
}
public Matrix Projection { get; }
public Camera(Matrix transform, Matrix projection)
{
Transform = transform;
Projection = projection;
}
}
}