Syntriax.Engine/Engine.Core/Abstract/ITransform.cs

40 lines
1.2 KiB
C#

using System;
namespace Syntriax.Engine.Core.Abstract;
/// <summary>
/// Represents the transformation properties of an object such as position, scale, and rotation.
/// </summary>
public interface ITransform
{
/// <summary>
/// Event triggered when the <see cref="Position"/> of the <see cref="ITransform"/> changes.
/// </summary>
Action<ITransform>? OnPositionChanged { get; set; }
/// <summary>
/// Event triggered when the <see cref="Scale"/> of the <see cref="ITransform"/> changes.
/// </summary>
Action<ITransform>? OnScaleChanged { get; set; }
/// <summary>
/// Event triggered when the <see cref="Rotation"/> of the <see cref="ITransform"/> changes.
/// </summary>
Action<ITransform>? OnRotationChanged { get; set; }
/// <summary>
/// The position of the <see cref="ITransform"/> in 2D space.
/// </summary>
Vector2D Position { get; set; }
/// <summary>
/// The scale of the <see cref="ITransform"/>.
/// </summary>
Vector2D Scale { get; set; }
/// <summary>
/// The rotation of the <see cref="ITransform"/> in degrees.
/// </summary>
float Rotation { get; set; }
}