Replaced calls to obsolete methods.

Fixed parameters in double versions of BaryCentric() (should be double instead of float).
This commit is contained in:
the_fiddler 2009-10-06 09:51:13 +00:00
parent f2c91d4a7c
commit 99aab2fa2e
6 changed files with 39 additions and 39 deletions

View file

@ -873,14 +873,14 @@ namespace OpenTK
result = a; // copy result = a; // copy
Vector2 temp = b; // copy Vector2 temp = b; // copy
temp.Sub(ref a); Subtract(ref temp, ref a, out temp);
temp.Mult(u); Multiply(ref temp, u, out temp);
result.Add(ref temp); Add(ref result, ref temp, out result);
temp = c; // copy temp = c; // copy
temp.Sub(ref a); Subtract(ref temp, ref a, out temp);
temp.Mult(v); Multiply(ref temp, v, out temp);
result.Add(ref temp); Add(ref result, ref temp, out result);
} }
#endregion #endregion

View file

@ -756,19 +756,19 @@ namespace OpenTK
/// <param name="u">First Barycentric Coordinate.</param> /// <param name="u">First Barycentric Coordinate.</param>
/// <param name="v">Second Barycentric Coordinate.</param> /// <param name="v">Second Barycentric Coordinate.</param>
/// <param name="result">Output Vector. a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise</param> /// <param name="result">Output Vector. a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise</param>
public static void BaryCentric(ref Vector2d a, ref Vector2d b, ref Vector2d c, float u, float v, out Vector2d result) public static void BaryCentric(ref Vector2d a, ref Vector2d b, ref Vector2d c, double u, double v, out Vector2d result)
{ {
result = a; // copy result = a; // copy
Vector2d temp = b; // copy Vector2d temp = b; // copy
temp.Sub(ref a); Subtract(ref temp, ref a, out temp);
temp.Mult(u); Multiply(ref temp, u, out temp);
result.Add(ref temp); Add(ref result, ref temp, out result);
temp = c; // copy temp = c; // copy
temp.Sub(ref a); Subtract(ref temp, ref a, out temp);
temp.Mult(v); Multiply(ref temp, v, out temp);
result.Add(ref temp); Add(ref result, ref temp, out result);
} }
#endregion #endregion

View file

@ -919,14 +919,14 @@ namespace OpenTK
result = a; // copy result = a; // copy
Vector3 temp = b; // copy Vector3 temp = b; // copy
temp.Sub(ref a); Subtract(ref temp, ref a, out temp);
temp.Mult(u); Multiply(ref temp, u, out temp);
result.Add(ref temp); Add(ref result, ref temp, out result);
temp = c; // copy temp = c; // copy
temp.Sub(ref a); Subtract(ref temp, ref a, out temp);
temp.Mult(v); Multiply(ref temp, v, out temp);
result.Add(ref temp); Add(ref result, ref temp, out result);
} }
#endregion #endregion

View file

@ -913,19 +913,19 @@ namespace OpenTK
/// <param name="u">First Barycentric Coordinate.</param> /// <param name="u">First Barycentric Coordinate.</param>
/// <param name="v">Second Barycentric Coordinate.</param> /// <param name="v">Second Barycentric Coordinate.</param>
/// <param name="result">Output Vector. a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise</param> /// <param name="result">Output Vector. a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise</param>
public static void BaryCentric(ref Vector3d a, ref Vector3d b, ref Vector3d c, float u, float v, out Vector3d result) public static void BaryCentric(ref Vector3d a, ref Vector3d b, ref Vector3d c, double u, double v, out Vector3d result)
{ {
result = a; // copy result = a; // copy
Vector3d temp = b; // copy Vector3d temp = b; // copy
temp.Sub(ref a); Subtract(ref temp, ref a, out temp);
temp.Mult(u); Multiply(ref temp, u, out temp);
result.Add(ref temp); Add(ref result, ref temp, out result);
temp = c; // copy temp = c; // copy
temp.Sub(ref a); Subtract(ref temp, ref a, out temp);
temp.Mult(v); Multiply(ref temp, v, out temp);
result.Add(ref temp); Add(ref result, ref temp, out result);
} }
#endregion #endregion

View file

@ -904,14 +904,14 @@ namespace OpenTK
result = a; // copy result = a; // copy
Vector4 temp = b; // copy Vector4 temp = b; // copy
temp.Sub(ref a); Subtract(ref temp, ref a, out temp);
temp.Mult(u); Multiply(ref temp, u, out temp);
result.Add(ref temp); Add(ref result, ref temp, out result);
temp = c; // copy temp = c; // copy
temp.Sub(ref a); Subtract(ref temp, ref a, out temp);
temp.Mult(v); Multiply(ref temp, v, out temp);
result.Add(ref temp); Add(ref result, ref temp, out result);
} }
#endregion #endregion

View file

@ -902,19 +902,19 @@ namespace OpenTK
/// <param name="u">First Barycentric Coordinate.</param> /// <param name="u">First Barycentric Coordinate.</param>
/// <param name="v">Second Barycentric Coordinate.</param> /// <param name="v">Second Barycentric Coordinate.</param>
/// <param name="result">Output Vector. a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise</param> /// <param name="result">Output Vector. a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise</param>
public static void BaryCentric(ref Vector4d a, ref Vector4d b, ref Vector4d c, float u, float v, out Vector4d result) public static void BaryCentric(ref Vector4d a, ref Vector4d b, ref Vector4d c, double u, double v, out Vector4d result)
{ {
result = a; // copy result = a; // copy
Vector4d temp = b; // copy Vector4d temp = b; // copy
temp.Sub(ref a); Subtract(ref temp, ref a, out temp);
temp.Mult(u); Multiply(ref temp, u, out temp);
result.Add(ref temp); Add(ref result, ref temp, out result);
temp = c; // copy temp = c; // copy
temp.Sub(ref a); Subtract(ref temp, ref a, out temp);
temp.Mult(v); Multiply(ref temp, v, out temp);
result.Add(ref temp); Add(ref result, ref temp, out result);
} }
#endregion #endregion