AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
InterpolatedColor.cs
Go to the documentation of this file.
1 // Copyright (c) Microsoft Corporation. All rights reserved.
2 // Licensed under the MIT License. See LICENSE in the project root for license information.
3 
4 using System;
5 using UnityEngine;
6 
7 namespace HoloToolkit.Unity
8 {
12  [Serializable]
13  public class InterpolatedColor : InterpolatedValue<Color>
14  {
18  public InterpolatedColor() : this(default(Color)) { }
19 
25  public InterpolatedColor(Color initialValue, bool skipFirstUpdateFrame = false)
26  : base(initialValue, skipFirstUpdateFrame)
27  { }
28 
37  public override Color ApplyCurveValue(Color startValue, Color targetValue, float curveValue)
38  {
39  return Color.Lerp(startValue, targetValue, curveValue);
40  }
41 
49  public override bool DoValuesEqual(Color one, Color other)
50  {
51  return one == other;
52  }
53  }
54 }
override bool DoValuesEqual(Color one, Color other)
Overrides the method to check if two Colors are equal.
InterpolatedColor(Color initialValue, bool skipFirstUpdateFrame=false)
Instantiates the InterpolatedColor with a given Color value as initial value and defaulted to skippin...
override Color ApplyCurveValue(Color startValue, Color targetValue, float curveValue)
Overrides the method to calculate the current Color interpolation value by using a Color...
Provides interpolation over Color.
InterpolatedColor()
Instantiates the InterpolatedColor with default of Color as initial value and skipping the first upda...
Base class that provides the common logic for interpolating between values. This class does not inher...