Added the non-ref RightHandedTransform

This commit is contained in:
Matthias 2016-02-20 15:06:18 +02:00
parent 256bf73c39
commit 22b33ab735
2 changed files with 33 additions and 0 deletions

View file

@ -1191,6 +1191,17 @@ namespace OpenTK
Vector3.Add(ref vec, ref temp, out result);
}
/// <summary>Transform a Vector by the given Matrix using right-handed notation</summary>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed vector</param>
public static Vector3 RightHandedTransform(Vector3 vec, Matrix3 mat)
{
Vector3 result;
RightHandedTransform(ref vec, ref mat, out result);
return result;
}
/// <summary>Transform a Vector by the given Matrix using right-handed notation</summary>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
@ -1203,6 +1214,17 @@ namespace OpenTK
mat.Row2.X * vec.X + mat.Row2.Y * vec.Y + mat.Row2.Z * vec.Z);
}
/// <summary>Transform a Vector by the given Matrix using right-handed notation</summary>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed vector</param>
public static Vector3 RightHandedTransform(Vector3 vec, Matrix4 mat)
{
Vector3 result;
RightHandedTransform(ref vec, ref mat, out result);
return result;
}
/// <summary>Transform a Vector by the given Matrix using right-handed notation</summary>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>

View file

@ -1017,6 +1017,17 @@ namespace OpenTK
result = new Vector4(v.X, v.Y, v.Z, v.W);
}
/// <summary>Transform a Vector by the given Matrix using right-handed notation</summary>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>
/// <param name="result">The transformed vector</param>
public static Vector4 RightHandedTransform(Vector4 vec, Matrix4 mat)
{
Vector4 result;
RightHandedTransform(ref vec, ref mat, out result);
return result;
}
/// <summary>Transform a Vector by the given Matrix using right-handed notation</summary>
/// <param name="vec">The vector to transform</param>
/// <param name="mat">The desired transformation</param>