2019-10-25 15:50:21 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2022-06-17 15:37:17 +08:00
#nullable disable
2022-05-05 15:35:52 +08:00
using osu.Framework.Allocation ;
2019-10-25 15:50:21 +08:00
using osuTK ;
namespace osu.Game.Rulesets.Edit
{
2022-05-05 14:58:21 +08:00
/// <summary>
2022-05-05 15:04:34 +08:00
/// A snap provider which given a proposed position for a hit object, potentially offers a more correct position and time value inferred from the context of the beatmap.
2022-05-05 14:58:21 +08:00
/// </summary>
2022-05-05 15:35:52 +08:00
[Cached]
2020-05-20 16:48:43 +08:00
public interface IPositionSnapProvider
2019-10-25 15:50:21 +08:00
{
2020-05-20 16:48:43 +08:00
/// <summary>
2020-11-24 16:14:39 +08:00
/// Given a position, find a valid time and position snap.
2020-05-20 16:48:43 +08:00
/// </summary>
2020-05-20 17:19:21 +08:00
/// <param name="screenSpacePosition">The screen-space position to be snapped.</param>
2022-05-12 14:23:41 +08:00
/// <param name="snapType">The type of snapping to apply.</param>
2020-05-20 16:48:43 +08:00
/// <returns>The time and position post-snapping.</returns>
2022-05-12 14:23:41 +08:00
SnapResult FindSnappedPositionAndTime ( Vector2 screenSpacePosition , SnapType snapType = SnapType . All ) ;
2019-10-25 15:50:21 +08:00
}
}