2025-11-13 11:55:07 +00:00

24 lines
499 B
C#

using OpenTK.Mathematics;
namespace TheLabs;
public class Camera
{
public Vector3 _position = new Vector3(0.0f, 0.0f, -3.0f);
public Vector3 _target = new Vector3(0.0f, 0.0f, -1.0f);
public Vector3 _up;
public Camera(Vector3 position, Vector3 target, Vector3 up)
{
_position = position;
_target = target;
_up = up;
}
public Matrix4 LookAt()
{
return Matrix4.LookAt(_position, _position + _target, _up);
}
}