Make all objects in selection candidates for spatial snapping

Closes #10898.
This commit is contained in:
Dean Herbert
2020-11-24 17:14:39 +09:00
parent 5d65665b42
commit c9a41f9dae
8 changed files with 64 additions and 10 deletions

View File

@ -8,12 +8,22 @@ namespace osu.Game.Rulesets.Edit
public interface IPositionSnapProvider
{
/// <summary>
/// Given a position, find a valid time snap.
/// Given a position, find a valid time and position snap.
/// </summary>
/// <remarks>
/// This call should be equivalent to running <see cref="SnapScreenSpacePositionToValidPosition"/> with any additional logic that can be performed without the time immutability restriction.
/// </remarks>
/// <param name="screenSpacePosition">The screen-space position to be snapped.</param>
/// <returns>The time and position post-snapping.</returns>
SnapResult SnapScreenSpacePositionToValidTime(Vector2 screenSpacePosition);
/// <summary>
/// Given a position, find a value position snap, restricting time to its input value.
/// </summary>
/// <param name="screenSpacePosition">The screen-space position to be snapped.</param>
/// <returns>The position post-snapping. Time will always be null.</returns>
SnapResult SnapScreenSpacePositionToValidPosition(Vector2 screenSpacePosition);
/// <summary>
/// Retrieves the distance between two points within a timing point that are one beat length apart.
/// </summary>