/// <summary>Interpolates between two values.</summary> /// <param name="from">The start value</param> /// <param name="to">The end value</param> /// <param name="t">The interpolation factor in range [0,1]</param> public override void Interp(WindParamaterValue from, WindParamaterValue to, float t) { m_Value.mode = t > 0f ? to.mode : from.mode; m_Value.customValue = from.customValue + (to.customValue - from.customValue) * t; m_Value.additiveValue = from.additiveValue + (to.additiveValue - from.additiveValue) * t; m_Value.multiplyValue = from.multiplyValue + (to.multiplyValue - from.multiplyValue) * t; }
/// <summary>Interpolates between two values.</summary> /// <param name="from">The start value</param> /// <param name="to">The end value</param> /// <param name="t">The interpolation factor in range [0,1]</param> public override void Interp(WindParamaterValue from, WindParamaterValue to, float t) { // These are not used m_Value.multiplyValue = 0; // Binary state that cannot be blended m_Value.mode = t > 0f ? to.mode : from.mode; // Override the orientation specific values m_Value.additiveValue = from.additiveValue + (to.additiveValue - from.additiveValue) * t; m_Value.customValue = HDUtils.InterpolateOrientation(from.customValue, to.customValue, t); }