2024-01-31 18:48:31 +03:00
|
|
|
namespace Syntriax.Engine.Core.Abstract;
|
|
|
|
|
2024-02-01 12:14:53 +03:00
|
|
|
/// <summary>
|
|
|
|
/// Represents a 2D camera in the engine.
|
|
|
|
/// </summary>
|
2024-01-31 18:48:31 +03:00
|
|
|
public interface ICamera2D : IBehaviour, IAssignableTransform
|
|
|
|
{
|
2024-02-01 12:14:53 +03:00
|
|
|
/// <summary>
|
|
|
|
/// The zoom level of the camera.
|
|
|
|
/// </summary>
|
2024-01-31 18:48:31 +03:00
|
|
|
float Zoom { get; set; }
|
|
|
|
|
2024-02-01 12:14:53 +03:00
|
|
|
/// <summary>
|
|
|
|
/// Converts a position from screen coordinates to world coordinates.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="screenPosition">The position in screen coordinates.</param>
|
|
|
|
/// <returns>The position in world coordinates.</returns>
|
2024-01-31 18:48:31 +03:00
|
|
|
Vector2D ScreenToWorldPosition(Vector2D screenPosition);
|
2024-02-01 12:14:53 +03:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Converts a position from world coordinates to screen coordinates.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="worldPosition">The position in world coordinates.</param>
|
|
|
|
/// <returns>The position in screen coordinates.</returns>
|
2024-02-01 12:02:53 +03:00
|
|
|
Vector2D WorldToScreenPosition(Vector2D worldPosition);
|
2024-01-31 18:48:31 +03:00
|
|
|
}
|