Syntriax.Engine/Engine.Core/Abstract/ICamera2D.cs

27 lines
913 B
C#

namespace Syntriax.Engine.Core.Abstract;
/// <summary>
/// Represents a 2D camera in the engine.
/// </summary>
public interface ICamera2D : IBehaviour, IAssignableTransform
{
/// <summary>
/// The zoom level of the camera.
/// </summary>
float Zoom { get; set; }
/// <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>
Vector2D ScreenToWorldPosition(Vector2D screenPosition);
/// <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>
Vector2D WorldToScreenPosition(Vector2D worldPosition);
}