mirror of
https://github.com/UOH-CS-Level5/551455-graphics-programming-2526-the-repo-Zyb3rWolfi.git
synced 2025-11-29 00:43:08 +00:00
24 lines
499 B
C#
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);
|
|
}
|
|
|
|
|
|
} |