feat: added near & far planes to camera3D
This commit is contained in:
@@ -6,7 +6,32 @@ namespace Engine.Core;
|
||||
public interface ICamera3D : IBehaviour3D
|
||||
{
|
||||
/// <summary>
|
||||
/// Field of View (FOV) value of the camera
|
||||
/// Event triggered when the near plane of the <see cref="ICamera3D"/> changes.
|
||||
/// </summary>
|
||||
Event<ICamera3D, NearPlaneChangedArguments> OnNearPlaneChanged { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Event triggered when the far plane of the <see cref="ICamera3D"/> changes.
|
||||
/// </summary>
|
||||
Event<ICamera3D, FarPlaneChangedArguments> OnFarPlaneChanged { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Event triggered when the field of view of the <see cref="ICamera3D"/> changes.
|
||||
/// </summary>
|
||||
Event<ICamera3D, FieldOfViewChangedArguments> OnFieldOfViewChanged { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Near plane distance of the camera.
|
||||
/// </summary>
|
||||
float NearPlane { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Far plane distance of the camera.
|
||||
/// </summary>
|
||||
float FarPlane { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Field of View (FOV) value of the camera in degrees.
|
||||
/// </summary>
|
||||
float FieldOfView { get; set; }
|
||||
|
||||
@@ -23,4 +48,8 @@ public interface ICamera3D : IBehaviour3D
|
||||
/// <param name="worldPosition">The position in world coordinates.</param>
|
||||
/// <returns>The position in screen coordinates.</returns>
|
||||
Vector2D WorldToScreenPosition(Vector3D worldPosition);
|
||||
|
||||
readonly record struct NearPlaneChangedArguments(float PreviousNearPlane);
|
||||
readonly record struct FarPlaneChangedArguments(float PreviousFarPlane);
|
||||
readonly record struct FieldOfViewChangedArguments(float PreviousFieldOfView);
|
||||
}
|
||||
|
Reference in New Issue
Block a user