// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osuTK; namespace osu.Game.Rulesets.Edit { /// /// A snap provider which given the position of a hit object, offers a more correct position and time value inferred from the context of the beatmap. /// Provided values are done so in an isolated context, without consideration of other nearby hit objects. /// public interface IPositionSnapProvider { /// /// Given a position, find a valid time and position snap. /// /// /// This call should be equivalent to running with any additional logic that can be performed without the time immutability restriction. /// /// The screen-space position to be snapped. /// The time and position post-snapping. SnapResult FindSnappedPositionAndTime(Vector2 screenSpacePosition); /// /// Given a position, find a value position snap, restricting time to its input value. /// /// The screen-space position to be snapped. /// The position post-snapping. Time will always be null. SnapResult FindSnappedPosition(Vector2 screenSpacePosition); } }