-
-
Notifications
You must be signed in to change notification settings - Fork 911
/
IComputeCurve.cs
30 lines (27 loc) · 1.07 KB
/
IComputeCurve.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) Stride contributors (https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
using Stride.Core.Annotations;
namespace Stride.Animations
{
public interface IComputeCurve
{
/// <summary>
/// Updates any optimizations in the curve if data has changed.
/// </summary>
/// <returns><c>true</c> there were changes since the last time; otherwise, <c>false</c>.</returns>
bool UpdateChanges();
}
/// <summary>
/// Base interface for curve based compute value nodes.
/// </summary>
[InlineProperty]
public interface IComputeCurve<out T> : IComputeCurve where T : struct
{
/// <summary>
/// Evaluates the compute curve's value at the specified location, usually in the [0 .. 1] range
/// </summary>
/// <param name="location">Location to sample at</param>
/// <returns>Sampled value</returns>
T Evaluate(float location);
}
}