apply formatting
This commit is contained in:
@@ -4,29 +4,29 @@ using OpenTK.Mathematics;
|
||||
namespace Engine.Scene.Component.BuiltIn;
|
||||
|
||||
public abstract class Camera(
|
||||
float nearPlane,
|
||||
float farPlane
|
||||
float parNearPlane,
|
||||
float parFarPlane
|
||||
) : Component, ICamera
|
||||
{
|
||||
public float AspectRatio { get; private set; } = 1;
|
||||
public float NearPlane { get; set; } = nearPlane;
|
||||
public float FarPlane { get; set; } = farPlane;
|
||||
public float AspectRatio { get; private set; } = 1;
|
||||
public float NearPlane { get; set; } = parNearPlane;
|
||||
public float FarPlane { get; set; } = parFarPlane;
|
||||
|
||||
private Vector2i _screenSize = new(1, 1);
|
||||
private Vector2i _screenSize = new(1, 1);
|
||||
|
||||
public abstract Matrix4 View { get; }
|
||||
public abstract Matrix4 Projection { get; }
|
||||
public abstract Matrix4 View { get; }
|
||||
public abstract Matrix4 Projection { get; }
|
||||
|
||||
public Vector2i ScreenSize
|
||||
public Vector2i ScreenSize
|
||||
{
|
||||
get => _screenSize;
|
||||
set
|
||||
{
|
||||
get => _screenSize;
|
||||
set
|
||||
{
|
||||
_screenSize = value;
|
||||
AspectRatio = (float)value.X / value.Y;
|
||||
}
|
||||
_screenSize = value;
|
||||
AspectRatio = (float)value.X / value.Y;
|
||||
}
|
||||
}
|
||||
|
||||
public abstract Vector3 ScreenToWorld(Vector2 screenPosition);
|
||||
public abstract Vector2 WorldToScreen(Vector3 worldPosition);
|
||||
public abstract Vector3 ScreenToWorld(Vector2 parScreenPosition);
|
||||
public abstract Vector2 WorldToScreen(Vector3 parWorldPosition);
|
||||
}
|
||||
Reference in New Issue
Block a user