示例#1
0
 /// <summary>
 /// Constructor using Vec4F</summary>
 /// <param name="v">Vector to interpret as quaternion</param>
 public QuatF(Vec4F v)
 {
     X = v.X;
     Y = v.Y;
     Z = v.Z;
     W = v.W;
 }
示例#2
0
 /// <summary>
 /// Transforms the given vector by this matrix</summary>
 /// <param name="v">Input vector</param>
 /// <param name="result">Output vector</param>
 public void Transform(Vec4F v, out Vec4F result)
 {
     result.X = M11 * v.X + M21 * v.Y + M31 * v.Z + M41 * v.W;
     result.Y = M12 * v.X + M22 * v.Y + M32 * v.Z + M42 * v.W;
     result.Z = M13 * v.X + M23 * v.Y + M33 * v.Z + M43 * v.W;
     result.W = M14 * v.X + M24 * v.Y + M34 * v.Z + M44 * v.W;
 }