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

40 lines
1.2 KiB
C#
Raw Normal View History

2023-11-23 22:07:49 +03:00
using System;
namespace Syntriax.Engine.Core.Abstract;
2024-02-01 12:14:53 +03:00
/// <summary>
/// Represents the transformation properties of an object such as position, scale, and rotation.
/// </summary>
2023-11-23 22:07:49 +03:00
public interface ITransform
{
2024-02-01 12:14:53 +03:00
/// <summary>
/// Event triggered when the <see cref="Position"/> of the <see cref="ITransform"/> changes.
/// </summary>
2023-11-23 22:07:49 +03:00
Action<ITransform>? OnPositionChanged { get; set; }
2024-02-01 12:14:53 +03:00
/// <summary>
/// Event triggered when the <see cref="Scale"/> of the <see cref="ITransform"/> changes.
/// </summary>
2023-11-23 22:07:49 +03:00
Action<ITransform>? OnScaleChanged { get; set; }
2024-02-01 12:14:53 +03:00
/// <summary>
/// Event triggered when the <see cref="Rotation"/> of the <see cref="ITransform"/> changes.
/// </summary>
2023-11-23 22:07:49 +03:00
Action<ITransform>? OnRotationChanged { get; set; }
2024-02-01 12:14:53 +03:00
/// <summary>
/// The position of the <see cref="ITransform"/> in 2D space.
/// </summary>
Vector2D Position { get; set; }
2024-02-01 12:14:53 +03:00
/// <summary>
/// The scale of the <see cref="ITransform"/>.
/// </summary>
Vector2D Scale { get; set; }
2023-11-23 22:07:49 +03:00
2024-02-01 12:14:53 +03:00
/// <summary>
/// The rotation of the <see cref="ITransform"/> in degrees.
/// </summary>
2023-11-23 22:07:49 +03:00
float Rotation { get; set; }
}