public static Hermite ( Vector2 &value1, Vector2 &tangent1, Vector2 &value2, Vector2 &tangent2, float amount, Vector2 &result ) : void | ||
value1 | Vector2 | Source position vector. |
tangent1 | Vector2 | Source tangent vector. |
value2 | Vector2 | Source position vector. |
tangent2 | Vector2 | Source tangent vector. |
amount | float | Weighting factor. |
result | Vector2 | [OutAttribute] The result of the Hermite spline interpolation. |
return | void |
public static void Hermite(ref Vector2 value1, ref Vector2 tangent1, ref Vector2 value2, ref Vector2 tangent2, float amount, out Vector2 result)
{
float num = amount * amount;
float num2 = amount * num;
float num3 = 2f * num2 - 3f * num + 1f;
float num4 = -2f * num2 + 3f * num;
float num5 = num2 - 2f * num + amount;
float num6 = num2 - num;
result.X = value1.X * num3 + value2.X * num4 + tangent1.X * num5 + tangent2.X * num6;
result.Y = value1.Y * num3 + value2.Y * num4 + tangent1.Y * num5 + tangent2.Y * num6;
}
///// <summary>Transforms the vector (x, y, 0, 1) by the specified matrix.</summary>
Vector2::Hermite ( Vector2 value1, Vector2 tangent1, Vector2 value2, Vector2 tangent2, float amount ) : Vector2 |