// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Utilities
{
///
/// A default implementation of ITransformSmoothingLogic for smoothing transforms.
///
public class DefaultTransformSmoothingLogic : ITransformSmoothingLogic
{
///
public Vector3 SmoothPosition(Vector3 source, Vector3 goal, float lerpTime, float deltaTime)
{
return Smoothing.SmoothTo(source, goal, lerpTime, deltaTime);
}
///
public Quaternion SmoothRotation(Quaternion source, Quaternion goal, float slerpTime, float deltaTime)
{
return Smoothing.SmoothTo(source, goal, slerpTime, deltaTime);
}
///
public Vector3 SmoothScale(Vector3 source, Vector3 goal, float lerpTime, float deltaTime)
{
return Smoothing.SmoothTo(source, goal, lerpTime, deltaTime);
}
}
}