VR4Medical/ICI/Library/PackageCache/com.unity.xr.interaction.toolkit@42ef3600567b/Runtime/UI/IUIModelUpdater.cs
2025-07-29 13:45:50 +03:00

26 lines
1.2 KiB
C#

using UnityEngine.XR.Interaction.Toolkit.Interactors.Casters;
namespace UnityEngine.XR.Interaction.Toolkit.UI
{
/// <summary>
/// Defines an interface for updating a UI data model.
/// </summary>
/// <remarks>
/// The primary functionality is to enable casters to receive calls to update the UI data model based on the current state of the caster and
/// attempting to obtain the current UI raycast result from the caster.
/// </remarks>
/// <seealso cref="CurveInteractionCaster"/>
/// <seealso cref="IUIInteractor.UpdateUIModel"/>
public interface IUIModelUpdater
{
/// <summary>
/// Updates the UI data model based on the implementer of this interface.
/// </summary>
/// <param name="uiModel">UI data model to update.</param>
/// <param name="isSelectActive">UI select input state to write into the UI data model.</param>
/// <param name="scrollDelta">UI scroll input state to write into the UI data model.</param>
/// <returns>Returns <see langword="true"/> if UI data model was updated successfully.</returns>
bool UpdateUIModel(ref TrackedDeviceModel uiModel, bool isSelectActive, in Vector2 scrollDelta);
}
}